• Home
  • Raw
  • Download

Lines Matching refs:edge

2979         CvGraphEdge *edge = vtx->first;  in cvGraphRemoveVtxByPtr()  local
2980 if( !edge ) in cvGraphRemoveVtxByPtr()
2982 cvGraphRemoveEdgeByPtr( graph, edge->vtx[0], edge->vtx[1] ); in cvGraphRemoveVtxByPtr()
3014 CvGraphEdge *edge = vtx->first; in cvGraphRemoveVtx() local
3017 if( !edge ) in cvGraphRemoveVtx()
3019 cvGraphRemoveEdgeByPtr( graph, edge->vtx[0], edge->vtx[1] ); in cvGraphRemoveVtx()
3036 CvGraphEdge *edge = 0; in cvFindGraphEdgeByPtr() local
3056 edge = start_vtx->first; in cvFindGraphEdgeByPtr()
3057 for( ; edge; edge = edge->next[ofs] ) in cvFindGraphEdgeByPtr()
3059 ofs = start_vtx == edge->vtx[1]; in cvFindGraphEdgeByPtr()
3060 assert( ofs == 1 || start_vtx == edge->vtx[0] ); in cvFindGraphEdgeByPtr()
3061 if( edge->vtx[1] == end_vtx ) in cvFindGraphEdgeByPtr()
3067 return edge; in cvFindGraphEdgeByPtr()
3075 CvGraphEdge *edge = 0; in cvFindGraphEdge() local
3089 edge = cvFindGraphEdgeByPtr( graph, start_vtx, end_vtx ); in cvFindGraphEdge()
3093 return edge; in cvFindGraphEdge()
3107 CvGraphEdge *edge = 0; in cvGraphAddEdgeByPtr() local
3126 CV_CALL( edge = cvFindGraphEdgeByPtr( graph, start_vtx, end_vtx )); in cvGraphAddEdgeByPtr()
3127 if( edge ) in cvGraphAddEdgeByPtr()
3137 CV_CALL( edge = (CvGraphEdge*)cvSetNew( (CvSet*)(graph->edges) )); in cvGraphAddEdgeByPtr()
3138 assert( edge->flags >= 0 ); in cvGraphAddEdgeByPtr()
3140 edge->vtx[0] = start_vtx; in cvGraphAddEdgeByPtr()
3141 edge->vtx[1] = end_vtx; in cvGraphAddEdgeByPtr()
3142 edge->next[0] = start_vtx->first; in cvGraphAddEdgeByPtr()
3143 edge->next[1] = end_vtx->first; in cvGraphAddEdgeByPtr()
3144 start_vtx->first = end_vtx->first = edge; in cvGraphAddEdgeByPtr()
3146 delta = (graph->edges->elem_size - sizeof(*edge))/sizeof(int); in cvGraphAddEdgeByPtr()
3150 CV_MEMCPY_INT( edge + 1, _edge + 1, delta ); in cvGraphAddEdgeByPtr()
3151 edge->weight = _edge->weight; in cvGraphAddEdgeByPtr()
3156 CV_ZERO_INT( edge + 1, delta ); in cvGraphAddEdgeByPtr()
3157 edge->weight = 1.f; in cvGraphAddEdgeByPtr()
3165 *_inserted_edge = edge; in cvGraphAddEdgeByPtr()
3211 CvGraphEdge *edge, *next_edge, *prev_edge; in cvGraphRemoveEdgeByPtr() local
3226 for( ofs = prev_ofs = 0, prev_edge = 0, edge = start_vtx->first; edge != 0; in cvGraphRemoveEdgeByPtr()
3227 prev_ofs = ofs, prev_edge = edge, edge = edge->next[ofs] ) in cvGraphRemoveEdgeByPtr()
3229 ofs = start_vtx == edge->vtx[1]; in cvGraphRemoveEdgeByPtr()
3230 assert( ofs == 1 || start_vtx == edge->vtx[0] ); in cvGraphRemoveEdgeByPtr()
3231 if( edge->vtx[1] == end_vtx ) in cvGraphRemoveEdgeByPtr()
3235 if( !edge ) in cvGraphRemoveEdgeByPtr()
3238 next_edge = edge->next[ofs]; in cvGraphRemoveEdgeByPtr()
3244 for( ofs = prev_ofs = 0, prev_edge = 0, edge = end_vtx->first; edge != 0; in cvGraphRemoveEdgeByPtr()
3245 prev_ofs = ofs, prev_edge = edge, edge = edge->next[ofs] ) in cvGraphRemoveEdgeByPtr()
3247 ofs = end_vtx == edge->vtx[1]; in cvGraphRemoveEdgeByPtr()
3248 assert( ofs == 1 || end_vtx == edge->vtx[0] ); in cvGraphRemoveEdgeByPtr()
3249 if( edge->vtx[0] == start_vtx ) in cvGraphRemoveEdgeByPtr()
3253 assert( edge != 0 ); in cvGraphRemoveEdgeByPtr()
3255 next_edge = edge->next[ofs]; in cvGraphRemoveEdgeByPtr()
3261 cvSetRemoveByPtr( graph->edges, edge ); in cvGraphRemoveEdgeByPtr()
3294 CvGraphEdge *edge; in cvGraphVtxDegreeByPtr() local
3304 for( edge = vertex->first, count = 0; edge; ) in cvGraphVtxDegreeByPtr()
3307 edge = CV_NEXT_GRAPH_EDGE( edge, vertex ); in cvGraphVtxDegreeByPtr()
3321 CvGraphEdge *edge; in cvGraphVtxDegree() local
3335 for( edge = vertex->first, count = 0; edge; ) in cvGraphVtxDegree()
3338 edge = CV_NEXT_GRAPH_EDGE( edge, vertex ); in cvGraphVtxDegree()
3350 CvGraphEdge* edge; member
3528 CvGraphEdge* edge; in cvNextGraphItem() local
3536 edge = scanner->edge; in cvNextGraphItem()
3545 edge = vtx->first; in cvNextGraphItem()
3551 scanner->edge = vtx->first; in cvNextGraphItem()
3558 while( edge ) in cvNextGraphItem()
3560 dst = edge->vtx[vtx == edge->vtx[0]]; in cvNextGraphItem()
3562 if( !CV_IS_GRAPH_EDGE_VISITED(edge) ) in cvNextGraphItem()
3565 if( !CV_IS_GRAPH_ORIENTED( scanner->graph ) || dst != edge->vtx[0] ) in cvNextGraphItem()
3567 edge->flags |= CV_GRAPH_ITEM_VISITED_FLAG; in cvNextGraphItem()
3572 item.edge = edge; in cvNextGraphItem()
3583 scanner->edge = edge; in cvNextGraphItem()
3596 (edge->flags & CV_GRAPH_FORWARD_EDGE_FLAG) ? in cvNextGraphItem()
3598 edge->flags &= ~CV_GRAPH_FORWARD_EDGE_FLAG; in cvNextGraphItem()
3603 scanner->edge = edge; in cvNextGraphItem()
3614 edge->flags |= CV_GRAPH_FORWARD_EDGE_FLAG; in cvNextGraphItem()
3618 edge = CV_NEXT_GRAPH_EDGE( edge, vtx ); in cvNextGraphItem()
3621 if( !edge ) /* need to backtrack */ in cvNextGraphItem()
3634 edge = item.edge; in cvNextGraphItem()
3640 scanner->edge = edge; in cvNextGraphItem()
3641 scanner->dst = edge->vtx[vtx == edge->vtx[0]]; in cvNextGraphItem()
3665 scanner->edge = 0; in cvNextGraphItem()
3734 CvGraphEdge* edge = (CvGraphEdge*)reader.ptr; in cvCloneGraph() local
3736 CvGraphVtx* new_org = ptr_buffer[edge->vtx[0]->flags]; in cvCloneGraph()
3737 CvGraphVtx* new_dst = ptr_buffer[edge->vtx[1]->flags]; in cvCloneGraph()
3738 CV_CALL( cvGraphAddEdgeByPtr( result, new_org, new_dst, edge, &dstedge )); in cvCloneGraph()
3739 dstedge->flags = edge->flags; in cvCloneGraph()