Criterion datastructure.
More...
#include <Criterion.h>
|
|
std::ostream & | operator<< (std::ostream &out, const Criterion &crit) |
| |
Criterion datastructure.
The Criterion datastructure is represented by its name, its weight and its direction, representing the minimization of maximization of this criterion.
◆ Criterion() [1/2]
| Criterion::Criterion |
( |
std::string |
id, |
|
|
int |
direction = 1, |
|
|
float |
weight = 0.0f |
|
) |
| |
Criterion standard constructor
- Parameters
-
| id | Identifier of the criterion |
| direction | Equal to -1 if criterion is to minimize, 1 if the criterion is to maximize |
| weight | Weight of the criterion |
◆ Criterion() [2/2]
| Criterion::Criterion |
( |
const Criterion & |
crit | ) |
|
Criterion constructor by copy
- Parameters
-
| crit | Based criterion to copy |
◆ generateDirection()
| void Criterion::generateDirection |
( |
unsigned long int |
seed = 0 | ) |
|
generateDirection generator of random direction can also be used as reinitialisation for direction
- Parameters
-
| seed | Optional: seed for random generation. Set to 0 by default |
◆ generateWeight()
| void Criterion::generateWeight |
( |
unsigned long int |
seed = 0 | ) |
|
generateWeight generator of random weight can also be used as reinitialisation for weight
- Parameters
-
| seed | Optional: seed for random generation. Set to 0 by default |
◆ getDirection()
| int Criterion::getDirection |
( |
| ) |
const |
getName getter of name parameter
- Returns
- name
◆ getId()
| std::string Criterion::getId |
( |
| ) |
const |
getId getter of id parameter
- Returns
- id
◆ getWeight()
| float Criterion::getWeight |
( |
| ) |
const |
getWeight getter of weight parameter
- Returns
- weight
◆ setDirection()
| void Criterion::setDirection |
( |
int |
direction | ) |
|
setDirection setter of direction parameter
- Parameters
-
◆ setId()
| void Criterion::setId |
( |
std::string |
id | ) |
|
setId setter of id parameter
- Parameters
-
◆ setWeight()
| void Criterion::setWeight |
( |
float |
weight | ) |
|
setWeight setter of weight parameter
- Parameters
-
The documentation for this class was generated from the following file:
- /Users/ThomasVindard 1/Desktop/3A/Projet/fastPL/include/types/Criterion.h