18#define C_INTERFACE extern "C" __declspec(dllexport) int
21 namespace SpatialStructures {
241 std::vector<HF::SpatialStructures::Node>** out_vector_ptr,
279 std::vector<HF::SpatialStructures::Edge>** out_vector_ptr,
281 int* out_edge_list_size
315 const std::vector<HF::SpatialStructures::Node>* node_list,
330 const std::vector<HF::SpatialStructures::Edge>* edge_list,
373 const char * cost_type,
416 const char* cost_type,
417 std::vector<float>** out_vector_ptr,
480 const char * cost_type
510 const char * cost_type
540 float** out_data_ptr,
541 int** out_inner_indices_ptr,
542 int** out_outer_indices_ptr,
543 const char* cost_type
636 const char* cost_type
649 std::vector<HF::SpatialStructures::Node>* nodelist_to_destroy
662 std::vector<HF::SpatialStructures::Edge>* edgelist_to_destroy
778 const char* attribute,
824 const char* attribute,
916 const char * attr_key,
917 const char * cost_string,
std::string AlgorithmCostTitle(COST_ALG_KEY key)
Get the cost algorithm title (as std::string) from the COST_ALG_KEY enum member.
const std::vector< std::string > Key_To_Costs
Keys of costs for calling CalculateAndStore functions.
#define C_INTERFACE
Specifies C linkage for functions defined in the C Interface. Used for exporting C Interface function...
COST_ALG_KEY
Indices of keys for costs returned from calling CalculateAndStore functions.
@ CROSS_SLOPE
Cost created by CalculateAndStoreCrossSlope.
@ ENERGY_EXPENDITURE
Cost created by CalculateAndStoreEnergyExpenditure.
C_INTERFACE AddEdgeFromNodeIDs(HF::SpatialStructures::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,...
C_INTERFACE AggregateCosts(const HF::SpatialStructures::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.
C_INTERFACE GetAllNodesFromGraph(const HF::SpatialStructures::Graph *graph, std::vector< HF::SpatialStructures::Node > **out_vector_ptr, HF::SpatialStructures::Node **out_data_ptr)
Get a vector of every node in the given graph pointer.
C_INTERFACE CreateGraph(const float *nodes, int num_nodes, HF::SpatialStructures::Graph **out_graph)
Create a new empty graph.
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.
C_INTERFACE AddEdgeFromNodes(HF::SpatialStructures::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,...
C_INTERFACE GetCSRPointers(HF::SpatialStructures::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...
C_INTERFACE GetSizeOfGraph(const HF::SpatialStructures::Graph *g, int *out_size)
Get the number of nodes in a graph.
C_INTERFACE DestroyGraph(HF::SpatialStructures::Graph *graph_to_destroy)
Delete a graph.
C_INTERFACE GetSizeOfEdgeVector(const std::vector< HF::SpatialStructures::Edge > *edge_list, int *out_size)
Get the size of an edge vector.
C_INTERFACE ClearAttributeType(HF::SpatialStructures::Graph *g, const char *s)
Deletes the node attribute values of the type denoted by s, from graph *g.
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.
C_INTERFACE GetNodeAttributes(const HF::SpatialStructures::Graph *g, const char *attribute, char **out_scores, int *out_score_size)
Retrieve node attribute values from *g.
C_INTERFACE CalculateAndStoreEnergyExpenditure(HF::SpatialStructures::Graph *g)
Calculates energy expenditure for all subgraphs in *g and stores them in the graph at AlgorithmCostTi...
C_INTERFACE DestroyNodes(std::vector< HF::SpatialStructures::Node > *nodelist_to_destroy)
Delete the vector of nodes at the given pointer.
C_INTERFACE GetEdgeCost(const HF::SpatialStructures::Graph *g, int parent, int child, const char *cost_type, float *out_float)
Get the cost of traversing from parent to child
C_INTERFACE GetEdgesForNode(const HF::SpatialStructures::Graph *graph, const HF::SpatialStructures::Node *Node, std::vector< HF::SpatialStructures::Edge > **out_vector_ptr, HF::SpatialStructures::Edge **out_edge_list_ptr, int *out_edge_list_size)
Get a vector of edges every node in the given graph pointer.
C_INTERFACE Compress(HF::SpatialStructures::Graph *graph)
Compress the given graph into a CSR representation.
C_INTERFACE GetSizeOfNodeVector(const std::vector< HF::SpatialStructures::Node > *node_list, int *out_size)
Get the size of a node vector.
C_INTERFACE DestroyEdges(std::vector< HF::SpatialStructures::Edge > *edgelist_to_destroy)
Delete the vector of edges at the given pointer.
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.
C_INTERFACE DeleteScoreArray(char **scores_to_delete, int num_char_arrays)
Free the memory of every (char *) in scores_to_delete.
C_INTERFACE AddNodeAttributes(HF::SpatialStructures::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.
C_INTERFACE CalculateAndStoreCrossSlope(HF::SpatialStructures::Graph *g)
Calculates cross slope for all subgraphs in *g.
Perform human scale analysis on 3D environments.
COST_AGGREGATE
Methods of aggregating the costs for edges for each node in the graph.
Direction
Node to use for calculating the cost of an edge when converting node attributes to edge costs.
A connection to a child node.
A Graph of nodes connected by edges that supports both integers and HF::SpatialStructures::Node.
A point in space with an ID.