makes a graph list
g = make_graph(name,directed,n,tail,head)
string, the name of the graph
integer, 0 (undirected graph) or 1 (directed graph)
integer, the number of nodes of the graph
row vector of the numbers of the tail nodes of the graph (its size is the number of edges of the graph)
row vector of the numbers of the head nodes of the graph (its size is the number of edges of the graph)
make_graph
makes a graph list according to its arguments which are
respectively the name of the graph, a flag for directed or undirected, the
number of nodes and the row vectors tail and head. These are the minimal data
needed for a graph.
If n
is a positive number, graph g
has n
nodes; this
number must be greater than or equal to max(max(tail),max(head))
. If
it is greater than this number,graph g
has isolated nodes.
The nodes names are taken as the nodes numbers.
If n
is equal to 0, graph g
has no isolated node and the number
of nodes is computed from tail
and head
. The nodes names are
taken from the numbers in tail
and head
.