Code covered by the BSD License  

Highlights from
Matgraph

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

Description of eq

eq

PURPOSE ^

test if p == q

SYNOPSIS ^

function tf = eq(p,q)

DESCRIPTION ^

 test if p == q

CROSS-REFERENCE INFORMATION ^

This function calls:
  • length length(p) gives the size of the permutation
This function is called by:
  • ne test if p ~= q

SOURCE CODE ^

0001 function tf = eq(p,q)
0002 % test if p == q
0003 np = length(p);
0004 nq = length(q);
0005 
0006 if np ~= nq
0007     tf = false;
0008     return
0009 else
0010     tf = all(p.array == q.array);
0011 end

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

Contact us at files@mathworks.com