# doc-cache created by Octave 5.1.0
# name: cache
# type: cell
# rows: 3
# columns: 74
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6797
 GRAPHS Simple Toolbox for manipulating Geometric Graphs
 Version 0.6 04-Sep-2017 .

   The aim of this package is to provide functions to easily create,  
   modify and display geometric graphs (geometric in a sense position
   nodes are associated to geometric position in 2D or 3D).

   Graph structure is represented by at least two arrays:
   * NODES, which contains coordinates of each vertex
   * EDGES, which contains indices of start and end vertex.

   Others arrays may sometimes be used:
   * FACES, which contains indices of vertices of each face (either a
       double array, or a cell array)
   * CELLS, which contains indices of faces of each cell.

   An alternative representation is to use a structure, with fields:
   * 'nodes'
   * 'edges'
   corresponding to the data described above.

   Note that topological description of 2D graph is entirely contained in
   EDGES array, and that NODES array is used only to display the graph.
   
   Caution: this type of data structure is easy to create and to manage,
   but may be very inefficient for some algorithms. 

   Graphs are usually considered as non-oriented in this package.


 Graph creation
   delaunayGraph              - Graph associated to Delaunay triangulation of input points
   euclideanMST               - Build euclidean minimal spanning tree of a set of points
   prim_mst                   - Minimal spanning tree by Prim's algorithm
   knnGraph                   - Create the k-nearest neighbors graph of a set of points
   relativeNeighborhoodGraph  - Relative Neighborhood Graph of a set of points
   gabrielGraph               - Gabriel Graph of a set of points

 Create graph from images
   imageGraph                 - Create equivalent graph of a binary image
   boundaryGraph              - Get boundary of image as a graph
   gcontour2d                 - Creates contour graph of a 2D binary image.
   gcontour3d                 - Create contour graph of a 3D binary image.

 Voronoi Graphs
   voronoi2d                  - Compute a voronoi diagram as a graph structure
   boundedVoronoi2d           - Return a bounded voronoi diagram as a graph structure
   centroidalVoronoi2d        - Centroidal Voronoi tesselation within a polygon
   centroidalVoronoi2d_MC     - Centroidal Voronoi tesselation by Monte-Carlo
   cvtUpdate                  - Update germs of a CVT with given points
   cvtIterate                 - Update germs of a CVT using random points with given density
   boundedCentroidalVoronoi2d - Create a 2D Centroidal Voronoi Tesselation in a box

 Geodesic and shortest path operations
   grShortestPath             - Find a shortest path between two nodes in the graph
   grPropagateDistance        - Propagates distances from a vertex to other vertices
   grVertexEccentricity       - Eccentricity of vertices in the graph
   graphDiameter              - Diameter of a graph
   graphPeripheralVertices    - Peripheral vertices of a graph
   graphCenter                - Center of a graph
   graphRadius                - Radius of a graph
   grFindGeodesicPath         - Find a geodesic path between two nodes in the graph
   grFindMaximalLengthPath    - Find a path that maximizes sum of edge weights

 Graph processing (general applications)
   pruneGraph                 - Remove all edges with a terminal vertex
   mergeGraphs                - Merge two graphs, by adding nodes, edges and faces lists. 
   grMergeNodes               - Merge two (or more) nodes in a graph.
   grMergeMultipleNodes       - Simplify a graph by merging multiple nodes
   grMergeMultipleEdges       - Remove all edges sharing the same extremities
   grSimplifyBranches         - Replace branches of a graph by single edges

 Filtering operations on Graph
   grMean                     - Compute mean from neihgbours
   grMedian                   - Compute median from neihgbours
   grDilate                   - Morphological dilation on graph
   grErode                    - Morphological erosion on graph
   grClose                    - Morphological closing on graph
   grOpen                     - Morphological opening on graph

 Operations for geometric graphs
   grEdgeLengths              - Compute length of edges in a geometric graph
   grMergeNodeClusters        - Merge cluster of connected nodes in a graph
   grMergeNodesMedian         - Replace several nodes by their median coordinate
   clipGraph                  - Clip a graph with a rectangular area
   clipGraphPolygon           - Clip a graph with a polygon
   clipMesh2dPolygon          - Clip a planar mesh with a polygon
   addSquareFace              - Add a (square) face defined from its vertices to a graph
   grFaceToPolygon            - Compute the polygon corresponding to a graph face
   graph2Contours             - Convert a graph to a set of contour curves

 Graph information
   grNodeDegree               - Degree of a node in a (undirected) graph
   grNodeInnerDegree          - Inner degree of a node in a graph
   grNodeOuterDegree          - Outer degree of a node in a graph
   grAdjacentNodes            - Find list of nodes adjacent to a given node
   grAdjacentEdges            - Find list of edges adjacent to a given node
   grOppositeNode             - Return opposite node in an edge
   grLabel                    - Associate a label to each connected component of the graph

 Graph management (low level operations)
   grRemoveNode               - Remove a node in a graph
   grRemoveNodes              - Remove several nodes in a graph
   grRemoveEdge               - Remove an edge in a graph.
   grRemoveEdges              - Remove several edges from a graph

 Graph display
   drawGraph                  - Draw a graph, given as a set of vertices and edges
   drawGraphEdges             - Draw edges of a graph
   fillGraphFaces             - Fill faces of a graph with specified color
   drawDigraph                - Draw a directed graph, given as a set of vertices and edges
   drawDirectedEdges          - Draw edges with arrow indicating direction
   drawEdgeLabels             - Draw values associated to graph edges
   drawNodeLabels             - Draw values associated to graph nodes
   drawSquareMesh             - Draw a 3D square mesh given as a graph
   patchGraph                 - Transform 3D graph (mesh) into a patch handle

 Input/Output
   readGraph                  - Read a graph from a text file
   writeGraph                 - Write a graph to an ascii file

 -----
 Author: David Legland
 e-mail: david.legland@inra.fr
 Project homepage: http://github.com/mattools/matGeom
 created the  07/11/2005.
 Copyright INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 GRAPHS Simple Toolbox for manipulating Geometric Graphs
 Version 0.6 04-Sep...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
addSquareFace


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 474
ADDSQUAREFACE Add a (square) face defined from its vertices to a graph.

   [N2 E2 F2] = addSquareFace(N, E, F, FN)
   Add a new face, defined by the nodes indices FN, to the graph defined
   by node list N, edge list E, and face list F.
   Edges of the face are also added, if they are not already present in
   the edge list.

   See Also
   patchGraph, boundaryGraph


   ---------

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 28/06/2004.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
ADDSQUAREFACE Add a (square) face defined from its vertices to a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
boundaryGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 669
BOUNDARYGRAPH Get boundary of image as a graph.

   [NODES, EDGES] = boundaryGraph(IMG)         (2D)
   [NODES, EDGES, FACES] = boundaryGraph(IMG)  (3D)
   Create a graph on the boundary of binary image IMG. Each pixel is
   considered as a unit square (or cube), centered on integer coordinates. 
   Boundary of the shape is selected as a graph.

   Result is a set of nodes with (x,y) or (x,y,z) coordinates, a set of
   edges linking two neighbour nodes, and in 3D also a set of square
   faces, containing reference to each 4-tuple of nodes.
   
   The resulting shell is open if the binary structure touches edges of
   image.

   See also :
   imPatch, drawMesh




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
BOUNDARYGRAPH Get boundary of image as a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
boundedCentroidalVoronoi2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 932
BOUNDEDCENTROIDALVORONOI2D Create a 2D Centroidal Voronoi Tesselation in a box.

   [N, E, F] = boundedCentroidalVoronoi2d(GERMS, BOX)
   GERMS are N-by-2 point array, BOX is given as [xmin xmax ymin ymax].
   Algorithm is an iteration of voronoi diagram computations, using at
   each steps the centroids of previous diagram as germs for the new
   diagram.

   [N, E, F] = boundedCentroidalVoronoi2d(GERMS, BOX, NITER)
   Specifies the number of iterations.

   [N, E, F, G] = boundedCentroidalVoronoi2d(...)
   also returns the positions of germs/centroids for each face. If the
   number of iteration was sufficient, location of germs should correspond
   to centroids of faces 'fc' computed using: 
   fc(i,:) = polygonCentroid(n(f{i}, :));

   Example
   [n, e, f] = boundedCentroidalVoronoi2d(rand(20, 2)*100, [0 100 0 100]);
   drawGraph(n, e, f);

   See also
     graphs, boundedVoronoi2d, centroidalVoronoi2d, clipGraph




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79
BOUNDEDCENTROIDALVORONOI2D Create a 2D Centroidal Voronoi Tesselation in a box.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
boundedVoronoi2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 429
BOUNDEDVORONOI2D Return a bounded voronoi diagram as a graph structure.
   
   [NODES, EDGES, FACES] = boundedVoronoi2d(BOX, GERMS)
   GERMS an array of points with dimension 2
   NODES, EDGES, FACES: usual graph representation, FACES as cell array

   Example
   [n, e, f] = boundedVoronoi2d([0 100 0 100], rand(100, 2)*100);
   drawGraph(n, e);

   See also
     graphs, boundedCentroidalVoronoi2d, clipGraph, clipGraphPolygon



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
BOUNDEDVORONOI2D Return a bounded voronoi diagram as a graph structure.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
centroidalVoronoi2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1794
CENTROIDALVORONOI2D Centroidal Voronoi tesselation within a polygon.

   PTS = centroidalVoronoi2d(NPTS, POLY)
   Generate points in a polygon based on centroidal voronoi tesselation.
   Centroidal germs can be computed by using the Llyod's algorithm:
   1) initial germs are chosen at random within polygon
   2) voronoi polygon of the germs is computed
   3) the centroids of each domain are computed, and used as germs of the
   next iteration

   [PTS, PATHLIST] = centroidalVoronoi2d(NPTS, POLY)
   Also returns the path of each germs at each iteration. The result
   PATHLIST is a cell array with as many cells as the number of germs,
   containing in each cell the successive positions of the germ.

   PTS = centroidalVoronoi2d(.., PARAM, VALUE)
   Specify one or several optional arguments. PARAM can be one of:
   * 'nIter'   specifies the number of iterations of the algorithm
       (default is 50)
   * 'verbose' display iteration number. Default is false.

   Example
     poly = ellipseToPolygon([50 50 40 30 20], 200);
     nGerms = 100;
     germs = centroidalVoronoi2d(nGerms, poly);
     figure; hold on;
     drawPolygon(poly, 'k');
     drawPoint(germs, 'bo');
     axis equal; axis([0 100 10 90]);
     % extract regions of the CVD
     box = polygonBounds(poly);
     [n, e] = boundedVoronoi2d(box, germs);
     [n2, e2] = clipGraphPolygon(n, e, poly);
     drawGraphEdges(n2, e2, 'b');

   See also
   graphs, boundedVoronoi2d, centroidalVoronoi2d_MC

   Rewritten from programs found in
   http://people.scs.fsu.edu/~burkardt/m_src/cvt/cvt.html

   Reference:
    Qiang Du, Vance Faber, and Max Gunzburger,
    Centroidal Voronoi Tessellations: Applications and Algorithms,
    SIAM Review, Volume 41, 1999, pages 637-676.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
CENTROIDALVORONOI2D Centroidal Voronoi tesselation within a polygon.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
centroidalVoronoi2d_MC


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2071
CENTROIDALVORONOI2D_MC Centroidal Voronoi tesselation by Monte-Carlo.

   PTS = centroidalVoronoi2d_MC(NPTS, POLY)
   Generate points in a polygon based on centroidal voronoi tesselation.
   Centroidal germs can be computed by using the Llyod's algorithm:
   1) initial germs are chosen at random within polygon
   2) voronoi polygon of the germs is computed
   3) the centroids of each domain are computed, and used as germs of the
   next iteration

   This version uses a Monte-Carlo version of Llyod's algorithm. The
   centroids are not computed explicitly, but approximated by sampling N
   points within the bounding polygon. 

   [PTS, PATHLIST] = centroidalVoronoi2d_MC(NPTS, POLY)
   Also returns the path of each germs at each iteration. The result
   PATHLIST is a cell array with as many cells as the number of germs,
   containing in each cell the successive positions of the germ.

   PTS = centroidalVoronoi2d_MC(.., PARAM, VALUE)
   Specify one or several optional arguments. PARAM can be one of:
   * 'nIter'   specifies the number of iterations of the algorithm
       (default is 50)
   * 'nPoints' number of points for updating positions of germs at each
       iteration. Default is 200 times the number of germs.
   * 'verbose' display iteration number. Default is false.

   Example
     poly = ellipseToPolygon([50 50 40 30 20], 200);
     nGerms = 100;
     germs = centroidalVoronoi2d(nGerms, poly);
     figure; hold on;
     drawPolygon(poly, 'k');
     drawPoint(germs, 'bo');
     axis equal; axis([0 100 10 90]);
     % extract regions of the CVD
     box = polygonBounds(poly);
     [n, e] = boundedVoronoi2d(box, germs);
     [n2, e2] = clipGraphPolygon(n, e, poly);
     drawGraphEdges(n2, e2, 'b');

   See also
   graphs, boundedVoronoi2d, centroidalVoronoi2d

   Rewritten from programs found in
   http://people.scs.fsu.edu/~burkardt/m_src/cvt/cvt.html

   Reference:
    Qiang Du, Vance Faber, and Max Gunzburger,
    Centroidal Voronoi Tessellations: Applications and Algorithms,
    SIAM Review, Volume 41, 1999, pages 637-676.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
CENTROIDALVORONOI2D_MC Centroidal Voronoi tesselation by Monte-Carlo.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
clipGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 939
CLIPGRAPH Clip a graph with a rectangular area.

   [N2, E2] = clipGraph(N, E, BOX);
   [N2, E2, F2] = clipGraph(N, E, F, BOX);
   N is an array ov vertices, E an array of edges, containing indices of
   first ans second vertices, and F (optional) is either a matrice or a
   cell array containing indices of vertices for each face.
   BOX is either a box given as a matrix: [XMIN XMAX;YMIN YMAX], or a row
   vector following matlab axis format: [XMIN XMAX YMIN YMAX].

   Example
     % create a simple graph structure
     n = [0 60; 40 100; 40 60; 60 40; 100 40; 60 0];
     e = [1 3; 2 3; 3 4; 4 5; 4 6; 5 6];
     figure(1); clf; hold on;
     drawGraph(n, e);
     axis equal; axis([-10 110 -10 110]);
     % clip with a box
     box = [10 90 10 90];
     drawBox(box, 'k');
     [n2, e2] = clipGraph(n, e, box);
     drawGraphEdges(n2, e2, 'color', 'b', 'linewidth', 2);
     
   See also
     graphs, drawGraph, clipGraphPolygon




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
CLIPGRAPH Clip a graph with a rectangular area.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
clipGraphPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 810
CLIPGRAPHPOLYGON  Clip a graph with a polygon.

   [NODES2, EDGES2] = clipGraphPolygon(NODES, EDGES, POLY)
   Clips the graph defined by nodes NODES and edges EDGES with the polygon
   given in POLY. POLY is a N-by-2 array of vertices.
   The result is a new graph containing nodes inside the polygon, as well
   as nodes created by the intersection of edges with the polygon.

   Example
     elli = [50 50 40 20 30];
     figure; hold on;
     drawEllipse(elli, 'k');
     poly = ellipseToPolygon(elli, 200);
     box = polygonBounds(poly);
     germs = randomPointInPolygon(poly, 100);
     drawPoint(germs, 'b.');
     [n, e, f] = boundedVoronoi2d(box, germs);
     [n2, e2] = clipGraphPolygon(n, e, poly);
     drawGraphEdges(n2, e2);

   See also
     graphs, drawGraph, clipGraph




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
CLIPGRAPHPOLYGON  Clip a graph with a polygon.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
clipMesh2dPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1036
CLIPMESH2DPOLYGON  Clip a planar mesh with a polygon.

   [NODES2, EDGES2, FACES2] = clipMesh2dPolygon(NODES, EDGES, FACES, POLY)
   Clips the graph defined by nodes NODES and edges EDGES with the polygon
   given in POLY. POLY is a N-by-2 array of vertices.
   The result is a new graph containing nodes inside the polygon, as well
   as nodes created by the intersection of edges with the polygon.

   Important: it is assumed that no edge crosses the polygon twice. This
   is the case if the polygon is convex (or nearly convex) and if the
   edges are small compared to the polygon.

   Example
     elli = [50 50 40 20 30];
     figure; hold on;
     drawEllipse(elli, 'k');
     poly = ellipseToPolygon(elli, 200);
     box = polygonBounds(poly);
     germs = randomPointInPolygon(poly, 100);
     drawPoint(germs, 'b.');
     [n, e, f] = boundedVoronoi2d(box, germs);
     [n2, e2, f2] = clipMesh2dPolygon(n, e, f, poly);
     drawGraphEdges(n2, e2);
     fillGraphFaces(n2, f2);

   See also
     graphs, drawGraph, clipGraph




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
CLIPMESH2DPOLYGON  Clip a planar mesh with a polygon.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
cvtIterate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 817
CVTITERATE Update germs of a CVT using random points with given density.

   G2 = cvtIterate(G, FPTR, FARGS, N)
   G: inital germs 
   FPTR: pointer to a function which accept a scalar M and return M random
       points with a given distribution
   FARGS: arguments to be given to the FPTR function (can be empty)
   N: number of random points to generate

   Example
   P = randPointDiscUnif(50);
   P2 = cvtIterate(P, @randPointDiscUnif, [], 1000);
   P3 = cvtIterate(P2, @randPointDiscUnif, [], 1000);

   See also


   Rewritten from programs found in
   http://people.scs.fsu.edu/~burkardt/m_src/cvt/cvt.html

  Reference:
    Qiang Du, Vance Faber, and Max Gunzburger,
    Centroidal Voronoi Tessellations: Applications and Algorithms,
    SIAM Review, Volume 41, 1999, pages 637-676.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
CVTITERATE Update germs of a CVT using random points with given density.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
cvtUpdate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 525
CVTUPDATE Update germs of a CVT with given points.

   G2 = cvtUpdate(G, PTS)
   G: inital germs 
   PTS: the points

   Example
   G = randPointDiscUnif(50);
   P = randPointDiscUnif(10000);
   G2 = cvtUpdate(G, P);

   See also


   Rewritten from programs found in
   http://people.scs.fsu.edu/~burkardt/m_src/cvt/cvt.html

  Reference:
    Qiang Du, Vance Faber, and Max Gunzburger,
    Centroidal Voronoi Tessellations: Applications and Algorithms,
    SIAM Review, Volume 41, 1999, pages 637-676.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
CVTUPDATE Update germs of a CVT with given points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
delaunayGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 754
DELAUNAYGRAPH Graph associated to Delaunay triangulation of input points.

   [NODES EDGES] = delaunayGraph(POINTS)
   Compute the Delaunay triangulation of the set of input points, and
   convert to a set of edges. The output NODES is the same as the input
   POINTS.

   Example
     % Draw a planar graph correpspionding to Delaunay triangulation
     points = rand(30, 2) * 100;
     [nodes edges] = delaunayGraph(points);
     figure; 
     drawGraph(nodes, edges);

     % Draw a 3Dgraph corresponding to Delaunay tetrahedrisation
     points = rand(20, 3) * 100;
     [nodes edges] = delaunayGraph(points);
     figure;
     drawGraph(nodes, edges);
     view(3);

   See Also
   delaunay, delaunayn, delaunayTriangulation




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
DELAUNAYGRAPH Graph associated to Delaunay triangulation of input points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
drawDigraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 579
DRAWDIGRAPH Draw a directed graph, given as a set of vertices and edges.

   drawDigraph(NODES1, NODES2, EDGES) 
   NODES1 are originating vertices
   NODES2 are destination vertices
   EDGES is an array, with first column containing index of origin vertex
   (index in NODES1), and second column containing index of destination
   vertex (index in NODES2).
   Edges are drawn with arrows.

   H = drawDigraph(...) 
   return handle to the set of edges.
   
   
   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 17/08/2004.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
DRAWDIGRAPH Draw a directed graph, given as a set of vertices and edges.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
drawDirectedEdges


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 702
DRAWDIRECTEDEDGES Draw edges with arrow indicating direction.
 
   usage:
   drawDirectedEdges(NODES, EDGES);

   drawDirectedEdges(NODES, EDGES, STYLE);
   specifies style of arrrows. Can be one of:
   'left'
   'right'
   'arrow'
   'triangle'
   'fill'

   drawDirectedEdges(NODES, EDGES, STYLE, DIRECT) : also specify the base
   direction of all edges. DIRECT is true by default. If DIRECT is false
   all edges are inverted.
   
   H = drawDirectedEdges(NODES, EDGES) : return handles to each of the
   lines created.

   TODO: now only style 'arrow' is implemented ...

   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 12/03/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
DRAWDIRECTEDEDGES Draw edges with arrow indicating direction.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
drawEdgeLabels


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 679
DRAWEDGELABELS Draw values associated to graph edges.
 
   usage:
   drawEdgeLabels(NODES, EDGES, VALUES);
   NODES: array of double, containing x and y values of nodes
   EDGES: array of int, containing indices of in and out nodes
   VALUES is an array the same length of EDGES, containing values
   associated to each edges of the graph.

   The function computes the center of each edge, and puts the text with
   associated value.
   
   H = drawEdgeLabels(...) return array of handles to each text structure,
   making possible to change font, color, size


   -----
   author: David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 10/02/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
DRAWEDGELABELS Draw values associated to graph edges.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
drawGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1404
DRAWGRAPH Draw a graph, given as a set of vertices and edges.

   drawGraph(NODES, EDGES) 
   Draws a graph specified by a set of nodes (array N-by-2 or N-by-3,
   corresponding to coordinate of each node), and a set of edges (an array
   NE-by-2, containing for each edge the first and the second node).
   Default drawing is a red circle for nodes and a blue line for edges.

   drawGraph(NODES, EDGES, FACES)
   Also draws faces of the graph as patches.

   drawGraph(GRAPH)
   Passes argument in a srtucture with at least 2 fields named 'nodes' and
   'edges', and possibly one field 'faces', corresponding to previously
   described parameters.
   GRAPH can also be a cell array, whose first element is node array,
   second element is edges array, and third element, if present, is faces
   array.


   drawGraph(..., SNODES)
   drawGraph(..., SNODES, SEDGES)
   drawGraph(..., SNODES, SEDGES, SFACES)
   Specifies the draw mode for each element, as in the classical 'plot'
   function. To not display some elements, uses 'none'.


   H = drawGraph(...) 
   Returns handle to the set of edges.
   
   [HN, HE] = drawGraph(...) 
   Returns handle to the set of nodes and to the set of edges.

   [HN, HE, HF] = drawGraph(...)   
   Also returns handle to the set of faces.
   
   See Also
   graphs, drawGraphEdges, fillGraphFaces, clipGraph, clipGraphPolygon




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
DRAWGRAPH Draw a graph, given as a set of vertices and edges.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
drawGraphEdges


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 591
DRAWGRAPHEDGES Draw edges of a graph.

   drawGraphEdges(NODES, EDGES) 
   Draws a graph specified by a set of nodes (array N-by-2 or N-by-3,
   corresponding to coordinate of each node), and a set of edges (an array
   Ne-by-2, containing to the first and the second node of each edge).

   drawGraphEdges(..., SEDGES)
   Specifies the draw mode for each element, as in the classical 'plot'
   function.
   Default drawing is a blue line for edges.


   H = drawGraphEdges(...) 
   return handle to the set of edges.
   
   See also 
   graphs, drawGraph, fillGraphFaces




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
DRAWGRAPHEDGES Draw edges of a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
drawNodeLabels


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 515
DRAWNODELABELS Draw values associated to graph nodes.
 
   Usage:
   drawNodeLabels(NODES, VALUES);
   NODES: array of double, containing x and y values of nodes
   VALUES is an array the same length of EDGES, containing values
   associated to each edges of the graph.

   H = drawNodeLabels(...) 
   Returns array of handles to each text structure, making it possible to
   change font, color, size 

   -----
   author: David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 10/02/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
DRAWNODELABELS Draw values associated to graph nodes.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
drawSquareMesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ok<INUSL>



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ok<INUSL>




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
euclideanMST


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 828
EUCLIDEANMST Build euclidean minimal spanning tree of a set of points.

   EDGES = euclideanMST(POINTS)
   POINTS is a [NxP] array, N being the number of points and P being the
   dimension.
   Result EDGES is a [Mx2] array, containing indices of each vertex for
   each edges.

   [EDGES DISTS] = euclideanMST(POINTS)
   Also returns the lengths of edges computed by MST algorithm.

   Algorithm first computes Delaunay triangulation of the set of points,
   then computes euclidean length of each edge of triangulation, and
   finally uses prim algorithm to simplify the graph.

   Example
     % choose random points in the plane and display their Euclidean MST
     pts = rand(50, 2)*100;
     edges = euclideanMST(pts);
     drawGraph(pts, edges)

   See also
   prim_mst, distancePoints, delaunayn




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
EUCLIDEANMST Build euclidean minimal spanning tree of a set of points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
fillGraphFaces


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1098
FILLGRAPHFACES Fill faces of a graph with specified color.

   fillGraphFaces(NODES, FACES) 
   draw the faces of a graph / mesh defined by a sef of vertices and a set
   of faces. The array NODES is a NV-by-2 or NV-by-3 array containing
   vertex coordinates. The array FACES is either a NF-by-3 or NF-by-4
   array of integers, or a 1-by-Nf array of cells, and contains indices of
   each face vertices.

   fillGraphFaces(NODES, EDGES, FACES)
   also specifies the edges ofthe graph.

   fillGraphFaces(GRAPH)
   passes argument in a srtucture with at least 3 fields named 'nodes', 
   'edges', and 'faces', corresponding to previously described parameters.
   GRAPH can also be a cell array, whose first element is node array,
   second element is edges array, and third element, if present, is faces
   array.

   fillGraphFaces(..., SFACES)
   specifes the draw mode for each element, as in the classical 'plot'
   function. To not display some elements, uses 'none'.

   H = fillGraphFaces(...) 
   return handle to the set of faces.
   
   See also
   graphs, drawGraph, drawGraphEdges
   



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
FILLGRAPHFACES Fill faces of a graph with specified color.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
gabrielGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 637
GABRIELGRAPH  Gabriel Graph of a set of points.

   EDGES = gabrielGraph(PTS)
   Computes the Gabriel graph of the input set of points PTS. The Gabriel
   graph is based on the euclidean Delaunay triangulation, and keeps only
   edges whose circumcircle does not contain any other input point than
   the edge extremities.

   [NODES EDGES] = gabrielGraph(PTS)
   Also returns the initial set of points;

   Example
     pts = rand(100, 2);
     edges = gabrielGraph(pts);
     figure; drawPoint(pts);
     hold on; axis([0 1 0 1]); axis equal;
     drawGraph(pts, edges);

   See also
     drawGraph, delaunayGraph




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
GABRIELGRAPH  Gabriel Graph of a set of points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
gcontour2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 160
GCONTOUR2D Creates contour graph of a 2D binary image.



   ---------

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 25/06/2004.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
GCONTOUR2D Creates contour graph of a 2D binary image.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
gcontour3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 159
GCONTOUR3D Create contour graph of a 3D binary image.



   ---------

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 28/06/2004.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
GCONTOUR3D Create contour graph of a 3D binary image.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
grAdjacentEdges


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
GRADJACENTEDGES Find list of edges adjacent to a given node.

   NEIGHS = grAdjacentEdges(EDGES, NODE)
   EDGES  the complete edges list (containing indices of neighbor nodes)
   NODE   index of the node
   NEIGHS the indices of edges containing the node index

   See also
     grAdjacentNodes



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
GRADJACENTEDGES Find list of edges adjacent to a given node.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
grAdjacentNodes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 845
GRADJACENTNODES Find list of nodes adjacent to a given node.

   NEIGHS = grAdjacentNodes(EDGES, NODE)
   EDGES: the complete edges list (containing indices of neighbor nodes)
   NODE: index of the node
   NEIGHS: the nodes adjacent to the given node.

   NODE can also be a vector of node indices, in this case the result is
   the set of neighbors of any input node, excluding the input nodes.

   Example
     % create a basic graph and display it
     nodes = [10 10;20 10;10 20;20 20;27 15];
     edges = [1 2;1 3;2 4;2 5;3 4;4 5];
     figure; drawGraph(nodes, edges);
     hold on; drawNodeLabels(nodes, 1:5)
     axis equal; axis([0 40 0 30]);
     % compute list of nodes adjacent to node with index 2
     grAdjacentNodes(edges, 2)
     ans =
         1
         4
         5

   See Also
     grAdjacentEdges



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
GRADJACENTNODES Find list of nodes adjacent to a given node.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
grClose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 304
GRCLOSE Morphological closing on graph.

   LBL2 = grClose(EDGES, LBL1)
   First performs dilatation, then erosion.

   Example
   grOpen

   See also


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-20
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
GRCLOSE Morphological closing on graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
grDilate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 419
GRDILATE Morphological dilation on graph.

   LBL2 = grDilate(EDGES, LBL1)
   Each label of the graph is assigned the highest label of its
   neighbours, or it keeps the same label this one is bigger.

   Example
   grDilate

   See also
   grErode, grOpen, grClose


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-20
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
GRDILATE Morphological dilation on graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
grEdgeLengths


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 562
GREDGELENGTHS  Compute length of edges in a geometric graph.

   LENGTHS = grEdgeLengths(NODES, EDGES)

   Example
     % create a basic graph and display it
     nodes = [10 10;20 10;10 20;20 20;27 15];
     edges = [1 2;1 3;2 4;2 5;3 4;4 5];
     figure; drawGraph(nodes, edges);
     hold on; drawNodeLabels(nodes, 1:5)
     axis equal; axis([0 40 0 30]);
     % compute list of nodes adjacent to node with index 2
     grEdgeLengths(nodes, edges)'
     ans =
          10.0000   10.0000   10.0000    8.6023   10.0000    8.6023

   See also




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
GREDGELENGTHS  Compute length of edges in a geometric graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
grErode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 417
GRERODE Morphological erosion on graph.

   LBL2 = grErode(EDGES, LBL1)
   Each label of the graph is assigned the smallest label of its
   neighbours, or it keeps the same label this one is smaller.

   Example
   grErode

   See also
   grDilate, grOpen, grClose

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-20
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
GRERODE Morphological erosion on graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
grFaceToPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 808
GRFACETOPOLYGON Compute the polygon corresponding to a graph face.

   PTS2 = grFaceToPolygon(NODES, EDGES, FACES, INDF)
   PTS2 = grFaceToPolygon(NODES, FACES, INDF)
   Where NODES, EDGES, and FACES are internal data of graph, and INDF is
   the index of the face to extract. The result is the (ordered) set of
   points composing the face.

   
   PTS2 = grFaceToPolygon(GRAPH, INDF)
   use structure representation for graph. The structure GRAPH must
   contain data for fields 'nodes' and 'faces'.
   
   If several indices face indices are specified, result is a cell array
   of polygons.

   The number of columns of PTS2 is the same as for NODES.


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2005-11-30
 Copyright 2005 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
GRFACETOPOLYGON Compute the polygon corresponding to a graph face.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
grFindGeodesicPath


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 575
GRFINDGEODESICPATH Find a geodesic path between two nodes in the graph.

   PATH = grFindGeodesicPath(NODES, EDGES, NODE1, NODE2, WEIGHTS)
   NODES and EDGES defines the graph, NODE1 and NODE2 are indices of the
   node extremities, and WEIGHTS is the set of weights associated to each
   edge.
   The function returns a set of edge indices.


   See also
   grFindMaximalLengthPath

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2011-05-22,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2011 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
GRFINDGEODESICPATH Find a geodesic path between two nodes in the graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
grFindMaximalLengthPath


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 994
GRFINDMAXIMALLENGTHPATH Find a path that maximizes sum of edge weights.

   PATH = grFindMaximalLengthPath(NODES, EDGES, EDGE_WEIGHTS);
   Finds a greatest geodesic path in the graph. A path between two nodes
   is a succession of adjacent edges that link the first and last nodes.
   the length of the path is the sum of weights of edges that constitute
   the path.
   A geodesic path is a path that minimizes the length of the path among
   the set of paths between the nodes.
   A maximal length path maximizes the length of the geodesic path between
   couples of nodes in the graph

   The result PATH is the list of edge indices that constitutes the path.

   PATH = grFindMaximalLengthPath(NODES, EDGES);
   Assumes each edge has a weight equal to 1.

   See Also
   grFindGeodesicPath

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2011-05-22,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2011 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
GRFINDMAXIMALLENGTHPATH Find a path that maximizes sum of edge weights.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
grLabel


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 716
GRLABEL Associate a label to each connected component of the graph.

   LABELS = grLabel(NODES, EDGES)
   Returns an array with as many rows as the array NODES, containing index
   number of each connected component of the graph. If the graph is
   totally connected, returns an array of 1.

   Example
       nodes = rand(6, 2);
       edges = [1 2;1 3;4 6];
       labels = grLabel(nodes, edges);
   labels =
       1
       1
       1
       2
       3
       2   

   See also
   getNeighborNodes


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2007-08-14,    using Matlab 7.4.0.287 (R2007a)
 Copyright 2007 INRA - BIA PV Nantes - MIAJ Jouy-en-Josas.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
GRLABEL Associate a label to each connected component of the graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
grMean


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 400
GRMEAN Compute mean from neihgbours.

   LBL2 = grMean(EDGES, LBL1)
   new label for each node of the graph is computed as the mean of the
   values of neighbours and of old value.

   Example
   grMean

   See also
   grMedian, grDilate, grErode


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-20
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
GRMEAN Compute mean from neihgbours.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
grMedian


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 408
GRMEDIAN Compute median from neihgbours.

   LBL2 = grMedian(EDGES, LBL1)
   new label for each node of the graph is computed as the median of the
   values of neighbours and of old value.

   Example
   grMedian

   See also
   grMean, grDilate, grErode


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-20
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
GRMEDIAN Compute median from neihgbours.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
grMergeMultipleEdges


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 196
GRMERGEMULTIPLEEDGES Remove all edges sharing the same extremities.

   [NODES2, EDGES2] = grMergeMultipleEdges(NODES, EDGES)
   Remove configuration with two edges sharing the same 2 nodes.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
GRMERGEMULTIPLEEDGES Remove all edges sharing the same extremities.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
grMergeMultipleNodes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 507
GRMERGEMULTIPLENODES Simplify a graph by merging multiple nodes.

   OUTPUT = grMergeMultipleNodes(INPUT);
   simplify the graph INPUT, and return the result in the graph OUTPUT.
   format for input can be one of
   nodes, edges

   Two steps in the procedure :
   * first remove multiple nodes. find all nodes with same coords, and
       keep only one
   * remove edges that link same nodes

   -----
   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 09/08/2004.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
GRMERGEMULTIPLENODES Simplify a graph by merging multiple nodes.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
grMergeNodeClusters


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 452
GRMERGENODECLUSTERS Merge cluster of connected nodes in a graph.

   grMergeNodeClusters(nodes, edges)
   Detects groups of nodes that belongs to the same global node, and
   replace them by a unique node. Coordinates of reference node is given
   by the median coordinates of cluster nodes.

   This function is intended to be used as filter after a binary image
   skeletonization and vectorization.


   See Also
   grMergeNodesMedian




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
GRMERGENODECLUSTERS Merge cluster of connected nodes in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
grMergeNodes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 643
GRMERGENODES Merge two (or more) nodes in a graph.

 usage:
   [NODES2 EDGES2] = grMergeNodes(NODES, EDGES, NODE_INDS)
   NODES and EDGES are wo arrays representing a graph, and NODE_INDS is
   the set of indices of the nodes to merge.
   The nodes corresponding to indices in NODE_INDS are removed from the
   list, and edges between two nodes are removed.

   Example: merging of lables 1 and 2
   Edges:         Edges2:
   [1 2]           [1 3]
   [1 3]           [1 4]
   [1 4]           [3 4]
   [2 3]
   [3 4]
   

   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 30/06/2004.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
GRMERGENODES Merge two (or more) nodes in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
grMergeNodesMedian


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 357
GRMERGENODESMEDIAN Replace several nodes by their median coordinate.

   [NODES2, EDGES2] = grMergeNodesMedian(NODES, EDGES, NODES2MERGE)
   NODES ans EDGES are the graph structure, and NODES2MERGE is the list of
   indices of nodes to be merged.
   The median coordinate of merged nodes is computed, and all nodes are
   merged to this new node.





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
GRMERGENODESMEDIAN Replace several nodes by their median coordinate.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
grNodeDegree


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1066
GRNODEDEGREE Degree of a node in a (undirected) graph.

   DEGREE = grNodeDegree(NODE_INDEX, EDGES);
   return the degree of a node in the given edge list, that is the number
   of edges connected to it.
   NODE_INDEX is the index of the node, and EDGES is a liste of couples of
   indices (origin and destination node).   
   This degree is the sum of inner degree (number of edges arriving on the
   node) and the outer degree (number of emanating edges).
  
   Note: Also works when NODE_INDEX is a vector of indices

   DEGREE = grNodeDegree(EDGES);
   Return the degree of each node references by the array EDGES. DEGREE is
   a column vector with as many rows as the number of nodes referenced by
   edges.

   [DEG, INDS] = grNodeDegree(EDGES);
   Also returns the indices of the nodes that were referenced.
   
   Example
     edges = [1 2;1 3;2 3;2 4;3 4];
     grNodeDegree(2, edges)
     ans =
          3
     grNodeDegree(edges)'
     ans =
          2     3     3     2

   See Also: grNodeInnerDegree, grNodeOuterDegree




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
GRNODEDEGREE Degree of a node in a (undirected) graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
grNodeInnerDegree


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 573
GRNODEINNERDEGREE Inner degree of a node in a graph.

   DEG = grNodeInnerDegree(NODE, EDGES);
   Returns the inner degree of a node in the given edge list, i.e. the
   number of edges arriving to it.
   NODE is the index of the node, and EDGES is a liste of couples of
   indices (origin and destination node).   
 
   Note: Also works when node is a vector of indices

   See Also:
   grNodeDegree, grNodeOuterDegree


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-17
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
GRNODEINNERDEGREE Inner degree of a node in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
grNodeOuterDegree


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 577
GRNODEOUTERDEGREE Outer degree of a node in a graph.

   DEG = grNodeOuterDegree(NODE, EDGES);
   Returns the outer degree of a node in the given edge list, i.e. the
   number of edges emanating from it.
   NODE is the index of the node, and EDGES is a liste of couples of
   indices (origin and destination node).   
 
   Note: Also works when node is a vector of indices

   See Also: 
   grNodeDegree, grNodeInnerDegree


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-17
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
GRNODEOUTERDEGREE Outer degree of a node in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
grOpen


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 385
GROPEN Morphological opening on graph.

   LBL2 = grOpen(EDGES, LBL1)
   The labels are the result of a morphological erosion followed by a
   morphological dilation.

   Example
   grOpen

   See also
   grClose, grErode, grDilate


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2006-01-20
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
GROPEN Morphological opening on graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
grOppositeNode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 523
GROPPOSITENODE Return opposite node in an edge.

   NODE2 = grOppositeNode(EDGE, NODE);
   Return the index of the node opposite to NODE in EDGE.
   If the edge does not contain node NODE, result is 0.

   Works also if EDGE is a N-by-2 array of source and target vertex
   indices, in this case the result NODE2 has as many rows as the number
   of edges.

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07
 Copyright 2006 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
GROPPOSITENODE Return opposite node in an edge.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
grPropagateDistance


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1158
GRPROPAGATEDISTANCE Propagates distances from a vertex to other vertices.

   DISTS = grPropagateDistance(V, E, V0, L)
   V0 is index of initial vertex
   E is array of source and target vertices
   L is the vector of length of each edge. If not specified, length 1 is
       assumed for all edges.
   The result DISTS is a column array with as many rows as the number of
   vertices, containing the geodesic distance of each vertex to the vertex
   of index V0.

   Example
     nodes = [20 20;20 50;20 80;50 50;80 20;80 50;80 80];
     edges = [1 2;2 3;2 4;4 6;5 6;6 7];
     figure; drawGraph(nodes, edges);
     axis([0 100 0 100]); axis equal; hold on
     DISTS = grPropagateDistance(nodes, edges, 2)
     DISTS = 
          1
          0
          1
          1
          3
          2
          3
     drawNodeLabels(nodes+1, DISTS);

   See Also
   graphRadius, graphCenter, graphDiameter, graphPeripheralVertices
   grVertexEccentricity

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
GRPROPAGATEDISTANCE Propagates distances from a vertex to other vertices.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
grRemoveEdge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 317
GRREMOVEEDGE Remove an edge in a graph.

   [NODES2 EDGES2] = grRemoveEdge(NODES, EDGES, EDGE2REMOVE)
   Remove an edge in the edges list, and return the modified graph.
   The NODES array is not modified.

   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 13/08/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
GRREMOVEEDGE Remove an edge in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
grRemoveEdges


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 330
GRREMOVEEDGES Remove several edges from a graph.

   [NODES2 EDGES2] = grRemoveEdges(NODES, EDGES, EDGES2REMOVE)
   Remove some edges in the edges list, and return the modified graph.
   The NODES array is not modified.

   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 13/08/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
GRREMOVEEDGES Remove several edges from a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
grRemoveMultiplePoints


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 286
GRREMOVEMULTIPLEPOINTS Remove groups of close nodes in a graph.

   grRemoveMultiplePoints(nodes, edges)
   Detects groups of nodes that belongs to the same global node.
   This function is intended to be used as filter after a binary image
   skeletonization and vectorization.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
GRREMOVEMULTIPLEPOINTS Remove groups of close nodes in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
grRemoveNode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 341
GRREMOVENODE Remove a node in a graph.
 
   usage:
   [NODES2 EDGES2] = grRemoveNode(NODES, EDGES, NODE2REMOVE)
   remove the node with index NODE2REMOVE from array NODES, and also
   remove edges containing the node NODE2REMOVE.

   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 13/08/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
GRREMOVENODE Remove a node in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
grRemoveNodes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 645
GRREMOVENODES Remove several nodes in a graph.

   usage:
   [NODES2 EDGES2] = grRemoveNodes(NODES, EDGES, NODES2REMOVE)
   remove the nodes with indices NODE2REMOVE from array NODES, and also
   remove edges containing the nodes NODE2REMOVE.

   Example
     nodes = [...
         10 10; 20 10; 30 10; ...
         10 20; 20 20; 30 20];
     edges = [...
         1 2; 1 4; 1 5; ...
         2 3; 2 5; 2 6; ...
         3 6; 4 5; 5 6];
     toRemove = [3 4];
     [nodes2 edges2] = grRemoveNodes(nodes, edges, toRemove);
     drawGraph(nodes2, edges2);
     axis equal; axis([0 40 0 30]);

   See also
     grRemoveEdges




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
GRREMOVENODES Remove several nodes in a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
grShortestPath


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 957
GRSHORTESTPATH Find a shortest path between two nodes in the graph.

   PATH = grShortestPath(NODES, EDGES, NODE1, NODE2, WEIGHTS)
   NODES and EDGES defines the graph, NODE1 and NODE2 are indices of the
   node extremities, and WEIGHTS is the set of weights associated to each
   edge.
   The function returns a set of node indices.

   PATH = grShortestPath(NODES, EDGES, NODEINDS, WEIGHTS)
   Specifies two or more points that must be traversed by the path, in the
   specified order.

   % Create a simple tree graph, and compute shortest path
     [x y] = meshgrid([10 20 30], [10 20 30]);
     nodes = [x(:) y(:)];
     edges = [1 2;2 3;2 5;3 6; 4 5;4 7;5 8; 8 9];
     drawGraph(nodes, edges)
     axis equal; axis([0 40 0 40]);
     drawNodeLabels(nodes, 1:9)
     path = grShortestPath(nodes, edges, 1, 9);
     % same as:
     path = grShortestPath(nodes, edges, [1 9]);

   See also
     graphs, grFindMaximalLengthPath




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
GRSHORTESTPATH Find a shortest path between two nodes in the graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
grSimplifyBranches


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 363
GRSIMPLIFYBRANCHES Replace branches of a graph by single edges.

   [NODES2 EDGES2] = grSimplifyBranches(NODES, EDGES)
   renvoie une version simplifiee d'un graphe, en ne gardant que les 
   points multiples et les aretes reliant les points multiples.

   -----

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 13/08/2003.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
GRSIMPLIFYBRANCHES Replace branches of a graph by single edges.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
grSimplifyBranches_old


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 289
GRSIMPLIFYBRANCHES_OLD Replace branches of a graph by single edges.

   [NODES2 EDGES2] = grSimplifyBranches(NODES, EDGES)
   Replaces each branch (composed of a series of edges connected only by
   2-degree nodes) by a single edge, whose extremities are nodes with
   degree >= 3.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
GRSIMPLIFYBRANCHES_OLD Replace branches of a graph by single edges.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
grVertexEccentricity


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1005
GRVERTEXECCENTRICITY Eccentricity of vertices in the graph.

   G = grVertexEccentricity(V, E, L)
   V is the array of vertices
   E is the array of edges
   L is a column vector containing length of each edge (assumes 1 for each
   edge if not specified).
   G is the maximal geodesic length of each vertex.

   G = grVertexEccentricity(V, E, L, INDV)
   Compute eccentricity only for vertices whose index is given in INDV.

   Example
     nodes = [20 20;20 50;20 80;50 50;80 20;80 50;80 80];
     edges = [1 2;2 3;2 4;4 6;5 6;6 7];
     figure; drawGraph(nodes, edges);
     axis([0 100 0 100]); axis equal; hold on
     G = grVertexEccentricity(nodes, edges);
     drawNodeLabels(nodes+2, G);

   See Also
   graphRadius, graphCenter, graphDiameter, graphPeripheralVertices
   grPropagateDistance

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
GRVERTEXECCENTRICITY Eccentricity of vertices in the graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
graph2Contours


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
ok<INUSL>



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
ok<INUSL>




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
graphCenter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 975
GRAPHCENTER Center of a graph.

   CENTER = graphCenter(V, E)
   Computes the center of the graph given by V and E. The center of the
   graph is the set of vertices whose eccentricity is minimal. The
   function returns indices of center vertices.

   CENTER = graphCenter(V, E, L)
   Specifies the weight of each edge for computing the distances. Default
   is to consider a weight of 1 for each edge.

   Example
     nodes = [20 20;20 50;20 80;50 50;80 20;80 50;80 80];
     edges = [1 2;2 3;2 4;4 6;5 6;6 7];
     figure; drawGraph(nodes, edges);
     axis([0 100 0 100]); axis equal; hold on
     C = graphCenter(nodes, edges)
     C = 
         4  

   See Also
   grPropagateDistance, grVertexEccentricity
   graphRadius, graphDiameter, graphPeripheralVertices


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
GRAPHCENTER Center of a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
graphDiameter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 929
GRAPHDIAMETER Diameter of a graph.

   D = graphDiameter(V, E)
   Computes the diameter of the graph given by V and E. The diameter of
   the graph is the greatest eccentricity over all vertices in the graph.

   D = graphDiameter(V, E, L)
   Specifies the weight of each edge for computing the distances. Default
   is to consider a weight of 1 for each edge.

   Example
     nodes = [20 20;20 50;20 80;50 50;80 20;80 50;80 80];
     edges = [1 2;2 3;2 4;4 6;5 6;6 7];
     figure; drawGraph(nodes, edges);
     axis([0 100 0 100]); axis equal; hold on
     D = graphDiameter(nodes, edges)
     D = 
         4

   See Also
   grPropagateDistance, grVertexEccentricity
   graphCenter, graphRadius, graphPeripheralVertices


 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
GRAPHDIAMETER Diameter of a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
graphPeripheralVertices


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 955
GRAPHPERIPHERALVERTICES Peripheral vertices of a graph.

   INDS = graphPeripheralVertices(V, E)
   Return indices of peripheral vertices, that is, vertices whose
   eccentricity is maximal and equal to the diameter of the graph.

   INDS = graphPeripheralVertices(V, E, L)
   Specify length of each edge. Default is 1 for each edge.


   Example
     nodes = [20 20;20 50;20 80;50 50;80 20;80 50;80 80];
     edges = [1 2;2 3;2 4;4 6;5 6;6 7];
     figure; drawGraph(nodes, edges);
     axis([0 100 0 100]); axis equal; hold on
     INDP = graphPeripheralVertices(nodes, edges);
     INDP = 
         1
         3
         5
         7
         

   See Also
   grPropagateDistance, grVertexEccentricity
   graphCenter, graphDiameter, graphRadius

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
GRAPHPERIPHERALVERTICES Peripheral vertices of a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
graphRadius


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 916
GRAPHRADIUS Radius of a graph.

   R = graphRadius(V, E)
   Computes the radius of the graph given by V and E. The radius of the
   graph is the smallest eccentricity over all vertices in the graph.

   R = graphRadius(V, E, L)
   Specifies the weight of each edge for computing the distances. Default
   is to consider a weight of 1 for each edge.

   Example
     nodes = [20 20;20 50;20 80;50 50;80 20;80 50;80 80];
     edges = [1 2;2 3;2 4;4 6;5 6;6 7];
     figure; drawGraph(nodes, edges);
     axis([0 100 0 100]); axis equal; hold on
     R = graphRadius(nodes, edges)
     R = 
          2

   See Also
   grPropagateDistance, grVertexEccentricity
   graphCenter, graphDiameter, graphPeripheralVertices

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-09-07,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
GRAPHRADIUS Radius of a graph.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
imageGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 407
IMAGEGRAPH Create equivalent graph of a binary image.

   [N E] = imageGraph(IMG);
   or 
   [N E F] = imageGraph(IMG);
   create graph representing adjacencies in image. N is the array of
   nodes, E is the array of edges, and F is a 4-columns array containing
   indices of vertices of each face.
   IMG can be either 2D or 3D image.
   This functions uses only 4 neighbors in 2D, and 6 neighbors in 3D.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
IMAGEGRAPH Create equivalent graph of a binary image.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
knnGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 221
KNNGRAPH Create the k-nearest neighbors graph of a set of points.

   EDGES = knnGraph(NODES)

   Example
   nodes = rand(10, 2);
   edges = knnGraph(nodes);
   drawGraph(nodes, edges);

   See also
     graphs



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
KNNGRAPH Create the k-nearest neighbors graph of a set of points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
mergeGraphs


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 81
MERGEGRAPHS Merge two graphs, by adding nodes, edges and faces lists. .

   




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
MERGEGRAPHS Merge two graphs, by adding nodes, edges and faces lists. .



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
meshEnergy


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 118
MESHENERGY  One-line description here, please.

   output = meshEnergy(input)

   Example
   meshEnergy

   See also




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
MESHENERGY  One-line description here, please.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
patchGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ok<INUSL>



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ok<INUSL>




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
prim_mst


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 223
PRIM_MST Minimal spanning tree by Prim's algorithm.

   EDGES2 = prim_mst(EDGES, VALUES)
   Compute the minimal spanning tree (MST) of the graph with edges given
   by EDGES, and whose edges are valuated by VALUES.





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
PRIM_MST Minimal spanning tree by Prim's algorithm.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
pruneGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 535
PRUNEGRAPH Remove all edges with a terminal vertex.

   [NODES2, EDGES2] = pruneGraph(NODES, EDGES)

   Example
     nodes = [...
         10 30; 30 30; 20 45; 50 30; 40 15; 70 30; 90 30; 80 15; 100 45];
     edges = [1 2;2 3;2 4;4 5;4 6;6 7;6 8;7 8;7 9];
     figure; 
     subplot(2, 1, 1); drawGraph(nodes, edges); 
     axis equal; axis([0 110 10 50]);
     [nodes2, edges2] = pruneGraph(nodes, edges);
     subplot(2, 1, 2); drawGraph(nodes2, edges2); 
     axis equal; axis([0 110 10 50]);

   See also
   graphs



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 51
PRUNEGRAPH Remove all edges with a terminal vertex.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
quiverToGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 359
QUIVERTOGRAPH Converts quiver data to quad mesh.

   [V E] = quiverToGraph(x, y, dx, dy)
   x, y, dx and dy are matrices the same dimension, typically ones used
   for display using 'quiver'.
   V and E are vertex coordinates, and edge vertex indices of the graph
   joining end points of vector arrows.

   Example
   quiverToGraph

   See also




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
QUIVERTOGRAPH Converts quiver data to quad mesh.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
readGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 447
READGRAPH Read a graph from a text file.

   [NODES EDGES] = readGraph(FILENAME)

   Example
     % create a basic graph, save it to a file, and read it again
     nodes = [10 10;20 10;10 20;20 20;27 15];
     edges = [1 2;1 3;2 4;2 5;3 4;4 5];
     writeGraph(nodes, edges, 'simpleGraph.txt');
     [n2 e2] = readGraph('simpleGraph.txt');
     figure; drawGraph(n2, e2); axis equal; axis([0 40 0 30]);

   See also
     writeGraph




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
READGRAPH Read a graph from a text file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
relativeNeighborhoodGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 574
RELATIVENEIGHBORHOODGRAPH Relative Neighborhood Graph of a set of points.

   [NODES, EDGES] = relativeNeighborhoodGraph(POINTS)
   EDGES = relativeNeighborhoodGraph(POINTS)

   The Relative Neighborhood Graph (RNG) is a subgraph of the Delaunay
   Triangulation computed from the same set of points. The Gabriel graph
   and the euclidean minimal spanning tree (EMST) are subgraphs of the
   RNG.

   Example
     nodes = rand(100, 2) * 100;
     edges = relativeNeighborhoodGraph(nodes);
     figure; drawGraph(nodes, edges);

   See also
     gabrielGraph, euclideanMST




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
RELATIVENEIGHBORHOODGRAPH Relative Neighborhood Graph of a set of points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
voronoi2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 311
VORONOI2D Compute a voronoi diagram as a graph structure.
   
   [NODES, EDGES, FACES] = voronoi2d(GERMS)
   GERMS an array of points with dimension 2
   NODES, EDGES, FACES: usual graph representation, FACES as cell array

   Example
   [n e f] = voronoi2d(rand(100, 2)*100);
   drawGraph(n, e);

   See also




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
VORONOI2D Compute a voronoi diagram as a graph structure.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
writeGraph


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 501
WRITEGRAPH Write a graph to an ascii file.

   writeGraph(NODES, EDGES, FILENAME)

   Example
     % create a basic graph and save it to a file
     nodes = [10 10;20 10;10 20;20 20;27 15];
     edges = [1 2;1 3;2 4;2 5;3 4;4 5];
     writeGraph(nodes, edges, 'simpleGraph.txt');

   See also
     readGraph

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2014-01-20,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2014 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
WRITEGRAPH Write a graph to an ascii file.





