| Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
| Summary | Top |
| Clair::Network::Reader::GML - Class for reading in GML network files |
| Package variables | Top |
| No package variables defined. |
| Included modules | Top |
| Clair::Network |
| Clair::Network::Reader |
| Inherit | Top |
| Clair::Network::Reader |
| Synopsis | Top |
| my $reader = Clair::Network::Reader::GML->new(); my $net = $reader->read_network($filename); |
| Description | Top |
| This class will read in a GML format graph file into a Network object. $cfn->readGMLFile($filename,$ignoreweights) This routine will read GML formatted file and add those edges/nodes to the existing graph. Not every GML term is utilized; this function only considers the terms node, edge, label, value, source and target. If a node[] in the file includes a "label XXXX" term, XXXX is used as the new node label attribute. node[] expressions without label terms will be cause the node to be given a default label "N$id". If the node[] in the file includes a "value XXXX", value is added as an attribute for that node, with XXXX as its value. All node[] in the file must include an "id X" term; those that do not will be ignored. If a edge[] in the file includes a "value XXXX" term, XXXX is considered to be the edge weight. If the edge previously existed in the graph, the new weight is added to the old one. All edge[] in the file must include both a "source X" and a "target X" term; those that do not will be ignored. If the nodes specified by the source and target terms do not exist in the graph, they will be added, with default labels. If $ignoreweights is set to true, than the actual added weight for every edge will be 1, regardless of the value listed in the edge[] block. This allows the construction of an idential graph with uniform (1) weights. For more information: http://www.infosun.fim.uni-passau.de/Graphlet/GML/ |
| Methods | Top |
| _read_network | No description | Code |
| _read_network | description | prev | next | Top |
sub _read_network
{ my $self = shift;
my $file = shift;
my %parameters = @_;
my $ignoreweights = $parameters{ignoreweights};
my $net = Clair::Network->new(directed => 1);
# Will try to build a graph from a GML formatted file. Any nodes or edges} |