23 #ifndef _DGL_dglGraph_s_H_
24 #define _DGL_dglGraph_s_H_
36 #define DGL_GS_FLAT 0x1
41 #define DGL_GF_COMPLETE 0x1
42 #define DGL_GF_BIPARTITE 0x2
43 #define DGL_GF_REGULAR 0x4
44 #define DGL_GF_BOUQUET 0x8
45 #define DGL_GF_DIPOLE 0x10
46 #define DGL_GF_PATH 0x20
47 #define DGL_GF_CYCLE 0x40
52 #define DGL_GO_EdgePrioritize_COST 0x10
53 #define DGL_GO_EdgePrioritize_ATTR 0x20
54 #define DGL_GO_NodePrioritize_ATTR 0x40
59 #define DGL_NS_HEAD 0x1
60 #define DGL_NS_TAIL 0x2
61 #define DGL_NS_ALONE 0x4
66 #define DGL_ES_DIRECTED 0x1
71 #define DGL_ENDIAN_BIG 1
72 #define DGL_ENDIAN_LITTLE 2
78 #define DGL_STRONGCONNECT 0x1
80 #define DGL_MERGE_EDGE 0x4
252 #define DGL_ERR_BadVersion 1
253 #define DGL_ERR_BadNodeType 2
254 #define DGL_ERR_MemoryExhausted 3
255 #define DGL_ERR_HeapError 4
256 #define DGL_ERR_UndefinedMethod 5
257 #define DGL_ERR_Write 6
258 #define DGL_ERR_Read 7
259 #define DGL_ERR_NotSupported 8
260 #define DGL_ERR_UnknownByteOrder 9
261 #define DGL_ERR_HeadNodeNotFound 10
262 #define DGL_ERR_TailNodeNotFound 11
263 #define DGL_ERR_BadEdge 12
264 #define DGL_ERR_BadOnFlatGraph 13
265 #define DGL_ERR_BadOnTreeGraph 14
266 #define DGL_ERR_NodeNotFound 15
267 #define DGL_ERR_TreeSearchError 16
268 #define DGL_ERR_UnexpectedNullPointer 17
269 #define DGL_ERR_VersionNotSupported 18
270 #define DGL_ERR_EdgeNotFound 19
271 #define DGL_ERR_NodeAlreadyExist 20
272 #define DGL_ERR_NodeIsAComponent 21
273 #define DGL_ERR_EdgeAlreadyExist 22
274 #define DGL_ERR_BadArgument 23
327 void *pvTnodeAttr,
void *pvEdgeAttr,
dglInt32_t nFlags);
342 unsigned char ab[118];
352 int cbChunk,
void *pvArg);
dglEdgePrioritizer_s * dglGet_EdgePrioritizer(dglGraph_s *pGraph)
int(* dglSPClip_fn)(dglGraph_s *, dglSPClipInput_s *, dglSPClipOutput_s *, void *)
dglInt32_t * dglGetEdge(dglGraph_s *pGraph, dglInt32_t nEdgeId)
int dglRead(dglGraph_s *pGraph, int fd)
dglInt32_t * dglNode_T_Prev(dglNodeTraverser_s *pTraverser)
int dglNode_T_Initialize(dglNodeTraverser_s *pTraverser, dglGraph_s *pGraph)
dglInt32_t * dglNodeGet_OutEdgeset(dglGraph_s *pGraph, dglInt32_t *pnNode)
void dglSet_Family(dglGraph_s *pGraph, dglInt32_t nFamily)
int dglGet_TailNodeCount(dglGraph_s *pGraph)
dglInt32_t dglNodeGet_Status(dglGraph_s *pGraph, dglInt32_t *pnNode)
int dglReadChunk(dglIOContext_s *, dglByte_t *pbChunk, int cbChunk)
int dglGet_HeadNodeCount(dglGraph_s *pGraph)
int dglErrno(dglGraph_s *pgraph)
int dglGet_Endianess(dglGraph_s *pGraph)
int dglAddEdge(dglGraph_s *pGraph, dglInt32_t nHead, dglInt32_t nTail, dglInt32_t nCost, dglInt32_t nEdge)
dglInt32_t * dglNode_T_Find(dglNodeTraverser_s *pTraverser, dglInt32_t nNodeId)
char * dglStrerror(dglGraph_s *pgraph)
int dglShortestDistanceGraph(dglGraph_s *pGraph, dglGraph_s *pGraphOut, dglInt32_t nStartNode, dglInt32_t nDestinationNode, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
dglInt64_t dglGet_Cost(dglGraph_s *pGraph)
dglInt32_t dglEdgeGet_Id(dglGraph_s *pGraph, dglInt32_t *pnEdge)
dglInt32_t * dglEdgeset_T_First(dglEdgesetTraverser_s *pTraverser)
int dglGet_Version(dglGraph_s *pGraph)
struct _dglGraph dglGraph_s
struct _dglSPClipInput dglSPClipInput_s
int(* dglWriteChunk_fn)(dglGraph_s *, unsigned char *pbChunk, int cbChunk, void *pvArg)
void dglSet_Options(dglGraph_s *pGraph, dglInt32_t nOptions)
int dglShortestPathGraph(dglGraph_s *pGraph, dglGraph_s *pGraphOut, dglInt32_t nStartNode, dglInt32_t nDestinationNode, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
int dglDepthSpanning(dglGraph_s *pgraphInput, dglGraph_s *pgraphOutput, dglInt32_t nVertexNode, dglSpanClip_fn fnClip, void *pvClipArg)
int dglGet_EdgeSize(dglGraph_s *pGraph)
int dglInitializeSPCache(dglGraph_s *pgraph, dglSPCache_s *pCache)
void dglNodeSet_Attr(dglGraph_s *pGraph, dglInt32_t *pnNode, dglInt32_t *pnAttr)
int dglRelease(dglGraph_s *pGraph)
void dglSet_Version(dglGraph_s *pGraph, int Version)
int dglGet_AloneNodeCount(dglGraph_s *pGraph)
void dglSet_Cost(dglGraph_s *pGraph, dglInt64_t nnCost)
dglInt32_t * dglEdgeGet_Attr(dglGraph_s *pGraph, dglInt32_t *pnEdge)
int dglGet_NodeCount(dglGraph_s *pGraph)
dglInt32_t * dglEdgeGet_Tail(dglGraph_s *pGraph, dglInt32_t *pnEdge)
dglInt32_t * dglEdgeGet_Head(dglGraph_s *pGraph, dglInt32_t *pnEdge)
struct _dglSPArc dglSPArc_s
dglInt32_t * dglEdgeset_T_Next(dglEdgesetTraverser_s *pTraverser)
int dglEdgeSet_Attr(dglGraph_s *pGraph, dglInt32_t *pnAttr, dglInt32_t *pnEdge)
dglNodePrioritizer_s * dglGet_NodePrioritizer(dglGraph_s *pGraph)
struct _dglSpanClipInput dglSpanClipInput_s
dglInt32_t * dglEdge_T_First(dglEdgeTraverser_s *pTraverser)
void dglReleaseSPCache(dglGraph_s *pgraph, dglSPCache_s *pCache)
int dglInitialize(dglGraph_s *pGraph, dglByte_t Version, dglInt32_t NodeAttrSize, dglInt32_t EdgeAttrSize, dglInt32_t *pOpaqueSet)
dglInt32_t dglEdgesetGet_EdgeCount(dglGraph_s *pGraph, dglInt32_t *pnOutEdgeset)
void dglFreeSPReport(dglGraph_s *pGraph, dglSPReport_s *pSPReport)
int dglShortestPath(dglGraph_s *pGraph, dglSPReport_s **ppReport, dglInt32_t nStartNode, dglInt32_t nDestinationNode, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
int dglGet_NodeSize(dglGraph_s *pGraph)
dglInt32_t * dglNodeGet_Attr(dglGraph_s *pGraph, dglInt32_t *pnNode)
int dglAddEdgeX(dglGraph_s *pGraph, dglInt32_t nHead, dglInt32_t nTail, dglInt32_t nCost, dglInt32_t nEdge, void *pvFnodeAttr, void *pvTnodeAttr, void *pvEdgeAttr, dglInt32_t nFlags)
dglInt32_t * dglNode_T_Last(dglNodeTraverser_s *pTraverser)
struct _dglSPReport dglSPReport_s
void dglIOContextRelease(dglIOContext_s *)
int dglMinimumSpanning(dglGraph_s *pgraphInput, dglGraph_s *pgraphOutput, dglInt32_t nVertexNode, dglSpanClip_fn fnClip, void *pvClipArg)
void dglNode_T_Release(dglNodeTraverser_s *pTraverser)
int dglNodeGet_OutDegree(dglGraph_s *pGraph, dglInt32_t *pnNode)
struct _dglSPClipOutput dglSPClipOutput_s
int dglDelEdge(dglGraph_s *pGraph, dglInt32_t nEdgeId)
struct _dglSpanClipOutput dglSpanClipOutput_s
void dglEdge_T_Release(dglEdgeTraverser_s *pTraverser)
int dglNodeGet_Valence(dglGraph_s *pGraph, dglInt32_t *pnNode)
int dglGet_State(dglGraph_s *pGraph)
int dglNodeGet_InDegree(dglGraph_s *pGraph, dglInt32_t *pnNode)
int dglIOContextInitialize(dglGraph_s *, dglIOContext_s *)
int dglWriteChunk(dglIOContext_s *, dglWriteChunk_fn, void *pvArg)
int dglShortestDistance(dglGraph_s *pGraph, dglInt32_t *pnDistance, dglInt32_t nStartNode, dglInt32_t nDestinationNode, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
int dglWrite(dglGraph_s *pGraph, int fd)
int dglEdge_T_Initialize(dglEdgeTraverser_s *pTraverser, dglGraph_s *pGraph, dglEdgePrioritizer_s *pEdgePrioritizer)
void dglEdgeset_T_Release(dglEdgesetTraverser_s *pTraverser)
dglInt32_t * dglEdge_T_Next(dglEdgeTraverser_s *pTraverser)
int dglFlatten(dglGraph_s *pGraph)
dglInt32_t dglGet_Options(dglGraph_s *pGraph)
dglInt32_t * dglNodeGet_InEdgeset(dglGraph_s *pGraph, dglInt32_t *pnNode)
dglInt32_t dglEdgeGet_Cost(dglGraph_s *pGraph, dglInt32_t *pnEdge)
int dglDepthComponents(dglGraph_s *pgraphInput, dglGraph_s *pgraphComponents, int cgraphComponents, dglSpanClip_fn fnClip, void *pvClipArg)
int(* dglSpanClip_fn)(dglGraph_s *, dglGraph_s *, dglSpanClipInput_s *, dglSpanClipOutput_s *, void *)
dglInt32_t * dglNode_T_First(dglNodeTraverser_s *pTraverser)
dglInt32_t * dglNode_T_Next(dglNodeTraverser_s *pTraverser)
void dglSet_Opaque(dglGraph_s *pGraph, dglInt32_t *pOpaque)
dglInt32_t * dglGet_Opaque(dglGraph_s *pGraph)
int dglUnflatten(dglGraph_s *pGraph)
int dglGet_NodeAttrSize(dglGraph_s *pGraph)
int dglGet_EdgeAttrSize(dglGraph_s *pGraph)
int dglGet_EdgeCount(dglGraph_s *pGraph)
int dglEdgeset_T_Initialize(dglEdgesetTraverser_s *pTraverser, dglGraph_s *pGraph, dglInt32_t *pnEdgeset)
void dglResetStats(dglGraph_s *pgraph)
dglInt32_t dglGet_Family(dglGraph_s *pGraph)
int dglDelNode(dglGraph_s *pGraph, dglInt32_t nNodeId)
dglInt32_t dglNodeGet_Id(dglGraph_s *pGraph, dglInt32_t *pnNode)
dglInt32_t * dglGetNode(dglGraph_s *pGraph, dglInt32_t nNodeId)
int dglAddNode(dglGraph_s *pGraph, dglInt32_t nNodeId, void *pvNodeAttr, dglInt32_t nFlags)
dglEdgePrioritizer_s edgePrioritizer
dglInt32_t aOpaqueSet[16]
dglNodePrioritizer_s nodePrioritizer
dglInt32_t nDestinationNode
dglTreeEdgePri32_s * pEdgePri32Item
dglEdgePrioritizer_s * pEdgePrioritizer