Visual Computing Library
|
Public Types | |
using | LeftType = T1 |
using | RightType = T2 |
using | LeftNodeType = UndirectedNode< T1 > |
using | RightNodeType = UndirectedNode< T2 > |
using | LeftNodeIterator = NodeIterator< typename std::vector< UndirectedNode< T1 > >::const_iterator > |
using | RightNodeIterator = NodeIterator< typename std::vector< UndirectedNode< T2 > >::const_iterator > |
using | LeftNodeView = View< LeftNodeIterator > |
using | RightNodeView = View< RightNodeIterator > |
using | AdjacentLeftNodeIterator = detail::AdjacentLeftNodeIterator< BipartiteGraph< T1, T2 >, std::unordered_set< unsigned int >::const_iterator > |
using | AdjacentRightNodeIterator = detail::AdjacentRightNodeIterator< BipartiteGraph< T1, T2 >, std::unordered_set< unsigned int >::const_iterator > |
using | AdjacentLeftNodeView = View< AdjacentLeftNodeIterator > |
using | AdjacentRightNodeView = View< AdjacentRightNodeIterator > |
Public Member Functions | |
BipartiteGraph () | |
Default constructor. It creates an empty Bipartite Graph. | |
bool | leftNodeExists (const T1 &lNode) const |
Checks if a node exists on the left side of the graph. | |
bool | rightNodeExists (const T2 &rNode) const |
Checks if a node exists on the right side of the graph. | |
uint | leftNodesNumber () const |
Returns the number of left nodes of the graph. | |
uint | rightNodesNumber () const |
Returns the number of right nodes of the graph. | |
uint | adjacentLeftNodeNumber (const T1 &lNode) const |
Returns the number of adjacent nodes to lNode . | |
uint | adjacentRightNodeNumber (const T2 &rNode) const |
Returns the number of adjacent nodes to rNode . | |
bool | addLeftNode (const T1 &info) |
Adds a new node on the left side of the graph. | |
bool | addRightNode (const T2 &info) |
Adds a new node on the right side of the graph. | |
bool | deleteLeftNode (const T1 &lNode) |
Removes lNode and all its arcs from the graph. | |
bool | deleteRightNode (const T2 &rNode) |
Removes rNode and all its arcs from the graph. | |
bool | addArc (const T1 &lNode, const T2 &rNode) |
Creates an arc between lNode and rNode. | |
bool | deleteArc (const T1 &lNode, const T2 &rNode) |
Removes the arc between lNode and rNode. | |
bool | clearAdjacenciesLeftNode (const T1 &lNode) |
Removes all the arcs connected to lNode (lNode won't have adjacent nodes) | |
bool | clearAdjacenciesRightNode (const T2 &rNode) |
Removes all the arcs connected to rNode (lNode won't have adjacent nodes) | |
bool | setLeftNode (const T1 &old, const T1 &newInfo) |
Sets the key of an lNode. | |
bool | setRightNode (const T2 &old, const T2 &newInfo) |
Sets the key of a rNode. | |
AdjacentLeftNodeIterator | adjacentLeftNodeBegin (const T1 &lNode) const |
AdjacentLeftNodeIterator | adjacentLeftNodeEnd (const T1 &lNode) const |
AdjacentRightNodeIterator | adjacentRightNodeBegin (const T2 &rNode) const |
AdjacentRightNodeIterator | adjacentRightNodeEnd (const T2 &rNode) const |
LeftNodeIterator | leftNodeBegin () const |
LeftNodeIterator | leftNodeEnd () const |
RightNodeIterator | rightNodeBegin () const |
RightNodeIterator | rightNodeEnd () const |
LeftNodeView | leftNodes () const |
RightNodeView | rightNodes () const |
AdjacentLeftNodeView | adjacentLeftNodes (const T1 &lNode) const |
AdjacentRightNodeView | adjacentRightNodes (const T2 &rNode) const |
Protected Member Functions | |
int | getIdLeftNode (const T1 &uNode) const |
int | getIdRightNode (const T2 &vNode) const |
Protected Attributes | |
std::map< T1, unsigned int > | mMapL |
std::map< T2, unsigned int > | mMapR |
std::vector< UndirectedNode< T1 > > | mNodesL |
std::vector< UndirectedNode< T2 > > | mNodesR |
std::set< unsigned int > | mUnusedLNodes |
std::set< unsigned int > | mUnusedRNodes |
Creates an arc between lNode and rNode.
lNode | |
rNode |
Adds a new node on the left side of the graph.
[in] | info | the value associated to the new node |
Adds a new node on the right side of the graph.
[in] | info | the value associated to the new node |
Returns the number of adjacent nodes to lNode
.
lNode |
Returns the number of adjacent nodes to rNode
.
rNode |
Removes all the arcs connected to lNode (lNode won't have adjacent nodes)
lNode |
Removes all the arcs connected to rNode (lNode won't have adjacent nodes)
rNode |
Removes the arc between lNode and rNode.
lNode | |
rNode |
Removes lNode and all its arcs from the graph.
lNode |
Removes rNode and all its arcs from the graph.
rNode |
Checks if a node exists on the left side of the graph.
lNode |
Returns the number of left nodes of the graph.
Checks if a node exists on the right side of the graph.
rNode |
|
inline |
Returns the number of right nodes of the graph.
Sets the key of an lNode.
old | |
newInfo |
Sets the key of a rNode.
old | |
newInfo |