Code covered by the BSD License  

Highlights from
Matgraph

from Matgraph by Ed Scheinerman
Toolbox for working with simple, undirected graphs

Description of make_logical
Home > matgraph > @graph > make_logical.m

make_logical

PURPOSE ^

make_logical(g) --- ensure that the internal storage for g's matrix is a

SYNOPSIS ^

function make_logical(g)

DESCRIPTION ^

 make_logical(g) --- ensure that the internal storage for g's matrix is a
 logical matrix (for space efficiency). 
 This function is called by various matgraph routines and it should not 
 be necessary to call this in ordinary use of matgraph.

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:
  • disjoint_union disjoint_union(g,h,k) --- overwrite g with the disjoint union of the
  • graph graph: constructor for the graph class
  • renumber renumber the vertices of a graph
  • resize resize(g,n) --- change the number of vertices in g to n

SOURCE CODE ^

0001 function make_logical(g)
0002 % make_logical(g) --- ensure that the internal storage for g's matrix is a
0003 % logical matrix (for space efficiency).
0004 % This function is called by various matgraph routines and it should not
0005 % be necessary to call this in ordinary use of matgraph.
0006 
0007 global GRAPH_MAGIC
0008 
0009 if (~islogical(GRAPH_MAGIC.graphs{g.idx}.array))
0010     GRAPH_MAGIC.graphs{g.idx}.array = ...
0011         logical(GRAPH_MAGIC.graphs{g.idx}.array);
0012 end

Generated on Thu 13-Mar-2008 14:23:52 by m2html © 2003

Contact us at files@mathworks.com