DHART
Loading...
Searching...
No Matches
spatialstructures_C.cpp File Reference
#include "cost_algorithms.h"
#include <spatialstructures_C.h>
#include <HFExceptions.h>
#include <graph.h>
#include <edge.h>
#include <node.h>
#include <robin_hood.h>
#include <iostream>
+ Include dependency graph for spatialstructures_C.cpp:

Go to the source code of this file.

Functions

bool parse_string (const char *c)
 
C_INTERFACE GetAllNodesFromGraph (const Graph *graph, vector< Node > **out_vector_ptr, Node **out_data_ptr)
 Get a vector of every node in the given graph pointer. More...
 
C_INTERFACE GetSizeOfNodeVector (const vector< Node > *node_list, int *out_size)
 Get the size of a node vector. More...
 
C_INTERFACE GetSizeOfEdgeVector (const vector< Edge > *edge_list, int *out_size)
 Get the size of an edge vector. More...
 
C_INTERFACE GetEdgeCost (const Graph *g, int parent, int child, const char *cost_type, float *out_float)
 Get the cost of traversing from parent to child More...
 
C_INTERFACE AggregateCosts (const Graph *graph, int agg, bool directed, const char *cost_type, std::vector< float > **out_vector_ptr, float **out_data_ptr)
 Get an ordered array of costs for each node aggregated by the desired function. More...
 
C_INTERFACE CreateGraph (const float *nodes, int num_nodes, Graph **out_graph)
 Create a new empty graph. More...
 
C_INTERFACE AddEdgeFromNodes (Graph *graph, const float *parent, const float *child, float score, const char *cost_type)
 Add an edge between parent and child. If parent or child does not already exist in the graph, they will be added and automatically assigned new IDs. More...
 
C_INTERFACE AddEdgeFromNodeIDs (Graph *graph, int parent_id, int child_id, float score, const char *cost_type)
 Create a new edge between parent_id and child_id. If these IDs do not exist in the graph, they will be added. More...
 
C_INTERFACE GetCSRPointers (Graph *graph, int *out_nnz, int *out_num_rows, int *out_num_cols, float **out_data_ptr, int **out_inner_indices_ptr, int **out_outer_indices_ptr, const char *cost_type)
 Retrieve all information for a graph's CSR representation. This will compress the graph if it was not already compressed. More...
 
C_INTERFACE GetNodeID (HF::SpatialStructures::Graph *graph, const float *point, int *out_id)
 Get the ID of the given node in the graph. If the node does not exist, out_id will be set to -1. More...
 
C_INTERFACE Compress (Graph *graph)
 Compress the given graph into a CSR representation. More...
 
C_INTERFACE ClearGraph (HF::SpatialStructures::Graph *graph, const char *cost_type)
 Clear the nodes/edges for the given graph, or clear a specific cost type. More...
 
C_INTERFACE DestroyNodes (vector< Node > *nodelist_to_destroy)
 Delete the vector of nodes at the given pointer. More...
 
C_INTERFACE DestroyEdges (vector< Edge > *edgelist_to_destroy)
 Delete the vector of edges at the given pointer. More...
 
C_INTERFACE DestroyGraph (Graph *graph_to_destroy)
 Delete a graph. More...
 
C_INTERFACE CalculateAndStoreEnergyExpenditure (HF::SpatialStructures::Graph *g)
 Calculates energy expenditure for all subgraphs in *g and stores them in the graph at AlgorithmCostTitle(ALG_COST_KEY::EnergyExpenditure) More...
 
C_INTERFACE AddNodeAttributes (Graph *g, const int *ids, const char *attribute, const char **scores, int num_nodes)
 Add a new node attribute in the graph for the nodes at ids. More...
 
C_INTERFACE GetNodeAttributes (const HF::SpatialStructures::Graph *g, const char *attribute, char **out_scores, int *out_score_size)
 Retrieve node attribute values from *g. More...
 
C_INTERFACE DeleteScoreArray (char **scores_to_delete, int num_char_arrays)
 Free the memory of every (char *) in scores_to_delete. More...
 
C_INTERFACE ClearAttributeType (HF::SpatialStructures::Graph *g, const char *s)
 Deletes the node attribute values of the type denoted by s, from graph *g. More...
 
C_INTERFACE CalculateAndStoreCrossSlope (HF::SpatialStructures::Graph *g)
 Calculates cross slope for all subgraphs in *g. More...
 
C_INTERFACE GetSizeOfGraph (const Graph *g, int *out_size)
 Get the number of nodes in a graph. More...
 
C_INTERFACE GraphAttrsToCosts (HF::SpatialStructures::Graph *graph_ptr, const char *attr_key, const char *cost_string, HF::SpatialStructures::Direction dir)
 Create a cost in the graph based on a set of node parameters. More...
 

Function Documentation

◆ parse_string()

bool parse_string ( const char *  c)
inline

Definition at line 19 of file spatialstructures_C.cpp.

Referenced by AddEdgeFromNodeIDs(), AddEdgeFromNodes(), and AggregateCosts().

+ Here is the caller graph for this function: