|
anpcpp 0.1.0
Analytic Network Process computational library
|
A group of nodes (and cluster-level pairwise comparisons). More...
#include <network.hpp>
Public Member Functions | |
| AnpCluster (AnpNetwork *network, std::string name) | |
| Constructs a cluster (normally via AnpNetwork::add_cluster). | |
| const std::string & | name () const noexcept |
| const std::string & | description () const noexcept |
| void | set_description (std::string description) |
| Sets cluster description. | |
| AnpNetwork * | network () const noexcept |
| std::size_t | nnodes () const noexcept |
| AnpNode & | add_node (const std::string &name) |
| Adds a node to this cluster. | |
| void | move_node (const std::string &name, std::size_t new_index) |
| Reorders a node within this cluster (preserves pairwise data). | |
| AnpNode * | find_node (const std::string &name) |
| const AnpNode * | find_node (const std::string &name) const |
| Const overload of find_node. | |
| AnpNode & | node (const std::string &name) |
| const AnpNode & | node (const std::string &name) const |
| Const overload of node. | |
| std::vector< std::string > | node_names () const |
| std::vector< AnpNode * > | nodes () |
| std::vector< const AnpNode * > | nodes () const |
| void | cluster_connect (AnpCluster *dest) |
Connects this cluster to dest (enables cluster pairwise). | |
| PairwiseJudgments & | cluster_pairwise () |
| const PairwiseJudgments & | cluster_pairwise () const |
| Const overload of cluster_pairwise. | |
A group of nodes (and cluster-level pairwise comparisons).
| anpcpp::AnpCluster::AnpCluster | ( | AnpNetwork * | network, |
| std::string | name | ||
| ) |
Constructs a cluster (normally via AnpNetwork::add_cluster).
| network | Owning network. |
| name | Cluster name (unique within the network). |
| AnpNode & anpcpp::AnpCluster::add_node | ( | const std::string & | name | ) |
Adds a node to this cluster.
| std::runtime_error | if the name already exists in the network. |
|
inline |
|
inlinenoexcept |
| AnpNode * anpcpp::AnpCluster::find_node | ( | const std::string & | name | ) |
| void anpcpp::AnpCluster::move_node | ( | const std::string & | name, |
| std::size_t | new_index | ||
| ) |
Reorders a node within this cluster (preserves pairwise data).
| name | Node to move. |
| new_index | Target 0-based index. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| AnpNode & anpcpp::AnpCluster::node | ( | const std::string & | name | ) |
| std::out_of_range | if not found. |
| std::vector< std::string > anpcpp::AnpCluster::node_names | ( | ) | const |
| std::vector< AnpNode * > anpcpp::AnpCluster::nodes | ( | ) |
| std::vector< const AnpNode * > anpcpp::AnpCluster::nodes | ( | ) | const |