Home > matgraph > @graph > ne.m

ne

PURPOSE ^

ne(g) --- number of edges in g or ne(g,h) --- check for inequality

SYNOPSIS ^

function m = ne(g,h)

DESCRIPTION ^

 ne(g) --- number of edges in g or ne(g,h) --- check for inequality

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function m = ne(g,h)
0002 % ne(g) --- number of edges in g or ne(g,h) --- check for inequality
0003 
0004 global GRAPH_MAGIC
0005 
0006 if (nargin == 2)
0007     if any(size(g) ~= size(h))
0008         m = 1;
0009         return
0010     end
0011     D = GRAPH_MAGIC.graphs{g.idx}.array - GRAPH_MAGIC.graphs{h.idx}.array;
0012     m = nnz(D)>0;
0013     return
0014 end
0015 
0016 m = nnz(GRAPH_MAGIC.graphs{g.idx}.array)/2;

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