- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# moeoObjectiveVector< ObjectiveVectorTraits, ObjectiveVectorType > Class Template Reference

Abstract class allowing to represent a solution in the objective space (phenotypic representation). More...

`#include <moeoObjectiveVector.h>`

List of all members.

## Public Types
typedef ObjectiveVectorTraits | Traits
| The traits of objective vectors.
typedef ObjectiveVectorType | Type
| The type of an objective value.
## Public Member Functions
| moeoObjectiveVector (Type _value=Type())
| Ctor.
| moeoObjectiveVector (std::vector< Type > &_v)
| Ctor from a vector of Type.
## Static Public Member Functions
static void | setup (unsigned int _nObjectives, std::vector< bool > &_bObjectives)
| Parameters setting (for the objective vector of any solution).
static unsigned int | nObjectives ()
| Returns the number of objectives.
static bool | minimizing (unsigned int _i)
| Returns true if the _ith objective have to be minimized.
static bool | maximizing (unsigned int _i)
| Returns true if the _ith objective have to be maximized.

## Detailed Description

### template<class ObjectiveVectorTraits, class ObjectiveVectorType>
class moeoObjectiveVector< ObjectiveVectorTraits, ObjectiveVectorType >

Abstract class allowing to represent a solution in the objective space (phenotypic representation).

The template argument ObjectiveVectorTraits defaults to moeoObjectiveVectorTraits, but it can be replaced at will by any other class that implements the static functions defined therein. Some static funtions to access to the traits characteristics are re-defined in order not to write a lot of typedef's.

Definition at line 25 of file moeoObjectiveVector.h.

## Constructor & Destructor Documentation

template<class ObjectiveVectorTraits, class ObjectiveVectorType>

moeoObjectiveVector< ObjectiveVectorTraits, ObjectiveVectorType >::moeoObjectiveVector | ( | std::vector< Type > & | _v | ) | `[inline]`

Ctor from a vector of Type.

Parameters:

  | _v | the std::vector < Type >

Definition at line 46 of file moeoObjectiveVector.h.

## Member Function Documentation

template<class ObjectiveVectorTraits, class ObjectiveVectorType>

static void moeoObjectiveVector< ObjectiveVectorTraits, ObjectiveVectorType >::setup | ( | unsigned int | _nObjectives,
|  | std::vector< bool > & | _bObjectives |
| ) |  |  | `[inline, static]`

Parameters setting (for the objective vector of any solution).

Parameters:

  | _nObjectives | the number of objectives
  | _bObjectives | the min/max vector (true = min / false = max)

Definition at line 55 of file moeoObjectiveVector.h.

template<class ObjectiveVectorTraits, class ObjectiveVectorType>

static bool moeoObjectiveVector< ObjectiveVectorTraits, ObjectiveVectorType >::minimizing | ( | unsigned int | _i | ) | `[inline, static]`

Returns true if the _ith objective have to be minimized.

Parameters:

  | _i | the index

Definition at line 74 of file moeoObjectiveVector.h.

template<class ObjectiveVectorTraits, class ObjectiveVectorType>

static bool moeoObjectiveVector< ObjectiveVectorTraits, ObjectiveVectorType >::maximizing | ( | unsigned int | _i | ) | `[inline, static]`

Returns true if the _ith objective have to be maximized.

Parameters:

  | _i | the index

Definition at line 84 of file moeoObjectiveVector.h.

The documentation for this class was generated from the following file:

- moeoObjectiveVector.h