#include <domain.h>
List of all members.
Public Member Functions |
| DomainReal (unsigned int dim) |
void | setValues (unsigned int gen, tReal min, tReal max, bool check=true) |
void | setSearchDomain (bool *searchDim, int dim) |
void | getSearchDomain (bool *searchDim, int dim) |
void | getValues (unsigned int gen, tReal *pmin, tReal *pmax, bool check=true) |
bool | canBeChanged (unsigned dim) |
tReal | clip (unsigned int gen, tReal value, bool check=true) |
void | setDomainCenter (tChromosomeReal center, double scale) |
void | clip (tChromosomeReal &crom) |
bool | check (const tChromosomeReal &crom) |
unsigned | getDimension (void) |
void | setBounds (void) |
Detailed Description
Represents the search domain.
It stores the maximum and minimum values for each dimension.
Definition at line 36 of file domain.h.
Constructor & Destructor Documentation
DomainReal::DomainReal |
( |
unsigned int |
dim |
) |
|
Constructor without specify the max and min values. If this constructor is applied, setValues must be specify for each value
- Parameters:
-
| dim | dimension of chromosomes |
- See also:
- setValues
Definition at line 28 of file domain.cc.
Member Function Documentation
bool DomainReal::canBeChanged |
( |
unsigned |
dim |
) |
|
Return if the dimension index can be changed during the search
- Parameters:
-
| dim | dimension index (0..ndim) |
- Returns:
- true if the current dimension dim must be used into the search (false in othercase)
Definition at line 82 of file domain.cc.
bool DomainReal::check |
( |
const tChromosomeReal & |
crom |
) |
|
check if the chromosome folow the domain restrictions
- Parameters:
-
| crom | chrosomome to check, it can't be changed |
- Returns:
- true if the chromosome has valid values
Definition at line 107 of file domain.cc.
void DomainReal::clip |
( |
tChromosomeReal & |
crom |
) |
|
Clip each one of the gens of the indicated chromosome
- Parameters:
-
| crom | chromosome to check, it can be modified |
Definition at line 93 of file domain.cc.
tReal DomainReal::clip |
( |
unsigned int |
gen, |
|
|
tReal |
value, |
|
|
bool |
check = true | |
|
) |
| | |
clip the real (checking that it is between the [min,max] values for this gen)
- Parameters:
-
| gen | gen to check |
| value | value to check |
- Returns:
- the min if (value < min), value if (value <= max); max if (value > max), original value othercase
Definition at line 61 of file domain.cc.
unsigned realea::DomainReal::getDimension |
( |
void |
|
) |
[inline] |
- Returns:
- the dimensionality
Definition at line 142 of file domain.h.
void DomainReal::getSearchDomain |
( |
bool * |
searchDim, |
|
|
int |
dim | |
|
) |
| | |
Get the dimension to search
Definition at line 166 of file domain.cc.
void DomainReal::getValues |
( |
unsigned int |
gen, |
|
|
tReal * |
pmin, |
|
|
tReal * |
pmax, |
|
|
bool |
check = true | |
|
) |
| | |
Recovers the min and max value for a gen
- Parameters:
-
| gen | gen to consult (from 0 to ndim() -1) |
| pmin | minimun value of this gen, output |
| pmax | maximun value of this gen, output |
| check | if it must be checked the position gen |
Definition at line 43 of file domain.cc.
void realea::DomainReal::setBounds |
( |
void |
|
) |
[inline] |
Set the bound. It is set the clip check the solutions
Definition at line 150 of file domain.h.
void DomainReal::setDomainCenter |
( |
tChromosomeReal |
center, |
|
|
double |
scale | |
|
) |
| | |
Set the scale of the domain search around a solution
- Parameters:
-
| center | center of the new domain. |
| scale | scale of the domain search. 1->not changed, 0.1->10% of previous scale. |
Never it allow to over the original bounds
Definition at line 121 of file domain.cc.
void DomainReal::setSearchDomain |
( |
bool * |
searchDim, |
|
|
int |
dim | |
|
) |
| | |
Set the dimensions to search
- Parameters:
-
| searchDim | vector of boolean indicating the gens to be searched |
| dim | dimension of the vector |
Definition at line 161 of file domain.cc.
void DomainReal::setValues |
( |
unsigned int |
gen, |
|
|
tReal |
min, |
|
|
tReal |
max, |
|
|
bool |
check = true | |
|
) |
| | |
Specifies the min and max value for a gen
- Parameters:
-
| gen | gen to configurate (from 0 to ndim() -1) |
| min | minimum value for this gen |
| max | maximum value for this gen |
| check | if it must be checked the position gen |
- See also:
- getValues
Definition at line 51 of file domain.cc.
The documentation for this class was generated from the following files: