Code covered by the BSD License  

Highlights from
Matgraph

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

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

size

PURPOSE ^

size(g) --- returns [nv,ne] for the graph

SYNOPSIS ^

function [sz,tz] = size(g)

DESCRIPTION ^

 size(g) --- returns [nv,ne] for the graph

CROSS-REFERENCE INFORMATION ^

This function calls:
  • ne ne(g) --- number of edges in g or ne(g,h) --- check for inequality
  • nv nv(g) --- number of vertices in g
This function is called by:
  • add add --- add edge(s) to the graph
  • alpha [a,S] = alpha(g) --- indepencence number
  • cayley cayley(g,perms) -- create a Cayley graph (undirected)
  • cdraw cdraw(g,coloring) -- draw g with a given vertex coloring
  • chromatic_poly chrompoly(g) --- find the chromatic polynomial of g
  • delete delete --- delete vertices or edges from a graph
  • distxy distxy(g) -- give g a distance based embedding
  • embed embed --- create an embedding for a graph
  • eq yn = eq(g,h) --- check if two graphs are equal (identical)
  • graph graph: constructor for the graph class
  • hasxy hasxy(g) --- determine if an embedding has been created for g
  • incidence_matrix incidence_matrix(g) --- return the vertex/edge incidence matrix.
  • interval_graph interval_graph(g,ilist) --- create an interval graph
  • iso [yn,p] = iso(g,h,options) --- is g isomorphic to h?
  • line_graph line_graph(g,h) --- set g to be the line graph of h
  • ne ne(g) --- number of edges in g or ne(g,h) --- check for inequality
  • random_planar random_planar(g,n) --- create a random planar triangulation
  • sgf sgf --- simple graph format: a 2-column matrix representation
  • sl2graph sl2graph(g,p) -- create an SL(2,p) graph

SOURCE CODE ^

0001 function [sz,tz] = size(g)
0002 % size(g) --- returns [nv,ne] for the graph
0003 
0004 if nargout >= 2
0005     sz = nv(g);
0006     tz = ne(g);
0007 else
0008     sz = [nv(g),ne(g)];
0009 end

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

Contact us at files@mathworks.com