# doc-cache created by Octave 5.1.0
# name: cache
# type: cell
# rows: 3
# columns: 17
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
boundedVoronoi2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 384
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
     boundedCentroidalVoronoi2d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
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: 1374
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 centroid of each domain are computed, and used as germs of the
   next iteration

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

   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 30)
   * '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
   centroidalVoronoi2d

   See also
   graphs, boundedVoronoi2d

   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: 67
CENTROIDALVORONOI2D Centroidal Voronoi tesselation within a polygon



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 536
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
   clipGraph

   See also
   drawGraph, clipGraphPolygon




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
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: 414
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.


   See also
   drawGraph, clipGraph




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 503
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: 49
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: 839
 -- Function File: [POINTS EDGES]= delaunayGraph (POINTS)
     Graph associated to Delaunay triangulation of input 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.

     WARNING: 3d pltottig works correctly in Octave >= 3.6

     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.


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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1695
 -- Function File: drawGraph (NODES, EDGES)
 -- Function File: drawGraph (NODES, EDGES, FACES)
 -- Function File: drawGraph (GRAPH)
 -- Function File: drawGraph (..., SNODES)
 -- Function File: drawGraph (..., SNODES, SEDGES)
 -- Function File: drawGraph (..., SNODES, SEDGES, SFACES)
 -- Function File: H = drawGraph (...)
 -- Function File: [H HE] = drawGraph (...)
 -- Function File: [H HE HF] = drawGraph (...)
     Draw a graph, given as a set of vertices and edges

     DRAWGRAPH(NODES, EDGES) draw a graph specified by a set of nodes
     (array N*2 or N*3, corresponding to coordinate of each node), and a
     set of edges (an array Ne*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 draw 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) specify the draw mode for
     each element, as in the classical 'plot' function.  To not display
     some elements, uses 'none'.

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

     [HN, HE] = DRAWGRAPH(...)  return handle to the set of nodes and to
     the set of edges.

     [HN, HE, HF] = DRAWGRAPH(...)  Also return handle to the set of
     faces.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
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: 699
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 
   drawGraph

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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
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: 498
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: 80
DRAWNODELABELS Draw values associated to graph nodes
 
   Usage:
   drawNodeL...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 294
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: 59
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: 819
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: 59
GRADJACENTNODES Find list of nodes adjacent to a given node



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 531
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




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 318
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: 47
GRREMOVEEDGES Remove several edges from a graph



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 931
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: 66
GRSHORTESTPATH Find a shortest path between two nodes in the graph



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5099
 -- Function File: graphs_Contents ()
     GRAPHS Simple Toolbox for manipulating Geometric Graphs Version 0.5
     11-Apr-2010 .

     The aim of this package is to provides functions to easily create,
     modify and display geometric graphs (geometric in a sense position
     of vertices is kept in memory).

     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: *
     edges * faces * cells 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 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 knnGraph - Create the k-nearest neighbors graph of a
     set of points 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

     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.  vectorize
     - Transform a binary skeleton into a graph (nodes and edges)

     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
     grNeighborNodes - Find adjacent nodes of a given node
     grNeighborEdges - Find adjacent edges of 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 processing (general applications) 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

     Geodesic operations 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

     Operations for geometric graphs 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 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

     Voronoi Graphs voronoi2d - Compute a voronoi diagram as a graph
     structure boundedVoronoi2d - Return a bounded voronoi diagram as a
     graph structure centroidalVoronoi2d - Create a 2D Centroidal
     Voronoi Tesselation cvtUpdate - Update germs of a CVT with given
     points cvtIterate - Update germs of a CVT using random points with
     given density

     Graph display drawGraph - Draw a graph, given as a set of vertices
     and edges drawGraphEdges - Draw edges of a graph drawGraphFaces -
     Draw faces of a graph 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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
GRAPHS Simple Toolbox for manipulating Geometric Graphs Version 0.5
11-Apr-20...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 251
 -- Function File: EDGES = knnGrpah (NODES)
     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);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Create the k-nearest neighbors 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: 368
 -- Function File: [NODES EDGES FACES] = voronoi2d (GERMS)
     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);



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





