2#include <NDEVR/Buffer.h>
3#include <NDEVR/Dictionary.h>
164 lib_assert(!
_vertices.contains(v.
id()),
"duplicate vertex entry");
175 lib_assert(!
_edges.contains(e),
"duplicate vertex entry");
182 lib_assert(!v->edges().contains(e),
"Already added vertex");
199 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
virtual const HGVertex * vertex(uint04 i) const =0
Returns a const pointer to the i-th vertex.
int id() const
returns the id of this edge
virtual void setVertex(uint04 i, HGVertex *v)=0
Sets the i-th vertex of this edge.
virtual uint04 vertexCount() const =0
Returns the number of vertices connected by this edge.
void setId(int id)
sets the id of this edge
virtual HGVertex * vertex(uint04 i)=0
Returns a mutable pointer to the i-th vertex.
HGEdge(int id=-1)
creates and empty edge with no vertices
abstract Vertex, your types must derive from that one
Buffer< HGEdge * > & edges()
returns the set of hyper-edges that are leaving/entering in this vertex
int _id
Unique identifier for this vertex.
int id() const
returns the id
Buffer< HGEdge * > _edges
Set of edges connected to this vertex.
void setId(int newId)
sets the id of this vertex
HGVertex(int id=-1)
creates a vertex having an ID specified by the argument
const Buffer< HGEdge * > & edges() const
returns the set of hyper-edges that are leaving/entering in this vertex
HyperGraph()
constructs an empty hyper graph
virtual void clear()
removes a vertex from the graph. Returns true on success (vertex was present)
virtual ~HyperGraph()
destroys the hyper-graph and all the vertices of the graph
virtual bool addEdge(HGEdge *e)
Adds an edge to the graph.
const HGVertex * vertex(int id) const
returns a vertex id in the hyper-graph, or 0 if the vertex id is not present
Dictionary< int, HGVertex * > & vertices()
const Dictionary< int, HGVertex * > & vertices() const
const Buffer< HGEdge * > & edges() const
Dictionary< int, HGVertex * > _vertices
Map from vertex id to vertex pointer.
Buffer< HGEdge * > & edges()
virtual bool addVertex(HGVertex &v)
adds a vertex to the graph.
Buffer< HGEdge * > _edges
Collection of all edges in the graph.
HGVertex * vertex(int id)
returns a vertex id in the hyper-graph, or 0 if the vertex id is not present
Convenience typedefs for commonly used Eigen vector, matrix, and transform types.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...