dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
Front< S > Class Template Reference

Front class which stores the final results of an EA execution. More...

#include <Front.h>

Public Member Functions

 Front (const int &nSolutions)
 Construct a new Front object. More...
 
 Front (const vector< S > &solutions)
 Construct a new Front object with the solutions in the vector sols. More...
 
 Front (const Front< S > &copy)
 Construct a new Front object copying an existing one. More...
 
 Front (const Front< S > *copy)
 Construct a new Front object copying an existing one. More...
 
void setSolutions (const vector< S > &solutions)
 Resets the front with the solutions in the vector solutions. More...
 
vector< S > getSolutions () const
 Returns the solutions in the front. More...
 
void addSolution (const S &solution)
 Includes a new solution in the front. This is only for single-objective solutions. More...
 
void addSolution (const S &solution, const Problem< S > *problem)
 Includes a new solution in the front. More...
 
int getNumOfSolutions () const
 Gets the number of solutions in the front. More...
 
bool empty () const
 Checks whether the front is empty or not. More...
 
json to_json () const
 Creates a JSON object with the information of the Front. More...
 

Detailed Description

template<class S>
class Front< S >

Front class which stores the final results of an EA execution.

Template Parameters
SType of individual in the population

Constructor & Destructor Documentation

◆ Front() [1/4]

template<class S >
Front< S >::Front ( const int &  nSolutions)

Construct a new Front object.

Template Parameters
S
Parameters
nSolutionsnumber of solutions to set in the front

◆ Front() [2/4]

template<class S >
Front< S >::Front ( const vector< S > &  sols)

Construct a new Front object with the solutions in the vector sols.

Template Parameters
S
Parameters
solsSolutions to insert in the front.

◆ Front() [3/4]

template<class S >
Front< S >::Front ( const Front< S > &  copy)

Construct a new Front object copying an existing one.

Template Parameters
S
Parameters
copyFront to copy.

◆ Front() [4/4]

template<class S >
Front< S >::Front ( const Front< S > *  copy)

Construct a new Front object copying an existing one.

Template Parameters
S
Parameters
copyPointer to the front to copy.

Member Function Documentation

◆ addSolution() [1/2]

template<class S >
void Front< S >::addSolution ( const S &  solution)

Includes a new solution in the front. This is only for single-objective solutions.

Template Parameters
S
Parameters
solution

◆ addSolution() [2/2]

template<class S >
void Front< S >::addSolution ( const S &  solution,
const Problem< S > *  problem 
)

Includes a new solution in the front.

Template Parameters
S
Parameters
solution

◆ empty()

template<class S >
bool Front< S >::empty ( ) const
inline

Checks whether the front is empty or not.

Returns
true
false

◆ getNumOfSolutions()

template<class S >
int Front< S >::getNumOfSolutions ( ) const
inline

Gets the number of solutions in the front.

Returns
int

◆ getSolutions()

template<class S >
vector< S > Front< S >::getSolutions

Returns the solutions in the front.

Template Parameters
S
Returns
vector

◆ setSolutions()

template<class S >
void Front< S >::setSolutions ( const vector< S > &  solutions)

Resets the front with the solutions in the vector solutions.

Template Parameters
S
Parameters
solutions

◆ to_json()

template<class S >
json Front< S >::to_json

Creates a JSON object with the information of the Front.

Template Parameters
S
Returns
json object with the front information

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