GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-602118adcc
|
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include "type.h"
#include "tree.h"
#include "graph.h"
#include "graph_v2.h"
#include "helpers.h"
#include "v2-defs.h"
#include "sp-template.c"
#include "nodemgmt-template.c"
#include "edgemgmt-template.c"
#include "misc-template.c"
#include "span-template.c"
Go to the source code of this file.
Macros | |
#define | DGL_DEFINE_TREE_PROCS 1 |
#define | DGL_DEFINE_FLAT_PROCS 1 |
Functions | |
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_depthfirst_spanning_V2 (dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, void *pvVisited, dglSpanClip_fn fnClip, void *pvClipArg) |
int | dgl_minimum_spanning_V2 (dglGraph_s *pgraphIn, dglGraph_s *pgraphOut, dglInt32_t nVertex, dglSpanClip_fn fnClip, void *pvClipArg) |
int | dgl_initialize_V2 (dglGraph_s *pgraph) |
int | dgl_release_V2 (dglGraph_s *pgraph) |
int | dgl_write_V2 (dglGraph_s *pgraph, int fd) |
int | dgl_read_V2 (dglGraph_s *pgraph, int fd, int version) |
#define DGL_DEFINE_FLAT_PROCS 1 |
Definition at line 55 of file graph_v2.c.
#define DGL_DEFINE_TREE_PROCS 1 |
Definition at line 47 of file graph_v2.c.
int dgl_depthfirst_spanning_V2 | ( | dglGraph_s * | pgraphIn, |
dglGraph_s * | pgraphOut, | ||
dglInt32_t | nVertex, | ||
void * | pvVisited, | ||
dglSpanClip_fn | fnClip, | ||
void * | pvClipArg | ||
) |
Definition at line 76 of file graph_v2.c.
References DGL_GS_FLAT, dgl_span_depthfirst_spanning_V2_FLAT(), dgl_span_depthfirst_spanning_V2_TREE(), and _dglGraph::Flags.
Referenced by dglDepthComponents(), and dglDepthSpanning().
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 | ||
) |
Definition at line 61 of file graph_v2.c.
References dgl_dijkstra_V2_FLAT(), dgl_dijkstra_V2_TREE(), DGL_GS_FLAT, and _dglGraph::Flags.
Referenced by dglShortestDistance(), and dglShortestPath().
int dgl_initialize_V2 | ( | dglGraph_s * | pgraph | ) |
Definition at line 104 of file graph_v2.c.
References avl_create, DGL_ERR_MemoryExhausted, dglTreeEdgeCompare(), dglTreeGetAllocator(), dglTreeNode2Compare(), _dglGraph::iErrno, NULL, _dglGraph::pEdgeTree, and _dglGraph::pNodeTree.
Referenced by dglInitialize().
int dgl_minimum_spanning_V2 | ( | dglGraph_s * | pgraphIn, |
dglGraph_s * | pgraphOut, | ||
dglInt32_t | nVertex, | ||
dglSpanClip_fn | fnClip, | ||
void * | pvClipArg | ||
) |
Definition at line 90 of file graph_v2.c.
References DGL_GS_FLAT, dgl_span_minimum_spanning_V2_FLAT(), dgl_span_minimum_spanning_V2_TREE(), and _dglGraph::Flags.
Referenced by dglMinimumSpanning().
int dgl_read_V2 | ( | dglGraph_s * | pgraph, |
int | fd, | ||
int | version | ||
) |
Definition at line 238 of file graph_v2.c.
References _dglGraph::aOpaqueSet, _dglGraph::cAlone, _dglGraph::cEdge, _dglGraph::cHead, _dglGraph::cNode, _dglGraph::cTail, DGL_ENDIAN_BIG, DGL_ENDIAN_LITTLE, DGL_ERR_MemoryExhausted, DGL_ERR_Read, dgl_swapInt32Bytes(), dgl_swapInt64Bytes(), dglInitialize(), _dglGraph::Flags, free(), _dglGraph::iEdgeBuffer, _dglGraph::iErrno, _dglGraph::iNodeBuffer, malloc(), _dglGraph::nnCost, NULL, _dglGraph::pEdgeBuffer, and _dglGraph::pNodeBuffer.
Referenced by dglRead().
int dgl_release_V2 | ( | dglGraph_s * | pgraph | ) |
Definition at line 123 of file graph_v2.c.
References avl_destroy, dglTreeEdgeCancel(), dglTreeEdgePri32Cancel(), dglTreeNodeCancel(), dglTreeNodePri32Cancel(), _dglGraph::edgePrioritizer, free(), _dglGraph::iErrno, _dglGraph::nodePrioritizer, _dglGraph::pEdgeBuffer, _dglGraph::pEdgeTree, _dglGraph::pNodeBuffer, _dglGraph::pNodeTree, dglNodePrioritizer_s::pvAVL, and dglEdgePrioritizer_s::pvAVL.
Referenced by dglRelease().
int dgl_write_V2 | ( | dglGraph_s * | pgraph, |
int | fd | ||
) |
Definition at line 143 of file graph_v2.c.
References _dglGraph::aOpaqueSet, _dglGraph::cAlone, _dglGraph::cEdge, _dglGraph::cHead, _dglGraph::cNode, _dglGraph::cTail, DGL_ERR_Write, _dglGraph::EdgeAttrSize, _dglGraph::Endian, _dglGraph::iEdgeBuffer, _dglGraph::iErrno, _dglGraph::iNodeBuffer, _dglGraph::nnCost, _dglGraph::NodeAttrSize, _dglGraph::pEdgeBuffer, _dglGraph::pNodeBuffer, and _dglGraph::Version.
Referenced by dglWrite().