|
Project
|
Set of Criterion datastructure. More...
#include <Criteria.h>
Public Member Functions | |
| Criteria (std::vector< Criterion > &criterion_vect) | |
| Criteria (int nb_of_criterion, std::string prefix="crit") | |
| Criteria (const Criteria &crits) | |
| void | setCriterionVect (std::vector< Criterion > &criterion_vect_) |
| std::vector< Criterion > | getCriterionVect () const |
| float | getMinWeight () |
| float | getMaxWeight () |
| float | getSumWeight () |
| std::vector< float > | getWeights () const |
| void | setWeights (std::vector< float > newWeights) |
| void | normalizeWeights () |
| void | generateRandomCriteriaWeights (unsigned long int seed=time(NULL)) |
| Criterion | operator[] (std::string name) const |
| Criterion | operator[] (int index) |
| Criterion | operator[] (int index) const |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Criteria &crits) |
Set of Criterion datastructure.
The Criteria datastructure represents a full set of Criterion. It is implemented with a c++ Vector.
It is used to represents all the criterion defined in a dataset. Each criterion is independent from the other, and no order should be implied in the vector.
| Criteria::Criteria | ( | std::vector< Criterion > & | criterion_vect | ) |
Criteria constructor with defined vector of criteria
| criterion_vect | Vector of criteria |
| Criteria::Criteria | ( | int | nb_of_criterion, |
| std::string | prefix = "crit" |
||
| ) |
Criteria constructor without vector
| nb_of_criterion | Number of criteria |
| prefix | Prefix to identify criteria |
| Criteria::Criteria | ( | const Criteria & | crits | ) |
Criteria constructor by copy
| crits | Based criteria to copy |
| void Criteria::generateRandomCriteriaWeights | ( | unsigned long int | seed = time(NULL) | ) |
| std::vector<Criterion> Criteria::getCriterionVect | ( | ) | const |
getCriterionVect getter of criterion vector parameter
| float Criteria::getMaxWeight | ( | ) |
getMaxWeight return the max criterion weight of this Criteria structure
| float Criteria::getMinWeight | ( | ) |
getMinWeight return the min criterion weight of this Criteria structure
| float Criteria::getSumWeight | ( | ) |
getSumWeight return the sum of criterion weight of this Criteria structure
| std::vector<float> Criteria::getWeights | ( | ) | const |
getWeights returns an vector of all the weight from the Criteria structure
| void Criteria::normalizeWeights | ( | ) |
normalizeWeights normalizes the weights of each criterion in the Criteria object
| Criterion Criteria::operator[] | ( | int | index | ) |
| Criterion Criteria::operator[] | ( | std::string | name | ) | const |
| void Criteria::setCriterionVect | ( | std::vector< Criterion > & | criterion_vect_ | ) |
setCriterionVect setter of criterion vector parameter
| criterion_vect_ |
| void Criteria::setWeights | ( | std::vector< float > | newWeights | ) |
Set new weights in the Criteria object