Class Graph
Represents an oriented or unoriented weighted graph.
Inherited Members
Namespace: OpenCV.Net
Assembly: OpenCV.Net.dll
Syntax
public class Graph : Set
Properties
| Improve this Doc View SourceEdgeCount
Gets the total number of edges in the graph.
Declaration
public int EdgeCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
HeaderSize
Gets the size of the Graph header, in bytes.
Declaration
public static int HeaderSize { get; }
Property Value
Type | Description |
---|---|
Int32 |
VertexCount
Gets the total number of vertices in the graph.
Declaration
public int VertexCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceClear()
Removes all vertices and edges from the graph.
Declaration
public override void Clear()
Overrides
| Improve this Doc View SourceClone(MemStorage)
Creates a full copy of the graph.
Declaration
public Graph Clone(MemStorage storage = null)
Parameters
Type | Name | Description |
---|---|---|
MemStorage | storage | The destination MemStorage instance on which to store the new graph.
If |
Returns
Type | Description |
---|---|
Graph | A new Graph instance that is a copy of this graph. |
GetVertexDegree(Int32)
Counts the number of edges incident to the vertex.
Declaration
public int GetVertexDegree(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the graph vertex. |
Returns
Type | Description |
---|---|
Int32 | The number of edges incident to the vertex. |
RemoveEdge(Int32, Int32)
Removes an edge from the graph.
Declaration
public void RemoveEdge(int startIndex, int endIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | startIndex | The index of the starting vertex of the edge. |
Int32 | endIndex | The index of the ending vertex of the edge. |
RemoveVertex(Int32)
Removes a vertex from the graph.
Declaration
public int RemoveVertex(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the removed vertex. |
Returns
Type | Description |
---|---|
Int32 | The number of edges deleted. |