Help for this page

Select Code to Download


  1. or download this
    print "number of vertices: ".$G->vertices."\n";
    print "number of edges: ".$G->edges."\n";
    ...
    print "Name of edge E1->E2 is ".$G->get_attribute("name","E1","E2")."\
    +n";
    print "Name of edge E2->E3 is ".
          (defined $G->get_attribute("name","E2","E3") ? $G->get_attribute
    +("name","E2","E3") : "<undef>") ."\n";
    
  2. or download this
                 @V = $G->vertices
    
    ...
           of the vertices @v if the vertex exists in the graph $G
           and undef if it doesn't.  In scalar context returns the
           number of the existing vertices.