GraphLibrary  0.0.1
A simple library that implements various graph algorithms.
 All Classes Namespaces Files Functions Variables Typedefs Macros
gl::Property Class Reference

Stores the properties of a Graph. More...

#include <Property.hpp>

Public Types

using idx_t = gl::index_type
 

Public Member Functions

 Property (const idx_t &numNodes=0, const std::string &label="Graph")
 
 Property (const Property &)=default
 Copy constructor. More...
 
 Property (Property &&) noexcept=default
 Move constructor. More...
 
Propertyoperator= (const Property &)=default
 Copy assignment. More...
 
Propertyoperator= (Property &&) noexcept=default
 Move assignment. More...
 
 ~Property ()=default
 Destructor. More...
 
bool operator== (const Property &rhs) const
 Check whether two propertes are equal. More...
 
bool operator!= (const Property &rhs) const
 Check whether two propertes are not equal. More...
 
numNodes

Access to the number of nodes in the graph.

idx_t numNodes () const
 Gets the number of nodes in the graph. More...
 
void numNodes (const idx_t &numNodes)
 Allows changing the number of nodes in the graph. More...
 
void numNodesIncrement (const idx_t &increment=1)
 Increments the number of nodes in the graph. More...
 
void numNodesDecrement (const idx_t &decrement=1)
 Decrements the number of nodes in the graph. More...
 
numEdges

Access to the number of edges in the graph.

idx_t numEdges () const
 Gets the number of edges in the graph. More...
 
void numEdges (const idx_t &numEdges)
 Allows changing the number of edges in the graph. More...
 
void numEdgesIncrement (const idx_t &increment=1)
 Increments the number of edges in the graph. More...
 
void numEdgesDecrement (const idx_t &decrement=1)
 Decrements the number of edges in the graph. More...
 
Label

Access to label of the graph.

std::string label () const
 Gets the label of the graph. More...
 
void label (const std::string &label)
 Allows changing the label of the graph. More...
 

Private Attributes

idx_t numNodes_
 Number of nodes in the graph. More...
 
idx_t numEdges_
 Number of edges in the graph. More...
 
std::string label_
 Label of the graph. More...
 

Detailed Description

Stores the properties of a Graph.

Member Typedef Documentation

Constructor & Destructor Documentation

gl::Property::Property ( const idx_t numNodes = 0,
const std::string &  label = "Graph" 
)
inline
gl::Property::Property ( const Property )
default

Copy constructor.

gl::Property::Property ( Property &&  )
defaultnoexcept

Move constructor.

gl::Property::~Property ( )
default

Destructor.

Member Function Documentation

Property& gl::Property::operator= ( const Property )
default

Copy assignment.

Property& gl::Property::operator= ( Property &&  )
defaultnoexcept

Move assignment.

bool gl::Property::operator== ( const Property rhs) const

Check whether two propertes are equal.

Returns
true if equal, false otherwise.
bool gl::Property::operator!= ( const Property rhs) const

Check whether two propertes are not equal.

Returns
true if not equal, false otherwise.
idx_t gl::Property::numNodes ( ) const
inline

Gets the number of nodes in the graph.

Returns
Number of nodes in the graph.
void gl::Property::numNodes ( const idx_t numNodes)
inline

Allows changing the number of nodes in the graph.

Parameters
[in]numNodesNew value of node count.
void gl::Property::numNodesIncrement ( const idx_t increment = 1)
inline

Increments the number of nodes in the graph.

Parameters
[in]incrementNumber of nodes that will be added to the graph.
void gl::Property::numNodesDecrement ( const idx_t decrement = 1)
inline

Decrements the number of nodes in the graph.

Parameters
[in]decrementNumber of nodes that will be removed from the graph.
idx_t gl::Property::numEdges ( ) const
inline

Gets the number of edges in the graph.

Returns
Number of edges in the graph.
void gl::Property::numEdges ( const idx_t numEdges)
inline

Allows changing the number of edges in the graph.

Parameters
[in]numEdgesNew value of edge count.
void gl::Property::numEdgesIncrement ( const idx_t increment = 1)
inline

Increments the number of edges in the graph.

Parameters
[in]incrementNumber of nodes that will be added to the graph.
void gl::Property::numEdgesDecrement ( const idx_t decrement = 1)
inline

Decrements the number of edges in the graph.

Parameters
[in]decrementNumber of edges that will be removed from the graph.
std::string gl::Property::label ( ) const
inline

Gets the label of the graph.

Returns
Graph name.
void gl::Property::label ( const std::string &  label)
inline

Allows changing the label of the graph.

Parameters
[in]labelNew graph name.

Member Data Documentation

idx_t gl::Property::numNodes_
private

Number of nodes in the graph.

idx_t gl::Property::numEdges_
private

Number of edges in the graph.

std::string gl::Property::label_
private

Label of the graph.


The documentation for this class was generated from the following file: