25 #include <sys/types.h>
50 #define DGL_DEFINE_TREE_PROCS 1
54 #undef DGL_DEFINE_TREE_PROCS
59 #define DGL_DEFINE_FLAT_PROCS 1
63 #undef DGL_DEFINE_FLAT_PROCS
77 nDestination, fnClip, pvClipArg, pCache);
81 nDestination, fnClip, pvClipArg, pCache);
166 if (write(fd, &pgraph->
Version, 1) != 1) {
171 if (write(fd, &pgraph->
Endian, 1) != 1) {
188 for (cnt = 0; cnt < 16; cnt++) {
238 for (tot = 0, cnt = pgraph->
iNodeBuffer; tot < cnt; tot += nret) {
239 if ((nret = write(fd, &pgraph->
pNodeBuffer[tot], cnt - tot)) <= 0) {
245 for (tot = 0, cnt = pgraph->
iEdgeBuffer; tot < cnt; tot += nret) {
246 if ((nret = write(fd, &pgraph->
pEdgeBuffer[tot], cnt - tot)) <= 0) {
264 if (read(fd, &Endian, 1) != 1) {
270 #ifdef DGL_ENDIAN_BIG
298 for (cnt = 0; cnt < 16; cnt++) {
378 for (tot = 0, cnt = pgraph->
iNodeBuffer; tot < cnt; tot += nret) {
379 if ((nret = read(fd, &pgraph->
pNodeBuffer[tot], cnt - tot)) <= 0) {
389 for (i = 0; i < cn; i++) {
394 for (tot = 0, cnt = pgraph->
iEdgeBuffer; tot < cnt; tot += nret) {
395 if ((nret = read(fd, &pgraph->
pEdgeBuffer[tot], cnt - tot)) <= 0) {
405 for (i = 0; i < cn; i++) {
410 pgraph->
Flags |= 0x1;
int dglTreeEdgeCompare(const void *pvEdgeA, const void *pvEdgeB, void *pvParam)
int dgl_span_minimum_spanning_V2_TREE(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
dglEdgePrioritizer_s edgePrioritizer
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_release_V2(dglGraph_s *pgraph)
void dglTreeNodeCancel(void *pvNode, void *pvParam)
void dglTreeEdgeCancel(void *pvEdge, void *pvParam)
int dgl_read_V2(dglGraph_s *pgraph, int fd, int version)
int dgl_span_depthfirst_spanning_V2_FLAT(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
dglNodePrioritizer_s nodePrioritizer
void dglTreeEdgePri32Cancel(void *pvEdgePri32, void *pvParam)
def version
Get GRASS version as dictionary.
void dgl_swapInt64Bytes(dglInt64_t *pn)
int dgl_write_V2(dglGraph_s *pgraph, int fd)
dglInt32_t aOpaqueSet[16]
int dglTreeNode2Compare(const void *pvNode2A, const void *pvNode2B, void *pvParam)
int dgl_depthfirst_spanning_V2(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
void dgl_swapInt32Bytes(dglInt32_t *pn)
#define DGL_ERR_MemoryExhausted
int dgl_minimum_spanning_V2(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
void * dglTreeGetAllocator()
int dgl_span_depthfirst_spanning_V2_TREE(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg)
int dgl_initialize_V2(dglGraph_s *pgraph)
#define DGL_ENDIAN_LITTLE
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)
void dglTreeNodePri32Cancel(void *pvNodePri32, void *pvParam)
int dgl_span_minimum_spanning_V2_FLAT(dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg)
int dglInitialize(dglGraph_s *pGraph, dglByte_t Version, dglInt32_t NodeAttrSize, dglInt32_t EdgeAttrSize, dglInt32_t *pOpaqueSet)
int(* dglSPClip_fn)(dglGraph_s *, dglSPClipInput_s *, dglSPClipOutput_s *, void *)
int(* dglSpanClip_fn)(dglGraph_s *, dglGraph_s *, dglSpanClipInput_s *, dglSpanClipOutput_s *, void *)