Home > matgraph > @graph > copy_labels.m

copy_labels

PURPOSE ^

copy_labels(g,h) --- copy labels from h to g

SYNOPSIS ^

function copy_labels(g,h)

DESCRIPTION ^

 copy_labels(g,h) --- copy labels from h to g

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function copy_labels(g,h)
0002 % copy_labels(g,h) --- copy labels from h to g
0003 
0004 if ~is_labeled(h)
0005     error('Source graph (2nd argument) must be labeled')
0006 end
0007 
0008 ng = nv(g);
0009 nh = nv(h);
0010 
0011 label(g);
0012 for v=1:min(ng,nh)
0013     label(g,v,get_label(h,v));
0014 end

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