CvGraphGraphAddEdgeByPtr Method (CvGraphEdge, CvGraphEdge, CvGraphEdge, IntPtr) OpenCvSharp Class Library
Adds edge to graph

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public int GraphAddEdgeByPtr(
	CvGraphEdge startVtx,
	CvGraphEdge endVtx,
	CvGraphEdge edge,
	IntPtr insertedEdge
)

Parameters

startVtx
Type: OpenCvSharpCvGraphEdge
Starting vertex of the edge.
endVtx
Type: OpenCvSharpCvGraphEdge
Ending vertex of the edge. For unoriented graph the order of the vertex parameters does not matter.
edge
Type: OpenCvSharpCvGraphEdge
Optional input parameter, initialization data for the edge.
insertedEdge
Type: SystemIntPtr
Optional output parameter to contain the address of the inserted edge.

Return Value

Type: Int32
The function cvGraphAddEdge connects two specified vertices. The function returns 1 if the edge has been added successfully, 0 if the edge connecting the two vertices exists already and -1 if either of the vertices was not found, the starting and the ending vertex are the same or there is some other critical situation. In the latter case (i.e. when the result is negative) the function also reports an error by default.
See Also

Reference