This object describes a mathematical entity known as a (undirected) graph.
A graph is written as
G(V,E), where
V is a set of nodes, and
E a set of edges connecting them. In a
graph object the nodes are assumed to be indexed by sequential
integers, 1, 2, ...,
n, with
n being the number of nodes and stored at
the field named
no_nodes. Information about
edges is stored in the field
weights, which
is just the
nby
n
matrix
W. If
W(i,j)
is nonzero, this means that an edge exists between nodes
i and
j. For unweighted
graph,
W is comprised only from the discrete values
0 and 1. If the graph is weighted, the weight of the edge
(i,j) is given by
W(i,j).
The nodes may be labeled, and this can be stored in the field
node_name. Additionally, nodes can be weighted too,
a property sometimes referred to as the node's mass. Therefore, these weights
are stored in the field
node_mass. The object allows
for additional userdefined information to be associated with the node, by the
mechanism of "customized fields".
Navigate to:
General Description
Class Structure
Class Construction
Class Functions
Each field can be accessed by the dot (.) operation, or by the GET function. The GET function can work on multiple
instances simultaneously. Most fields, except for those that are Dependent, can be modified using the dot (.)
operation, or by the SET function.


Field 
Description 
Type 
Default 
Dedicated Get/Set Function 



name 
name of object, should be short and used as identifier. This field will never be empty. 
string 
'unnamed' 




description 
verbal description of the class content. 
string 
'' 




source 
verbal description of the source of information. 
string 
'' 




type 
type of graph.

string 
'general graph' 




node_name 
names of all nodes.

cell array of strings 
{} 
nodenames 



node_mass 
mass of each node.

double vector 
[] 




node_cfield 
userspecific node customized fields.

cell array of values 
{} 




node_cfield_name 
names of node customized fields.

cell array of strings 
{} 




weights 
symmetric sparse weight matrix.

double matrix 
[] 



Dependent 
no_nodes 
number of nodes in the graph.

integer scalar 
0 
nonodes 


Dependent 
no_node_cfields 
number of customized fields.

integer scalar 
0 



Dependent 
no_edges 
number of edges in the graph.

integer vector 
0 
noedges 
