node.pl is a terminal based program which allows you to create graphs. You enter nodes (vertices) and connections (edges), and then view your data as you please!
Both directed and non directed graphs are supported. Features include, saving to file, merging files, undo, redo, custom color schemes, etc.
Click node.pl to download!
Preview:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
################# ADVANCED FIND FEATURES ################# sub nodeNames{ my @names; foreach( @nodes ){ push(@names,$_->name) } return @names } sub neighbors{ #i have decided to make neighbors(@set) disclude the elements of @set itself. Assumed good input of actual node names my ($currentref) = @_; my @neighbors; foreach( @$currentref ){ @neighbors = union(\@neighbors,obj($_)->connectorsRef) } return minus(\@neighbors,$currentref); } sub family{ #family is like neighbors, but it INCLUDES the input set. my ($currentref) = @_; my @neighbors = @_; foreach( @$currentref ){ @neighbors = union(\@neighbors,obj($_)->connectorsRef) } return union(\@neighbors,$currentref); } sub connectedGraph{ #print "input is ",@_," and family is ",family(@_)," and lengthleft is ",length(@_)," and lengthright is ",length(family(@_)),"\n"; my ($currentref) = @_; if( intersect($currentref,[nodeNames])==() ){ warn "no such node names"; return 0 } my @family = family($currentref); if( $#$currentref == $#family ){ return $currentref } return connectedGraph(\@family); } sub level{ my ($level,$node) = @_; my @current = ($node); if( $level < 0 ){ return } if( $level==0 ){ return @current } while(1){ print "level is ",2-$level,"\n"; print "current is "; display \@current; print "\n"; print "neighbors of current is "; display([neighbors(@current)]); print "\n"; print "\n\n"; #everything gets promoted if( $level==1 ){ return neighbors(@current) } @current = family(@current); --$level; } } |