MCPcopy Create free account
hub / github.com/creatale/node-dv / cvGraphAddEdge

Function cvGraphAddEdge

deps/opencv/modules/core/src/datastructs.cpp:2812–2828  ·  view source on GitHub ↗

Given two vertices, return the edge * connecting them, creating it if it * did not already exist: */

Source from the content-addressed store, hash-verified

2810 * did not already exist:
2811 */
2812CV_IMPL int
2813cvGraphAddEdge( CvGraph* graph,
2814 int start_idx, int end_idx,
2815 const CvGraphEdge* _edge,
2816 CvGraphEdge ** _inserted_edge )
2817{
2818 CvGraphVtx *start_vtx;
2819 CvGraphVtx *end_vtx;
2820
2821 if( !graph )
2822 CV_Error( CV_StsNullPtr, "" );
2823
2824 start_vtx = cvGetGraphVtx( graph, start_idx );
2825 end_vtx = cvGetGraphVtx( graph, end_idx );
2826
2827 return cvGraphAddEdgeByPtr( graph, start_vtx, end_vtx, _edge, _inserted_edge );
2828}
2829
2830
2831/* Remove the graph edge connecting two given vertices: */

Callers

nothing calls this directly

Calls 1

cvGraphAddEdgeByPtrFunction · 0.85

Tested by

no test coverage detected