25 #include <sys/types.h>
47 #define DGL_DEFINE_TREE_PROCS 1
51 #undef DGL_DEFINE_TREE_PROCS
55 #define DGL_DEFINE_FLAT_PROCS 1
59 #undef DGL_DEFINE_FLAT_PROCS
68 nDestination, fnClip, pvClipArg, pCache);
72 nDestination, fnClip, pvClipArg, pCache);
82 pgraphIn, pgraphOut, nVertex, pvVisited, fnClip, pvClipArg);
86 pgraphIn, pgraphOut, nVertex, pvVisited, fnClip, pvClipArg);
149 if (write(fd, &pgraph->
Version, 1) != 1) {
154 if (write(fd, &pgraph->
Endian, 1) != 1) {
171 for (cnt = 0; cnt < 16; cnt++) {
221 for (tot = 0, cnt = pgraph->
iNodeBuffer; tot < cnt; tot += nret) {
222 if ((nret = write(fd, &pgraph->
pNodeBuffer[tot], cnt - tot)) <= 0) {
228 for (tot = 0, cnt = pgraph->
iEdgeBuffer; tot < cnt; tot += nret) {
229 if ((nret = write(fd, &pgraph->
pEdgeBuffer[tot], cnt - tot)) <= 0) {
246 if (read(fd, &Endian, 1) != 1) {
252 #ifdef DGL_ENDIAN_BIG
274 if ((nret =
dglInitialize(pgraph, version, NodeAttrSize, EdgeAttrSize,
279 for (cnt = 0; cnt < 16; cnt++) {
358 for (tot = 0, cnt = pgraph->
iNodeBuffer; tot < cnt; tot += nret) {
359 if ((nret = read(fd, &pgraph->
pNodeBuffer[tot], cnt - tot)) <= 0) {
369 for (i = 0; i < cn; i++) {
374 for (tot = 0, cnt = pgraph->
iEdgeBuffer; tot < cnt; tot += nret) {
375 if ((nret = read(fd, &pgraph->
pEdgeBuffer[tot], cnt - tot)) <= 0) {
385 for (i = 0; i < cn; i++) {
390 pgraph->
Flags |= 0x1;
int(* dglSPClip_fn)(dglGraph_s *, dglSPClipInput_s *, dglSPClipOutput_s *, void *)
#define DGL_ENDIAN_LITTLE
#define DGL_ERR_MemoryExhausted
int(* dglSpanClip_fn)(dglGraph_s *, dglGraph_s *, dglSpanClipInput_s *, dglSpanClipOutput_s *, void *)
int dgl_dijkstra_V2(dglGraph_s *pgraph, dglSPReport_s **ppReport, dglInt32_t *pDistance, dglInt32_t nStart, dglInt32_t nDestination, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
int dgl_write_V2(dglGraph_s *pgraph, int fd)
int dgl_release_V2(dglGraph_s *pgraph)
int dgl_depthfirst_spanning_V2(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
int dgl_initialize_V2(dglGraph_s *pgraph)
int dgl_read_V2(dglGraph_s *pgraph, int fd, int version)
int dgl_minimum_spanning_V2(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
int dgl_span_minimum_spanning_V2_TREE(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
int dgl_dijkstra_V2_FLAT(dglGraph_s *pgraph, dglSPReport_s **ppReport, dglInt32_t *pDistance, dglInt32_t nStart, dglInt32_t nDestination, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
int dgl_dijkstra_V2_TREE(dglGraph_s *pgraph, dglSPReport_s **ppReport, dglInt32_t *pDistance, dglInt32_t nStart, dglInt32_t nDestination, dglSPClip_fn fnClip, void *pvClipArg, dglSPCache_s *pCache)
int dgl_span_minimum_spanning_V2_FLAT(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
int dgl_span_depthfirst_spanning_V2_FLAT(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
int dgl_span_depthfirst_spanning_V2_TREE(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
void dgl_swapInt64Bytes(dglInt64_t *pn)
void dgl_swapInt32Bytes(dglInt32_t *pn)
dglEdgePrioritizer_s edgePrioritizer
dglInt32_t aOpaqueSet[16]
dglNodePrioritizer_s nodePrioritizer
void dglTreeEdgePri32Cancel(void *pvEdgePri32, void *pvParam UNUSED)
int dglTreeEdgeCompare(const void *pvEdgeA, const void *pvEdgeB, void *pvParam UNUSED)
void dglTreeNodeCancel(void *pvNode, void *pvParam UNUSED)
int dglTreeNode2Compare(const void *pvNode2A, const void *pvNode2B, void *pvParam UNUSED)
void dglTreeNodePri32Cancel(void *pvNodePri32, void *pvParam UNUSED)
void * dglTreeGetAllocator(void)
void dglTreeEdgeCancel(void *pvEdge, void *pvParam UNUSED)
int dglInitialize(dglGraph_s *pGraph, dglByte_t Version, dglInt32_t NodeAttrSize, dglInt32_t EdgeAttrSize, dglInt32_t *pOpaqueSet)