OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
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)
 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

Definition at line 37 of file SampleIndividual.h.

Member Typedef Documentation

◆ genes_t

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

representation of genes

Definition at line 42 of file SampleIndividual.h.

◆ names_t

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

gene names

Definition at line 44 of file SampleIndividual.h.

◆ objectives_t

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

objectives array

Definition at line 46 of file SampleIndividual.h.

Constructor & Destructor Documentation

◆ SampleIndividual() [1/2]

SampleIndividual::SampleIndividual ( )
inline

Definition at line 48 of file SampleIndividual.h.

◆ SampleIndividual() [2/2]

SampleIndividual::SampleIndividual ( names_t  names)
inline

Definition at line 51 of file SampleIndividual.h.

References genes.

Member Function Documentation

◆ getIndex()

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

Definition at line 72 of file SampleIndividual.h.

References begin(), end(), Expressions::find(), name, and names_m.

Here is the call graph for this function:

◆ getName()

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

Definition at line 83 of file SampleIndividual.h.

References names_m.

◆ print()

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

Definition at line 87 of file SampleIndividual.h.

References endl(), genes, and names_m.

Referenced by operator<<().

Here is the call graph for this function:

◆ serialize()

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

serialization of structure

Definition at line 59 of file SampleIndividual.h.

References genes, id, and objectives.

Member Data Documentation

◆ genes

genes_t SampleIndividual::genes

genes of an individual

Definition at line 66 of file SampleIndividual.h.

Referenced by print(), SampleIndividual(), and serialize().

◆ id

unsigned int SampleIndividual::id = 0

id

Definition at line 70 of file SampleIndividual.h.

Referenced by serialize().

◆ names_m

names_t SampleIndividual::names_m
private

gene names

Definition at line 95 of file SampleIndividual.h.

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

◆ objectives

objectives_t SampleIndividual::objectives

values of objectives of an individual

Definition at line 68 of file SampleIndividual.h.

Referenced by serialize().


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