is_labeled(g) --- determine if there are labels on vertices. By definition, an empty graph is NOT labeled.
0001 function yn = is_labeled(g) 0002 % is_labeled(g) --- determine if there are labels on vertices. 0003 % By definition, an empty graph is NOT labeled. 0004 0005 global GRAPH_MAGIC 0006 0007 if (isfield(GRAPH_MAGIC.graphs{g.idx},'labels')) 0008 yn = length(GRAPH_MAGIC.graphs{g.idx}.labels) > 0; 0009 else 0010 yn = false; 0011 end