graph_data_structure — description of the main graph data structure
A graph in Scilab is represented by a Scilab typed list with type graph and 5 fields:
versiona simple string which contains the graph data structure version identifier.
name a simple string which contains the graph name.
directeda number with possible values 0 and 1.
The value 1 means that the graph edges are oriented.
nodes A Scilab mlist data structure,
which stores the information relative to nodes (see nodes_data_structure).
edges A Scilab mlist data structure,
which stores the information relative to edges (see edges_data_structure).
//create a simple graph
ta=[1 1 2 7 8 9 10 10 10 10 11 12 13 13];
he=[2 10 7 8 9 7 7 11 13 13 12 13 9 10];
g=make_graph('simple',1,13,ta,he);
g.nodes.graphics.x=[40,33,29,63,146,233,75,42,114,156,237,260,159];
g.nodes.graphics.y=[7,61,103,142,145,143,43,120,145,18,36,107,107];
show_graph(g,'new')
g
g.name
g.directed
g.nodes(1:3)
g.edges(1:5)
hilite_nodes(1:3)
hilite_edges(1:5)