void EdgeTable::__buildEdgeTableForOneEdge(const int triID, const int v0, const int v1, void *userdata) { //if exist in one list, then already processed this edge _EdgeTableElementStruct *pedge; _VertexEdgeTablePointer *p = inEdgeList(m_ppVETP[v1], v0); if (p){ pedge=p->m_pEdgeTableElement; if (pedge->m_nT1==-1) pedge->m_nT1 = triID; return; } //if not, insert into both vertices const int va = _MIN_(v0, v1); const int vb = _MAX_(v0, v1); pedge = allocEdgeElement(va, vb, triID, -1, userdata); //alloc a pointer and insert into the list _VertexEdgeTablePointer *pp = allocEdgePointor(); pp->m_pEdgeTableElement = pedge; pp->m_pNext = m_ppVETP[v0], m_ppVETP[v0] = pp; pp = allocEdgePointor(); pp->m_pEdgeTableElement = pedge; pp->m_pNext = m_ppVETP[v1], m_ppVETP[v1] = pp; }
void followInEdge(Trav *to, Trav *from) { Node *n = &elem(to->match); ElemList *edges = inEdgeList(n); EdgeId e; unmatchNodeAndEdge(from); e = traverse(edges, from, from->p); if (success) matchNodeAndEdge(from, e, source(&elem(e)) ); }