The ConnectedGroup class represents a bidirectional Map data structure between size_t (group) and a size_t set (nodes).
#include <avogadro/core/ConnectedGroup.h>
◆ ConnectedGroup() [1/2]
◆ ConnectedGroup() [2/2]
◆ ~ConnectedGroup()
◆ addNode()
void addNode |
( |
size_t |
index | ) |
|
check if index
is already in a group otherwise create one for it
◆ addNodes()
void addNodes |
( |
size_t |
n | ) |
|
create n
groups with 1 node each
◆ addConnection()
void addConnection |
( |
size_t |
a, |
|
|
size_t |
b |
|
) |
| |
node a
and b
will be in the same group
◆ removeNode()
void removeNode |
( |
size_t |
index | ) |
|
Removes the node at index
.
◆ removeConnections()
void removeConnections |
( |
| ) |
|
Makes all the nodes individual groups.
◆ removeConnection() [1/2]
void removeConnection |
( |
size_t |
index | ) |
|
Makes index
an individual group.
◆ removeConnection() [2/2]
void removeConnection |
( |
size_t |
a, |
|
|
size_t |
b, |
|
|
const std::set< size_t > & |
neighbors |
|
) |
| |
Checks if a
and b
whould be still connected and separate them if they don't
◆ clear()
◆ getGroup()
size_t getGroup |
( |
size_t |
node | ) |
const |
- Returns
- the group ID from the node .
◆ getGroupSize()
size_t getGroupSize |
( |
size_t |
node | ) |
const |
- Returns
- the group size from the node.
◆ getAllGroups()
std::vector<std::set<size_t> > getAllGroups |
( |
| ) |
const |
- Returns
- all groups and their nodes
◆ getNodes()
std::set<size_t> getNodes |
( |
size_t |
group | ) |
const |
- Returns
- all the nodes in the
group
.
◆ groupCount()
size_t groupCount |
( |
| ) |
const |
- Returns
- the total groups existing
The documentation for this class was generated from the following file: