Class HostEnvironmentDirectedGraph::VertexMap
Defined in File HostEnvironmentDirectedGraph.cuh
Nested Relationships
This class is a nested type of Class HostEnvironmentDirectedGraph.
Nested Types
Class Documentation
-
class VertexMap
A map for accessing vertex storage via vertex ID
Public Functions
-
Vertex operator[](id_t vertex_id)
Return a view into the vertex map of the specified vertex If the vertex has not already been created, it will be created
- Parameters:
vertex_id – Identifier of the vertex to access
- Throws:
exception::IDOutOfBounds – 0 is not a valid value of vertex_id
exception::OutOfBoundsException – If more vertices have been created, than were allocated via HostEnvironmentGraph::setVertexCount()
-
class Vertex
Public Functions
-
void setID(id_t vertex_id)
Set the id for the current vertex
- Parameters:
vertex_id – The value to set the current vertex’s id
-
template<typename T>
void setProperty(const std::string &property_name, T property_value) Set the value of the specified property of the current vertex
- Parameters:
property_name – The name of the property to set
property_value – The value to set the current vertex’s property
- Template Parameters:
T – The type of the property
- Throws:
exception::InvalidArgument – If property_name does not refer to a valid vertex property
-
template<typename T, flamegpu::size_type N = 0>
void setProperty(const std::string &property_name, flamegpu::size_type element_index, T property_value)
-
template<typename T, flamegpu::size_type N>
void setProperty(const std::string &property_name, const std::array<T, N> &property_value)
-
id_t getID() const
Returns the id for the current vertex
-
template<typename T>
T getProperty(const std::string &property_name) const Returns the value of the specified property of the current vertex
- Parameters:
property_name – The name of the property to set
- Template Parameters:
T – The type of the property
- Throws:
exception::InvalidArgument – If property_name does not refer to a valid vertex property
exception::InvalidGraphProperty – If a vertex property with the matching name and type does not exist
-
void setID(id_t vertex_id)
-
Vertex operator[](id_t vertex_id)