|
anpcpp 0.4.0
Analytic Network Process computational library
|
Stores either pairwise or ratings judgments for one dest cluster. More...
#include <network.hpp>
Public Member Functions | |
| const std::vector< std::string > & | alternatives () const |
| bool | empty () const |
| bool | has_alternative (const std::string &name) const |
| void | add_alternative (const std::string &name, bool ignore_existing=false) |
Adds name to the active prioritizer and all user tables. | |
| void | remove_alternative (const std::string &name, bool ignore_missing=false) |
Removes name from the active prioritizer and all user tables. | |
| void | rename_alternative (const std::string &old_name, const std::string &new_name) |
| Renames an alternative in the active prioritizer and user tables. | |
| Vector | priorities () const |
| void | set_kind (NodePrioritizerKind new_kind) |
| Switches kind, preserving the alternative name list. | |
| PairwiseJudgments & | ensure_user_pairwise (const std::string &user_id) |
Ensures a user pairwise table exists (identity) for user_id. | |
| RatingsPrioritizer & | ensure_user_ratings (const std::string &user_id) |
Ensures a user ratings table exists for user_id. | |
| void | sync_ratings_scale_to_users () |
Syncs categories/interpreter/mode from ratings into all users. | |
Public Attributes | |
| std::map< std::string, PairwiseJudgments > | user_pairwise |
Per-participant pairwise (same alternatives as pairwise). | |
| std::map< std::string, RatingsPrioritizer > | user_ratings |
| Per-participant ratings votes. | |
Stores either pairwise or ratings judgments for one dest cluster.
pairwise / ratings hold the effective judgments used by calc. Per-user tables live in user_pairwise / user_ratings; call AnpNetwork::rebuild_effective_judgments after edits or scope changes.
| const std::vector< std::string > & anpcpp::NodePrioritizerSlot::alternatives | ( | ) | const |
| bool anpcpp::NodePrioritizerSlot::empty | ( | ) | const |
| bool anpcpp::NodePrioritizerSlot::has_alternative | ( | const std::string & | name | ) | const |
name is an alternative in the active prioritizer. | Vector anpcpp::NodePrioritizerSlot::priorities | ( | ) | const |
| void anpcpp::NodePrioritizerSlot::set_kind | ( | NodePrioritizerKind | new_kind | ) |
Switches kind, preserving the alternative name list.
Pairwise is reset to an identity diagonal; ratings start empty with numeric + Identity interpreter. User maps for the new kind are ensured empty shells matching alternatives.
| std::map<std::string, RatingsPrioritizer> anpcpp::NodePrioritizerSlot::user_ratings |
Per-participant ratings votes.
Shared scale (categories / interpreter / mode) is kept on ratings and synced into user tables when the scale changes.