45 struct _stackItem stackItem;
46 struct _stackItem *pStackItem;
53 unsigned char *pstack =
NULL;
83 pEdgeset = _DGL_OUTEDGESET(pgraphIn, pHead);
91 stackItem.pnHead = pHead;
92 stackItem.pnEdge = pEdge;
96 &stackItem)) ==
NULL) {
104 pEdgeset = _DGL_INEDGESET(pgraphIn, pHead);
114 stackItem.pnHead = pHead;
115 stackItem.pnEdge = pEdge;
119 &stackItem)) ==
NULL) {
134 (
struct _stackItem *)
dgl_mempop(pstack, &istack,
135 sizeof(stackItem))) !=
NULL) {
136 pHead = pStackItem->pnHead;
137 pEdge = pStackItem->pnEdge;
139 if (pStackItem->iWay == 0)
140 pTail = _DGL_EDGE_TAILNODE(pgraphIn, pEdge);
142 pTail = _DGL_EDGE_HEADNODE(pgraphIn, pEdge);
145 if (
avl_find(pvVisited, &findVisited)) {
153 if (fnClip(pgraphIn, pgraphOut, &clipInput,
NULL, pvClipArg))
178 pEdgeset = _DGL_OUTEDGESET(pgraphIn, pTail);
185 stackItem.pnHead = pTail;
186 stackItem.pnEdge = pEdge;
190 &stackItem)) ==
NULL) {
198 pEdgeset = _DGL_INEDGESET(pgraphIn, pTail);
208 stackItem.pnHead = pTail;
209 stackItem.pnEdge = pEdge;
213 &stackItem)) ==
NULL) {
288 pEdgeset = _DGL_OUTEDGESET(pgraphIn, pHead);
304 pEdgeset = _DGL_INEDGESET(pgraphIn, pHead);
334 if (HeapItem.
flags == 0) {
335 if ((pHead = _DGL_EDGE_HEADNODE(pgraphIn, pEdge)) ==
NULL) {
339 if ((pTail = _DGL_EDGE_TAILNODE(pgraphIn, pEdge)) ==
NULL) {
344 else if (pgraphIn->
Version == 3) {
345 if ((pTail = _DGL_EDGE_HEADNODE(pgraphIn, pEdge)) ==
NULL) {
349 if ((pHead = _DGL_EDGE_TAILNODE(pgraphIn, pEdge)) ==
NULL) {
380 pEdgeset = _DGL_OUTEDGESET(pgraphIn, pHead);
396 pEdgeset = _DGL_OUTEDGESET(pgraphIn, pHead);
#define DGL_NODE_ATTR_PTR
int DGL_EDGESET_T_INITIALIZE_FUNC(dglGraph_s *pGraph, dglEdgesetTraverser_s *pT, dglInt32_t *pnEdgeset)
dglInt32_t * dglGetNode(dglGraph_s *pGraph, dglInt32_t nNodeId)
int DGL_ADD_EDGE_FUNC(dglGraph_s *pgraph, dglInt32_t nHead, dglInt32_t nTail, dglInt32_t nCost, dglInt32_t nEdge, void *pvHeadAttr, void *pvTailAttr, void *pvEdgeAttr, dglInt32_t nFlags)
void dglHeapFree(dglHeap_s *pheap, dglHeapCancelItem_fn pfnCancelItem)
void dglHeapInit(dglHeap_s *pheap)
int(* dglSpanClip_fn)(dglGraph_s *, dglGraph_s *, dglSpanClipInput_s *, dglSpanClipOutput_s *, void *)
dglTreeNode_s * dglTreeNodeAdd(void *pavl, dglInt32_t nKey)
#define DGL_ERR_HeadNodeNotFound
#define DGL_EDGE_STATUS(p)
#define DGL_ERR_HeapError
dglInt32_t * DGL_GET_NODE_FUNC(dglGraph_s *pgraph, dglInt32_t nodeid)
int DGL_SPAN_MINIMUM_SPANNING_FUNC(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
#define DGL_ERR_MemoryExhausted
int DGL_NODE_T_INITIALIZE_FUNC(dglGraph_s *pGraph, dglNodeTraverser_s *pT)
int DGL_SPAN_DEPTHFIRST_SPANNING_FUNC(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
unsigned char * dgl_mempop(unsigned char *pstack, long *istack, long size)
unsigned char * dgl_mempush(unsigned char *pstack, long *istack, long size, void *pv)
#define DGL_EDGE_ATTR_PTR
dglInt32_t * DGL_EDGESET_T_NEXT_FUNC(dglEdgesetTraverser_s *pT)
dglInt32_t * DGL_EDGESET_T_FIRST_FUNC(dglEdgesetTraverser_s *pT)
void DGL_NODE_T_RELEASE_FUNC(dglNodeTraverser_s *pT)
#define DGL_ERR_UnexpectedNullPointer
int dglHeapInsertMin(dglHeap_s *pheap, long key, unsigned char flags, dglHeapData_u value)
int dglHeapExtractMin(dglHeap_s *pheap, dglHeapNode_s *pnoderet)
dglInt32_t * DGL_NODE_T_FIRST_FUNC(dglNodeTraverser_s *pT)
int DGL_ADD_NODE_FUNC(dglGraph_s *pgraph, dglInt32_t nId, void *pvNodeAttr, dglInt32_t nFlags)
void DGL_EDGESET_T_RELEASE_FUNC(dglEdgesetTraverser_s *pT)