1 #ifndef GL_PROPERTY_HPP
2 #define GL_PROPERTY_HPP
31 bool operator== (const
Property& rhs) const;
36 bool operator!= (const
Property& rhs) const;
98 inline std::
string label() const;
116 #ifndef DOXYGEN_SHOULD_SKIP_THIS
142 numNodes_ += increment;
146 GL_ASSERT(decrement <= numNodes_,
"Property::numNodesDecrement | Decrement results in negative number of nodes")
147 numNodes_ -= decrement;
161 numEdges_ += increment;
165 numEdges_ -= decrement;
169 inline std::
string Property::label()
const {
180 #endif // GL_PROPERTY_HPP
idx_t numNodes() const
Gets the number of nodes in the graph.
bool operator!=(const Property &rhs) const
Check whether two propertes are not equal.
std::string label() const
Gets the label of the graph.
void numNodesIncrement(const idx_t &increment=1)
Increments the number of nodes in the graph.
idx_t numEdges_
Number of edges in the graph.
Definition: Property.hpp:108
#define GL_ASSERT(EXPR, ERROR_MSG)
Custom assert that supports attaching a message.
Definition: gl_assert.hpp:14
idx_t numNodes_
Number of nodes in the graph.
Definition: Property.hpp:107
std::size_t index_type
Definition: gl_base.hpp:18
void numNodesDecrement(const idx_t &decrement=1)
Decrements the number of nodes in the graph.
void numEdgesIncrement(const idx_t &increment=1)
Increments the number of edges in the graph.
bool operator==(const Property &rhs) const
Check whether two propertes are equal.
Property(const idx_t &numNodes=0, const std::string &label="Graph")
Definition: Property.hpp:19
gl::index_type idx_t
Definition: Property.hpp:17
idx_t numEdges() const
Gets the number of edges in the graph.
std::string label_
Label of the graph.
Definition: Property.hpp:109
void numEdgesDecrement(const idx_t &decrement=1)
Decrements the number of edges in the graph.
Stores the properties of a Graph.
Definition: Property.hpp:14