#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_v1.h"#include "graph_v2.h"#include "helpers.h"

Go to the source code of this file.
| #define __CIO_BEGIN 0 |
Definition at line 1418 of file dglib/graph.c.
Referenced by dglIOContextInitialize(), dglReadChunk(), and dglWriteChunk().
| #define __CIO_END 7 |
| #define __CIO_R_EDGEBUFFER 6 |
| #define __CIO_R_HEADER 4 |
| #define __CIO_R_NODEBUFFER 5 |
| #define __CIO_W_EDGEBUFFER 3 |
| #define __CIO_W_HEADER 1 |
| #define __CIO_W_NODEBUFFER 2 |
| #define DGL_V2 1 |
Definition at line 31 of file dglib/graph.c.
| #define MIN | ( | x, | |||
| y | ) | (((x)<(y))?x:y) |
Definition at line 1538 of file dglib/graph.c.
Referenced by dglReadChunk(), and RTreeCombineRect().
| int dglAddEdge | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nHead, | |||
| dglInt32_t | nTail, | |||
| dglInt32_t | nCost, | |||
| dglInt32_t | nEdge | |||
| ) |
Definition at line 551 of file dglib/graph.c.
Referenced by main(), Vect_graph_add_edge(), and Vect_net_build_graph().
| int dglAddEdgeX | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nHead, | |||
| dglInt32_t | nTail, | |||
| dglInt32_t | nCost, | |||
| dglInt32_t | nEdge, | |||
| void * | pvHeadAttr, | |||
| void * | pvTailAttr, | |||
| void * | pvEdgeAttr, | |||
| dglInt32_t | nFlags | |||
| ) |
| int dglAddNode | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nNodeId, | |||
| void * | pvNodeAttr, | |||
| dglInt32_t | nFlags | |||
| ) |
| int dglDelEdge | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nEdgeId | |||
| ) |
Definition at line 531 of file dglib/graph.c.
| int dglDelNode | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nNodeId | |||
| ) |
| int dglDepthComponents | ( | dglGraph_s * | pgraphInput, | |
| dglGraph_s * | pgraphComponents, | |||
| int | cgraphComponents, | |||
| dglSpanClip_fn | fnClip, | |||
| void * | pvClipArg | |||
| ) |
| int dglDepthSpanning | ( | dglGraph_s * | pgraphInput, | |
| dglGraph_s * | pgraphOutput, | |||
| dglInt32_t | nVertexNode, | |||
| dglSpanClip_fn | fnClip, | |||
| void * | pvClipArg | |||
| ) |
| dglInt32_t* dglEdge_T_First | ( | dglEdgeTraverser_s * | pT | ) |
| int dglEdge_T_Initialize | ( | dglEdgeTraverser_s * | pT, | |
| dglGraph_s * | pGraph, | |||
| dglEdgePrioritizer_s * | pEdgePrioritizer | |||
| ) |
| dglInt32_t* dglEdge_T_Next | ( | dglEdgeTraverser_s * | pT | ) |
| void dglEdge_T_Release | ( | dglEdgeTraverser_s * | pT | ) |
| dglInt32_t* dglEdgeGet_Attr | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnEdge | |||
| ) |
Definition at line 472 of file dglib/graph.c.
| dglInt32_t dglEdgeGet_Cost | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnEdge | |||
| ) |
Definition at line 376 of file dglib/graph.c.
Referenced by main(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
| dglInt32_t* dglEdgeGet_Head | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnEdge | |||
| ) |
Definition at line 412 of file dglib/graph.c.
| dglInt32_t dglEdgeGet_Id | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnEdge | |||
| ) |
Definition at line 394 of file dglib/graph.c.
Referenced by main(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
| dglInt32_t* dglEdgeGet_Tail | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnEdge | |||
| ) |
Definition at line 442 of file dglib/graph.c.
| int dglEdgeSet_Attr | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnAttr, | |||
| dglInt32_t * | pnEdge | |||
| ) |
Definition at line 490 of file dglib/graph.c.
| dglInt32_t* dglEdgeset_T_First | ( | dglEdgesetTraverser_s * | pT | ) |
Definition at line 1387 of file dglib/graph.c.
| int dglEdgeset_T_Initialize | ( | dglEdgesetTraverser_s * | pT, | |
| dglGraph_s * | pGraph, | |||
| dglInt32_t * | pnEdgeset | |||
| ) |
Definition at line 1366 of file dglib/graph.c.
| dglInt32_t* dglEdgeset_T_Next | ( | dglEdgesetTraverser_s * | pT | ) |
Definition at line 1400 of file dglib/graph.c.
| void dglEdgeset_T_Release | ( | dglEdgesetTraverser_s * | pT | ) |
Definition at line 1383 of file dglib/graph.c.
| dglInt32_t dglEdgesetGet_EdgeCount | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnEdgeset | |||
| ) |
Definition at line 356 of file dglib/graph.c.
| int dglErrno | ( | dglGraph_s * | pgraph | ) |
| int dglFlatten | ( | dglGraph_s * | pGraph | ) |
Definition at line 127 of file dglib/graph.c.
Referenced by main(), Vect_graph_build(), and Vect_net_build_graph().
| void dglFreeSPReport | ( | dglGraph_s * | pgraph, | |
| dglSPReport_s * | pSPReport | |||
| ) |
Definition at line 1024 of file dglib/graph.c.
Referenced by main(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
| int dglGet_AloneNodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1158 of file dglib/graph.c.
| dglInt64_t dglGet_Cost | ( | dglGraph_s * | pgraph | ) |
Definition at line 1199 of file dglib/graph.c.
| int dglGet_EdgeAttrSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1146 of file dglib/graph.c.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
| int dglGet_EdgeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1161 of file dglib/graph.c.
Referenced by dglDepthComponents(), dglDepthSpanning(), dglMinimumSpanning(), and main().
| dglEdgePrioritizer_s* dglGet_EdgePrioritizer | ( | dglGraph_s * | pGraph | ) |
| int dglGet_EdgeSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1186 of file dglib/graph.c.
| int dglGet_Endianess | ( | dglGraph_s * | pgraph | ) |
Definition at line 1140 of file dglib/graph.c.
| dglInt32_t dglGet_Family | ( | dglGraph_s * | pgraph | ) |
Definition at line 1205 of file dglib/graph.c.
| int dglGet_HeadNodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1152 of file dglib/graph.c.
| int dglGet_NodeAttrSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1143 of file dglib/graph.c.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
| int dglGet_NodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1149 of file dglib/graph.c.
| dglNodePrioritizer_s* dglGet_NodePrioritizer | ( | dglGraph_s * | pGraph | ) |
Definition at line 1220 of file dglib/graph.c.
| int dglGet_NodeSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1173 of file dglib/graph.c.
| dglInt32_t* dglGet_Opaque | ( | dglGraph_s * | pgraph | ) |
Definition at line 1167 of file dglib/graph.c.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
| dglInt32_t dglGet_Options | ( | dglGraph_s * | pgraph | ) |
Definition at line 1211 of file dglib/graph.c.
| int dglGet_State | ( | dglGraph_s * | pgraph | ) |
Definition at line 1164 of file dglib/graph.c.
| int dglGet_TailNodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1155 of file dglib/graph.c.
| int dglGet_Version | ( | dglGraph_s * | pgraph | ) |
Definition at line 1134 of file dglib/graph.c.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
| dglInt32_t* dglGetEdge | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nEdgeId | |||
| ) |
Definition at line 511 of file dglib/graph.c.
| dglInt32_t* dglGetNode | ( | dglGraph_s * | pGraph, | |
| dglInt32_t | nNodeId | |||
| ) |
Definition at line 141 of file dglib/graph.c.
Referenced by DGL_SPAN_DEPTHFIRST_SPANNING_FUNC(), main(), Vect_graph_set_node_costs(), and Vect_net_build_graph().
| int dglInitialize | ( | dglGraph_s * | pGraph, | |
| dglByte_t | Version, | |||
| dglInt32_t | NodeAttrSize, | |||
| dglInt32_t | EdgeAttrSize, | |||
| dglInt32_t * | pOpaqueSet | |||
| ) |
Definition at line 53 of file dglib/graph.c.
Referenced by dgl_read_V1(), dgl_read_V2(), dglDepthComponents(), dglDepthSpanning(), dglMinimumSpanning(), main(), Vect_graph_init(), and Vect_net_build_graph().
| int dglInitializeSPCache | ( | dglGraph_s * | pGraph, | |
| dglSPCache_s * | pCache | |||
| ) |
| int dglIOContextInitialize | ( | dglGraph_s * | pG, | |
| dglIOContext_s * | pIO | |||
| ) |
Definition at line 1427 of file dglib/graph.c.
| void dglIOContextRelease | ( | dglIOContext_s * | pIO | ) |
Definition at line 1436 of file dglib/graph.c.
| int dglMinimumSpanning | ( | dglGraph_s * | pgraphInput, | |
| dglGraph_s * | pgraphOutput, | |||
| dglInt32_t | nVertexNode, | |||
| dglSpanClip_fn | fnClip, | |||
| void * | pvClipArg | |||
| ) |
| dglInt32_t* dglNode_T_Find | ( | dglNodeTraverser_s * | pT, | |
| dglInt32_t | nNodeId | |||
| ) |
Definition at line 1286 of file dglib/graph.c.
| dglInt32_t* dglNode_T_First | ( | dglNodeTraverser_s * | pT | ) |
| int dglNode_T_Initialize | ( | dglNodeTraverser_s * | pT, | |
| dglGraph_s * | pGraph | |||
| ) |
| dglInt32_t* dglNode_T_Next | ( | dglNodeTraverser_s * | pT | ) |
| void dglNode_T_Release | ( | dglNodeTraverser_s * | pT | ) |
| dglInt32_t* dglNodeGet_Attr | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 230 of file dglib/graph.c.
| dglInt32_t dglNodeGet_Id | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 192 of file dglib/graph.c.
| int dglNodeGet_InDegree | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 265 of file dglib/graph.c.
| dglInt32_t* dglNodeGet_InEdgeset | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 170 of file dglib/graph.c.
Referenced by dglNodeGet_InDegree(), and dglNodeGet_Valence().
| int dglNodeGet_OutDegree | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 295 of file dglib/graph.c.
| dglInt32_t* dglNodeGet_OutEdgeset | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 154 of file dglib/graph.c.
Referenced by dglNodeGet_OutDegree(), and dglNodeGet_Valence().
| dglInt32_t dglNodeGet_Status | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 211 of file dglib/graph.c.
| int dglNodeGet_Valence | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode | |||
| ) |
Definition at line 325 of file dglib/graph.c.
Referenced by dglNodeGet_InDegree(), and dglNodeGet_OutDegree().
| void dglNodeSet_Attr | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnNode, | |||
| dglInt32_t * | pnAttr | |||
| ) |
Definition at line 248 of file dglib/graph.c.
Referenced by main(), Vect_graph_set_node_costs(), and Vect_net_build_graph().
| int dglRead | ( | dglGraph_s * | pGraph, | |
| int | fd | |||
| ) |
| int dglReadChunk | ( | dglIOContext_s * | pIO, | |
| dglByte_t * | pbChunk, | |||
| int | cbChunk | |||
| ) |
Definition at line 1541 of file dglib/graph.c.
| int dglRelease | ( | dglGraph_s * | pGraph | ) |
Definition at line 100 of file dglib/graph.c.
Referenced by dglDepthSpanning(), dglMinimumSpanning(), and main().
| void dglReleaseSPCache | ( | dglGraph_s * | pGraph, | |
| dglSPCache_s * | pCache | |||
| ) |
| void dglResetStats | ( | dglGraph_s * | pgraph | ) |
Definition at line 43 of file dglib/graph.c.
| void dglSet_Cost | ( | dglGraph_s * | pgraph, | |
| dglInt64_t | nnCost | |||
| ) |
Definition at line 1202 of file dglib/graph.c.
| void dglSet_Family | ( | dglGraph_s * | pgraph, | |
| dglInt32_t | nFamily | |||
| ) |
Definition at line 1208 of file dglib/graph.c.
| void dglSet_Opaque | ( | dglGraph_s * | pgraph, | |
| dglInt32_t * | pOpaque | |||
| ) |
Definition at line 1170 of file dglib/graph.c.
| void dglSet_Options | ( | dglGraph_s * | pgraph, | |
| dglInt32_t | nOptions | |||
| ) |
| void dglSet_Version | ( | dglGraph_s * | pgraph, | |
| int | nVersion | |||
| ) |
| int dglShortestDistance | ( | dglGraph_s * | pGraph, | |
| dglInt32_t * | pnDistance, | |||
| dglInt32_t | nStart, | |||
| dglInt32_t | nDestination, | |||
| dglSPClip_fn | fnClip, | |||
| void * | pvClipArg, | |||
| dglSPCache_s * | pCache | |||
| ) |
Definition at line 758 of file dglib/graph.c.
Referenced by main(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
| int dglShortestPath | ( | dglGraph_s * | pGraph, | |
| dglSPReport_s ** | ppReport, | |||
| dglInt32_t | nStart, | |||
| dglInt32_t | nDestination, | |||
| dglSPClip_fn | fnClip, | |||
| void * | pvClipArg, | |||
| dglSPCache_s * | pCache | |||
| ) |
Definition at line 727 of file dglib/graph.c.
Referenced by main(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
| char* dglStrerror | ( | dglGraph_s * | pgraph | ) |
Definition at line 1076 of file dglib/graph.c.
Referenced by main(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
| int dglUnflatten | ( | dglGraph_s * | pGraph | ) |
| int dglWrite | ( | dglGraph_s * | pGraph, | |
| int | fd | |||
| ) |
| int dglWriteChunk | ( | dglIOContext_s * | pIO, | |
| dglWriteChunk_fn | pfn, | |||
| void * | pv | |||
| ) |
Definition at line 1439 of file dglib/graph.c.
1.5.3