OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
SampleIndividual Class Reference

#include <SampleIndividual.h>

Public Types

typedef std::vector< double > genes_t
 representation of genes More...
 
typedef std::vector< std::string > names_t
 gene names More...
 
typedef std::vector< double > objectives_t
 objectives array More...
 

Public Member Functions

 SampleIndividual ()
 
 SampleIndividual (names_t names)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 serialization of structure More...
 
int getIndex (std::string name)
 
std::string getName (size_t i)
 
void print (std::ostream &out) const
 

Public Attributes

genes_t genes
 genes of an individual More...
 
objectives_t objectives
 values of objectives of an individual More...
 
unsigned int id = 0
 id More...
 

Private Attributes

names_t names_m
 gene names More...
 

Detailed Description

Structure for an individual in the population holding genes values.

See Also
Types.h

Definition at line 23 of file SampleIndividual.h.

Member Typedef Documentation

typedef std::vector<double> SampleIndividual::genes_t

representation of genes

Definition at line 28 of file SampleIndividual.h.

typedef std::vector<std::string> SampleIndividual::names_t

gene names

Definition at line 30 of file SampleIndividual.h.

typedef std::vector<double> SampleIndividual::objectives_t

objectives array

Definition at line 32 of file SampleIndividual.h.

Constructor & Destructor Documentation

SampleIndividual::SampleIndividual ( )
inline

Definition at line 34 of file SampleIndividual.h.

SampleIndividual::SampleIndividual ( names_t  names)
inline

Definition at line 37 of file SampleIndividual.h.

References genes.

Member Function Documentation

int SampleIndividual::getIndex ( std::string  name)
inline

Definition at line 58 of file SampleIndividual.h.

References Expressions::find(), and names_m.

Referenced by Sampler::dumpIndividualsToJSON().

Here is the call graph for this function:

std::string SampleIndividual::getName ( size_t  i)
inline

Definition at line 69 of file SampleIndividual.h.

References names_m.

void SampleIndividual::print ( std::ostream &  out) const
inline

Definition at line 73 of file SampleIndividual.h.

References endl(), genes, and names_m.

Referenced by operator<<().

Here is the call graph for this function:

template<class Archive >
void SampleIndividual::serialize ( Archive &  ar,
const unsigned int  version 
)
inline

serialization of structure

Definition at line 45 of file SampleIndividual.h.

References genes, id, and objectives.

Member Data Documentation

genes_t SampleIndividual::genes

genes of an individual

Definition at line 52 of file SampleIndividual.h.

Referenced by Sampler::dumpIndividualsToJSON(), print(), SampleIndividual(), and serialize().

unsigned int SampleIndividual::id = 0

id

Definition at line 56 of file SampleIndividual.h.

Referenced by Sampler::dumpIndividualsToJSON(), and serialize().

names_t SampleIndividual::names_m
private

gene names

Definition at line 81 of file SampleIndividual.h.

Referenced by getIndex(), getName(), and print().

objectives_t SampleIndividual::objectives

values of objectives of an individual

Definition at line 54 of file SampleIndividual.h.

Referenced by Sampler::dumpIndividualsToJSON(), and serialize().


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