GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#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.
Macros | |
#define | DGL_V2 1 |
#define | __CIO_BEGIN 0 |
#define | __CIO_W_HEADER 1 |
#define | __CIO_W_NODEBUFFER 2 |
#define | __CIO_W_EDGEBUFFER 3 |
#define | __CIO_R_HEADER 4 |
#define | __CIO_R_NODEBUFFER 5 |
#define | __CIO_R_EDGEBUFFER 6 |
#define | __CIO_END 7 |
#define | MIN(x, y) (((x)<(y))?x:y) |
#define __CIO_BEGIN 0 |
Definition at line 1554 of file dglib/graph.c.
Referenced by dglIOContextInitialize(), dglReadChunk(), and dglWriteChunk().
#define __CIO_END 7 |
Definition at line 1561 of file dglib/graph.c.
Referenced by dglReadChunk(), and dglWriteChunk().
#define __CIO_R_EDGEBUFFER 6 |
Definition at line 1560 of file dglib/graph.c.
Referenced by dglReadChunk().
#define __CIO_R_HEADER 4 |
Definition at line 1558 of file dglib/graph.c.
Referenced by dglReadChunk().
#define __CIO_R_NODEBUFFER 5 |
Definition at line 1559 of file dglib/graph.c.
Referenced by dglReadChunk().
#define __CIO_W_EDGEBUFFER 3 |
Definition at line 1557 of file dglib/graph.c.
Referenced by dglWriteChunk().
#define __CIO_W_HEADER 1 |
Definition at line 1555 of file dglib/graph.c.
Referenced by dglWriteChunk().
#define __CIO_W_NODEBUFFER 2 |
Definition at line 1556 of file dglib/graph.c.
Referenced by dglWriteChunk().
#define DGL_V2 1 |
Definition at line 31 of file dglib/graph.c.
Definition at line 1691 of file dglib/graph.c.
Referenced by dglReadChunk().
int dglAddEdge | ( | dglGraph_s * | pGraph, |
dglInt32_t | nHead, | ||
dglInt32_t | nTail, | ||
dglInt32_t | nCost, | ||
dglInt32_t | nEdge | ||
) |
Definition at line 610 of file dglib/graph.c.
References dgl_add_edge_V1(), dgl_add_edge_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by NetA_split_vertices(), 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 | ||
) |
Definition at line 647 of file dglib/graph.c.
References dgl_add_edge_V1(), dgl_add_edge_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, and _dglGraph::Version.
int dglAddNode | ( | dglGraph_s * | pGraph, |
dglInt32_t | nNodeId, | ||
void * | pvNodeAttr, | ||
dglInt32_t | nFlags | ||
) |
Definition at line 688 of file dglib/graph.c.
References dgl_add_node_V1(), dgl_add_node_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, and _dglGraph::Version.
int dglDelEdge | ( | dglGraph_s * | pGraph, |
dglInt32_t | nEdgeId | ||
) |
Definition at line 593 of file dglib/graph.c.
References dgl_del_edge_V1(), dgl_del_edge_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, and _dglGraph::Version.
int dglDelNode | ( | dglGraph_s * | pGraph, |
dglInt32_t | nNodeId | ||
) |
Definition at line 711 of file dglib/graph.c.
References dgl_del_node_V1(), dgl_del_node_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, and _dglGraph::Version.
int dglDepthComponents | ( | dglGraph_s * | pgraphInput, |
dglGraph_s * | pgraphComponents, | ||
int | cgraphComponents, | ||
dglSpanClip_fn | fnClip, | ||
void * | pvClipArg | ||
) |
Definition at line 914 of file dglib/graph.c.
References avl_create, avl_destroy, avl_find, dgl_depthfirst_spanning_V1(), dgl_depthfirst_spanning_V2(), DGL_ERR_BadVersion, DGL_ERR_MemoryExhausted, DGL_ERR_UnexpectedNullPointer, DGL_NODE_ID_v1, DGL_NODE_ID_v2, DGL_NODE_STATUS_v1, DGL_NODE_STATUS_v2, DGL_NS_HEAD, dglGet_EdgeAttrSize(), dglGet_EdgeCount(), dglGet_NodeAttrSize(), dglGet_Opaque(), dglGet_Version(), dglInitialize(), dglNode_T_First(), dglNode_T_Initialize(), dglNode_T_Next(), dglNode_T_Release(), dglTreeGetAllocator(), dglTreeNodeCancel(), dglTreeNodeCompare(), _dglGraph::iErrno, _dglTreeNode::nKey, NULL, and _dglGraph::Version.
int dglDepthSpanning | ( | dglGraph_s * | pgraphInput, |
dglGraph_s * | pgraphOutput, | ||
dglInt32_t | nVertexNode, | ||
dglSpanClip_fn | fnClip, | ||
void * | pvClipArg | ||
) |
Definition at line 849 of file dglib/graph.c.
References avl_create, avl_destroy, dgl_depthfirst_spanning_V1(), dgl_depthfirst_spanning_V2(), DGL_ERR_BadVersion, DGL_ERR_MemoryExhausted, dglGet_EdgeAttrSize(), dglGet_EdgeCount(), dglGet_NodeAttrSize(), dglGet_Opaque(), dglGet_Version(), dglInitialize(), dglRelease(), dglTreeGetAllocator(), dglTreeNodeCancel(), dglTreeNodeCompare(), _dglGraph::iErrno, NULL, and _dglGraph::Version.
dglInt32_t* dglEdge_T_First | ( | dglEdgeTraverser_s * | pT | ) |
Definition at line 1468 of file dglib/graph.c.
References dgl_edge_t_first_V1(), dgl_edge_t_first_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, dglEdgeTraverser_s::pGraph, and _dglGraph::Version.
int dglEdge_T_Initialize | ( | dglEdgeTraverser_s * | pT, |
dglGraph_s * | pGraph, | ||
dglEdgePrioritizer_s * | pEdgePrioritizer | ||
) |
Definition at line 1435 of file dglib/graph.c.
References dgl_edge_t_initialize_V1(), dgl_edge_t_initialize_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, and _dglGraph::Version.
dglInt32_t* dglEdge_T_Next | ( | dglEdgeTraverser_s * | pT | ) |
Definition at line 1483 of file dglib/graph.c.
References dgl_edge_t_next_V1(), dgl_edge_t_next_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, dglEdgeTraverser_s::pGraph, and _dglGraph::Version.
void dglEdge_T_Release | ( | dglEdgeTraverser_s * | pT | ) |
Definition at line 1452 of file dglib/graph.c.
References dgl_edge_t_release_V1(), dgl_edge_t_release_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, dglEdgeTraverser_s::pGraph, and _dglGraph::Version.
dglInt32_t* dglEdgeGet_Attr | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnEdge | ||
) |
Definition at line 530 of file dglib/graph.c.
References DGL_EDGE_ATTR_PTR_v1, DGL_EDGE_ATTR_PTR_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, _dglGraph::iErrno, NULL, and _dglGraph::Version.
dglInt32_t dglEdgeGet_Cost | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnEdge | ||
) |
Definition at line 418 of file dglib/graph.c.
References DGL_EDGE_COST_v1, DGL_EDGE_COST_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, _dglGraph::iErrno, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_betweenness_closeness(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
dglInt32_t* dglEdgeGet_Head | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnEdge | ||
) |
Definition at line 458 of file dglib/graph.c.
References DGL_EDGE_HEADNODE_OFFSET_v1, DGL_EDGE_HEADNODE_OFFSET_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, dgl_get_node_V1(), dgl_get_node_V2(), DGL_GS_FLAT, DGL_NODEBUFFER_SHIFT_v1, DGL_NODEBUFFER_SHIFT_v2, _dglGraph::Flags, _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by NetA_find_path(), NetA_flow(), and NetA_spanning_tree().
dglInt32_t dglEdgeGet_Id | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnEdge | ||
) |
Definition at line 438 of file dglib/graph.c.
References DGL_EDGE_ID_v1, DGL_EDGE_ID_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, _dglGraph::iErrno, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_compute_bridges(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_strongly_connected_components(), Vect_graph_shortest_path(), and Vect_net_shortest_path().
dglInt32_t* dglEdgeGet_Tail | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnEdge | ||
) |
Definition at line 494 of file dglib/graph.c.
References DGL_EDGE_TAILNODE_OFFSET_v1, DGL_EDGE_TAILNODE_OFFSET_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, dgl_get_node_V1(), dgl_get_node_V2(), DGL_GS_FLAT, DGL_NODEBUFFER_SHIFT_v1, DGL_NODEBUFFER_SHIFT_v2, _dglGraph::Flags, _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
int dglEdgeSet_Attr | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnAttr, | ||
dglInt32_t * | pnEdge | ||
) |
Definition at line 550 of file dglib/graph.c.
References DGL_EDGE_ATTR_PTR_v1, DGL_EDGE_ATTR_PTR_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, _dglGraph::EdgeAttrSize, _dglGraph::iErrno, and _dglGraph::Version.
dglInt32_t* dglEdgeset_T_First | ( | dglEdgesetTraverser_s * | pT | ) |
Definition at line 1519 of file dglib/graph.c.
References dgl_edgeset_t_first_V1(), dgl_edgeset_t_first_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, dglEdgesetTraverser_s::pGraph, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
int dglEdgeset_T_Initialize | ( | dglEdgesetTraverser_s * | pT, |
dglGraph_s * | pGraph, | ||
dglInt32_t * | pnEdgeset | ||
) |
Definition at line 1499 of file dglib/graph.c.
References dgl_edgeset_t_initialize_V1(), dgl_edgeset_t_initialize_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
dglInt32_t* dglEdgeset_T_Next | ( | dglEdgesetTraverser_s * | pT | ) |
Definition at line 1534 of file dglib/graph.c.
References dgl_edgeset_t_next_V1(), dgl_edgeset_t_next_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, dglEdgesetTraverser_s::pGraph, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
void dglEdgeset_T_Release | ( | dglEdgesetTraverser_s * | pT | ) |
Definition at line 1515 of file dglib/graph.c.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
dglInt32_t dglEdgesetGet_EdgeCount | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnEdgeset | ||
) |
Definition at line 397 of file dglib/graph.c.
References DGL_EDGESET_EDGECOUNT_v1, DGL_EDGESET_EDGECOUNT_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, _dglGraph::iErrno, and _dglGraph::Version.
int dglErrno | ( | dglGraph_s * | pgraph | ) |
Definition at line 1155 of file dglib/graph.c.
References _dglGraph::iErrno.
int dglFlatten | ( | dglGraph_s * | pGraph | ) |
Definition at line 139 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_flatten_V1(), dgl_flatten_V2(), _dglGraph::iErrno, and _dglGraph::Version.
Referenced by NetA_split_vertices(), Vect_graph_build(), and Vect_net_build_graph().
void dglFreeSPReport | ( | dglGraph_s * | pgraph, |
dglSPReport_s * | pSPReport | ||
) |
Definition at line 1106 of file dglib/graph.c.
References _dglSPReport::cArc, free(), _dglSPReport::pArc, and _dglSPArc::pnEdge.
Referenced by Vect_graph_shortest_path(), and Vect_net_shortest_path().
int dglGet_AloneNodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1256 of file dglib/graph.c.
References _dglGraph::cAlone.
dglInt64_t dglGet_Cost | ( | dglGraph_s * | pgraph | ) |
Definition at line 1311 of file dglib/graph.c.
References _dglGraph::nnCost.
int dglGet_EdgeAttrSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1236 of file dglib/graph.c.
References _dglGraph::EdgeAttrSize.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
int dglGet_EdgeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1261 of file dglib/graph.c.
References _dglGraph::cEdge.
Referenced by dglDepthComponents(), dglDepthSpanning(), dglMinimumSpanning(), NetA_flow(), and NetA_spanning_tree().
dglEdgePrioritizer_s* dglGet_EdgePrioritizer | ( | dglGraph_s * | pGraph | ) |
Definition at line 1341 of file dglib/graph.c.
References _dglGraph::edgePrioritizer.
int dglGet_EdgeSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1296 of file dglib/graph.c.
References DGL_EDGE_SIZEOF_v1, DGL_EDGE_SIZEOF_v2, DGL_ERR_BadVersion, _dglGraph::iErrno, _dglGraph::NodeAttrSize, and _dglGraph::Version.
int dglGet_Endianess | ( | dglGraph_s * | pgraph | ) |
Definition at line 1226 of file dglib/graph.c.
References _dglGraph::Endian.
dglInt32_t dglGet_Family | ( | dglGraph_s * | pgraph | ) |
Definition at line 1321 of file dglib/graph.c.
References _dglGraph::nFamily.
int dglGet_HeadNodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1246 of file dglib/graph.c.
References _dglGraph::cHead.
int dglGet_NodeAttrSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1231 of file dglib/graph.c.
References _dglGraph::NodeAttrSize.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
int dglGet_NodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1241 of file dglib/graph.c.
References _dglGraph::cNode.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_degree_centrality(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
dglNodePrioritizer_s* dglGet_NodePrioritizer | ( | dglGraph_s * | pGraph | ) |
Definition at line 1346 of file dglib/graph.c.
References _dglGraph::nodePrioritizer.
int dglGet_NodeSize | ( | dglGraph_s * | pgraph | ) |
Definition at line 1281 of file dglib/graph.c.
References DGL_ERR_BadVersion, DGL_NODE_SIZEOF_v1, DGL_NODE_SIZEOF_v2, _dglGraph::iErrno, _dglGraph::NodeAttrSize, and _dglGraph::Version.
dglInt32_t* dglGet_Opaque | ( | dglGraph_s * | pgraph | ) |
Definition at line 1271 of file dglib/graph.c.
References _dglGraph::aOpaqueSet.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
dglInt32_t dglGet_Options | ( | dglGraph_s * | pgraph | ) |
Definition at line 1331 of file dglib/graph.c.
References _dglGraph::nOptions.
int dglGet_State | ( | dglGraph_s * | pgraph | ) |
Definition at line 1266 of file dglib/graph.c.
References _dglGraph::Flags.
int dglGet_TailNodeCount | ( | dglGraph_s * | pgraph | ) |
Definition at line 1251 of file dglib/graph.c.
References _dglGraph::cTail.
int dglGet_Version | ( | dglGraph_s * | pgraph | ) |
Definition at line 1217 of file dglib/graph.c.
References _dglGraph::Version.
Referenced by dglDepthComponents(), dglDepthSpanning(), and dglMinimumSpanning().
dglInt32_t* dglGetEdge | ( | dglGraph_s * | pGraph, |
dglInt32_t | nEdgeId | ||
) |
Definition at line 576 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_get_edge_V1(), dgl_get_edge_V2(), _dglGraph::iErrno, NULL, and _dglGraph::Version.
dglInt32_t* dglGetNode | ( | dglGraph_s * | pGraph, |
dglInt32_t | nNodeId | ||
) |
Definition at line 155 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_get_node_V1(), dgl_get_node_V2(), _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by DGL_SPAN_DEPTHFIRST_SPANNING_FUNC(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_degree_centrality(), NetA_distance_from_points(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_strongly_connected_components(), NetA_weakly_connected_components(), 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.
References _dglGraph::aOpaqueSet, DGL_ENDIAN_BIG, DGL_ENDIAN_LITTLE, DGL_ERR_BadArgument, DGL_ERR_VersionNotSupported, dgl_initialize_V1(), dgl_initialize_V2(), _dglGraph::EdgeAttrSize, _dglGraph::Endian, _dglGraph::iErrno, _dglGraph::NodeAttrSize, NULL, and _dglGraph::Version.
Referenced by dgl_read_V1(), dgl_read_V2(), dglDepthComponents(), dglDepthSpanning(), dglMinimumSpanning(), NetA_split_vertices(), Vect_graph_init(), and Vect_net_build_graph().
int dglInitializeSPCache | ( | dglGraph_s * | pGraph, |
dglSPCache_s * | pCache | ||
) |
Definition at line 1122 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_sp_cache_initialize_V1(), dgl_sp_cache_initialize_V2(), _dglGraph::iErrno, and _dglGraph::Version.
Referenced by Vect_net_build_graph().
int dglIOContextInitialize | ( | dglGraph_s * | pG, |
dglIOContext_s * | pIO | ||
) |
Definition at line 1563 of file dglib/graph.c.
References __CIO_BEGIN, dglIOContext_s::cb, dglIOContext_s::ib, dglIOContext_s::nState, NULL, dglIOContext_s::pb, and dglIOContext_s::pG.
void dglIOContextRelease | ( | dglIOContext_s * | pIO | ) |
Definition at line 1573 of file dglib/graph.c.
int dglMinimumSpanning | ( | dglGraph_s * | pgraphInput, |
dglGraph_s * | pgraphOutput, | ||
dglInt32_t | nVertexNode, | ||
dglSpanClip_fn | fnClip, | ||
void * | pvClipArg | ||
) |
Definition at line 1060 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_minimum_spanning_V1(), dgl_minimum_spanning_V2(), dglGet_EdgeAttrSize(), dglGet_EdgeCount(), dglGet_NodeAttrSize(), dglGet_Opaque(), dglGet_Version(), dglInitialize(), dglRelease(), _dglGraph::iErrno, and _dglGraph::Version.
dglInt32_t* dglNode_T_Find | ( | dglNodeTraverser_s * | pT, |
dglInt32_t | nNodeId | ||
) |
Definition at line 1417 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_node_t_find_V1(), dgl_node_t_find_V2(), _dglGraph::iErrno, NULL, dglNodeTraverser_s::pGraph, and _dglGraph::Version.
dglInt32_t* dglNode_T_First | ( | dglNodeTraverser_s * | pT | ) |
Definition at line 1387 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_node_t_first_V1(), dgl_node_t_first_V2(), _dglGraph::iErrno, NULL, dglNodeTraverser_s::pGraph, and _dglGraph::Version.
Referenced by dglDepthComponents(), NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_eigenvector_centrality(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
int dglNode_T_Initialize | ( | dglNodeTraverser_s * | pT, |
dglGraph_s * | pGraph | ||
) |
Definition at line 1356 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_node_t_initialize_V1(), dgl_node_t_initialize_V2(), _dglGraph::iErrno, and _dglGraph::Version.
Referenced by dglDepthComponents(), NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_eigenvector_centrality(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
dglInt32_t* dglNode_T_Next | ( | dglNodeTraverser_s * | pT | ) |
Definition at line 1402 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_node_t_next_V1(), dgl_node_t_next_V2(), _dglGraph::iErrno, NULL, dglNodeTraverser_s::pGraph, and _dglGraph::Version.
Referenced by dglDepthComponents(), NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_eigenvector_centrality(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
void dglNode_T_Release | ( | dglNodeTraverser_s * | pT | ) |
Definition at line 1371 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_node_t_release_V1(), dgl_node_t_release_V2(), _dglGraph::iErrno, dglNodeTraverser_s::pGraph, and _dglGraph::Version.
Referenced by dglDepthComponents(), NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_eigenvector_centrality(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
dglInt32_t* dglNodeGet_Attr | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 255 of file dglib/graph.c.
References DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, DGL_NODE_ATTR_PTR_v1, DGL_NODE_ATTR_PTR_v2, _dglGraph::iErrno, NULL, and _dglGraph::Version.
dglInt32_t dglNodeGet_Id | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 213 of file dglib/graph.c.
References DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, DGL_NODE_ID_v1, DGL_NODE_ID_v2, _dglGraph::iErrno, and _dglGraph::Version.
Referenced by NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
int dglNodeGet_InDegree | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 297 of file dglib/graph.c.
References DGL_EDGESET_EDGECOUNT_v2, DGL_ERR_BadVersion, DGL_ERR_NotSupported, DGL_ERR_UnexpectedNullPointer, DGL_NODE_STATUS_v2, DGL_NS_ALONE, dglNodeGet_InEdgeset(), dglNodeGet_Valence(), _dglGraph::iErrno, and _dglGraph::Version.
dglInt32_t* dglNodeGet_InEdgeset | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 188 of file dglib/graph.c.
References DGL_ERR_BadVersion, DGL_ERR_NotSupported, dgl_getnode_inedgeset_V2(), _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by dglNodeGet_InDegree(), and dglNodeGet_Valence().
int dglNodeGet_OutDegree | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 329 of file dglib/graph.c.
References DGL_EDGESET_EDGECOUNT_v1, DGL_EDGESET_EDGECOUNT_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, DGL_NODE_STATUS_v1, DGL_NODE_STATUS_v2, DGL_NS_ALONE, dglNodeGet_OutEdgeset(), dglNodeGet_Valence(), _dglGraph::iErrno, and _dglGraph::Version.
Referenced by NetA_degree_centrality().
dglInt32_t* dglNodeGet_OutEdgeset | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 170 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_getnode_outedgeset_V1(), dgl_getnode_outedgeset_V2(), _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by dglNodeGet_OutDegree(), dglNodeGet_Valence(), NetA_allpairs(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_compute_bridges(), NetA_distance_from_points(), NetA_eigenvector_centrality(), NetA_find_path(), NetA_flow(), NetA_min_cut(), NetA_spanning_tree(), NetA_split_vertices(), NetA_strongly_connected_components(), and NetA_weakly_connected_components().
dglInt32_t dglNodeGet_Status | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 234 of file dglib/graph.c.
References DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, DGL_NODE_STATUS_v1, DGL_NODE_STATUS_v2, _dglGraph::iErrno, and _dglGraph::Version.
int dglNodeGet_Valence | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode | ||
) |
Definition at line 363 of file dglib/graph.c.
References DGL_EDGESET_EDGECOUNT_v2, DGL_ERR_BadVersion, DGL_ERR_UnexpectedNullPointer, DGL_NODE_STATUS_v2, DGL_NS_ALONE, dglNodeGet_InEdgeset(), dglNodeGet_OutEdgeset(), _dglGraph::iErrno, and _dglGraph::Version.
Referenced by dglNodeGet_InDegree(), and dglNodeGet_OutDegree().
void dglNodeSet_Attr | ( | dglGraph_s * | pGraph, |
dglInt32_t * | pnNode, | ||
dglInt32_t * | pnAttr | ||
) |
Definition at line 275 of file dglib/graph.c.
References DGL_NODE_ATTR_PTR_v1, DGL_NODE_ATTR_PTR_v2, _dglGraph::NodeAttrSize, and _dglGraph::Version.
Referenced by Vect_graph_set_node_costs(), and Vect_net_build_graph().
int dglRead | ( | dglGraph_s * | pGraph, |
int | fd | ||
) |
Definition at line 755 of file dglib/graph.c.
References DGL_ERR_Read, DGL_ERR_VersionNotSupported, dgl_read_V1(), dgl_read_V2(), and _dglGraph::iErrno.
int dglReadChunk | ( | dglIOContext_s * | pIO, |
dglByte_t * | pbChunk, | ||
int | cbChunk | ||
) |
Definition at line 1694 of file dglib/graph.c.
References __CIO_BEGIN, __CIO_END, __CIO_R_EDGEBUFFER, __CIO_R_HEADER, __CIO_R_NODEBUFFER, dglIOContext_s::ab, _dglGraph::aOpaqueSet, _dglGraph::cAlone, dglIOContext_s::cb, _dglGraph::cEdge, _dglGraph::cHead, _dglGraph::cNode, _dglGraph::cTail, DGL_ENDIAN_BIG, DGL_ENDIAN_LITTLE, DGL_GS_FLAT, dgl_swapInt32Bytes(), dgl_swapInt64Bytes(), _dglGraph::EdgeAttrSize, _dglGraph::Endian, _dglGraph::Flags, dglIOContext_s::fSwap, dglIOContext_s::ib, _dglGraph::iEdgeBuffer, _dglGraph::iNodeBuffer, malloc(), MIN, _dglGraph::nFamily, _dglGraph::nnCost, _dglGraph::NodeAttrSize, _dglGraph::nOptions, dglIOContext_s::nState, NULL, dglIOContext_s::pb, _dglGraph::pEdgeBuffer, dglIOContext_s::pG, _dglGraph::pNodeBuffer, and _dglGraph::Version.
int dglRelease | ( | dglGraph_s * | pGraph | ) |
Definition at line 108 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_release_V1(), dgl_release_V2(), _dglGraph::iErrno, and _dglGraph::Version.
Referenced by dglDepthSpanning(), and dglMinimumSpanning().
void dglReleaseSPCache | ( | dglGraph_s * | pGraph, |
dglSPCache_s * | pCache | ||
) |
Definition at line 1137 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_sp_cache_release_V1(), dgl_sp_cache_release_V2(), _dglGraph::iErrno, and _dglGraph::Version.
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 1316 of file dglib/graph.c.
References _dglGraph::nnCost.
void dglSet_Family | ( | dglGraph_s * | pgraph, |
dglInt32_t | nFamily | ||
) |
Definition at line 1326 of file dglib/graph.c.
References _dglGraph::nFamily.
void dglSet_Opaque | ( | dglGraph_s * | pgraph, |
dglInt32_t * | pOpaque | ||
) |
Definition at line 1276 of file dglib/graph.c.
References _dglGraph::aOpaqueSet.
void dglSet_Options | ( | dglGraph_s * | pgraph, |
dglInt32_t | nOptions | ||
) |
Definition at line 1336 of file dglib/graph.c.
References _dglGraph::nOptions.
void dglSet_Version | ( | dglGraph_s * | pgraph, |
int | nVersion | ||
) |
Definition at line 1221 of file dglib/graph.c.
References _dglGraph::Version.
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 817 of file dglib/graph.c.
References dgl_dijkstra_V1(), dgl_dijkstra_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by 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 785 of file dglib/graph.c.
References dgl_dijkstra_V1(), dgl_dijkstra_V2(), DGL_ERR_BadVersion, _dglGraph::iErrno, NULL, and _dglGraph::Version.
Referenced by Vect_graph_shortest_path(), and Vect_net_shortest_path().
char* dglStrerror | ( | dglGraph_s * | pgraph | ) |
Definition at line 1160 of file dglib/graph.c.
References DGL_ERR_BadArgument, DGL_ERR_BadEdge, DGL_ERR_BadNodeType, DGL_ERR_BadOnFlatGraph, DGL_ERR_BadOnTreeGraph, DGL_ERR_BadVersion, DGL_ERR_EdgeAlreadyExist, DGL_ERR_EdgeNotFound, DGL_ERR_HeadNodeNotFound, DGL_ERR_HeapError, DGL_ERR_MemoryExhausted, DGL_ERR_NodeAlreadyExist, DGL_ERR_NodeIsAComponent, DGL_ERR_NodeNotFound, DGL_ERR_NotSupported, DGL_ERR_Read, DGL_ERR_TailNodeNotFound, DGL_ERR_TreeSearchError, DGL_ERR_UndefinedMethod, DGL_ERR_UnexpectedNullPointer, DGL_ERR_UnknownByteOrder, DGL_ERR_VersionNotSupported, DGL_ERR_Write, and _dglGraph::iErrno.
Referenced by Vect_graph_shortest_path(), and Vect_net_shortest_path().
int dglUnflatten | ( | dglGraph_s * | pGraph | ) |
Definition at line 123 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_unflatten_V1(), dgl_unflatten_V2(), _dglGraph::iErrno, and _dglGraph::Version.
int dglWrite | ( | dglGraph_s * | pGraph, |
int | fd | ||
) |
Definition at line 733 of file dglib/graph.c.
References DGL_ERR_BadVersion, dgl_write_V1(), dgl_write_V2(), _dglGraph::iErrno, and _dglGraph::Version.
int dglWriteChunk | ( | dglIOContext_s * | pIO, |
dglWriteChunk_fn | pfn, | ||
void * | pv | ||
) |
Definition at line 1577 of file dglib/graph.c.
References __CIO_BEGIN, __CIO_END, __CIO_W_EDGEBUFFER, __CIO_W_HEADER, __CIO_W_NODEBUFFER, dglIOContext_s::ab, _dglGraph::aOpaqueSet, _dglGraph::cAlone, dglIOContext_s::cb, _dglGraph::cEdge, _dglGraph::cHead, _dglGraph::cNode, _dglGraph::cTail, _dglGraph::EdgeAttrSize, _dglGraph::Endian, dglIOContext_s::ib, _dglGraph::iEdgeBuffer, _dglGraph::iNodeBuffer, _dglGraph::nFamily, _dglGraph::nnCost, _dglGraph::NodeAttrSize, _dglGraph::nOptions, dglIOContext_s::nState, NULL, dglIOContext_s::pb, _dglGraph::pEdgeBuffer, dglIOContext_s::pG, _dglGraph::pNodeBuffer, and _dglGraph::Version.