Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush::Sel::NSGA2< T > Class Template Reference

#include <nsga2.h>

Inheritance diagram for Brush::Sel::NSGA2< T >:
Collaboration diagram for Brush::Sel::NSGA2< T >:

Classes

struct  comparator_obj
 sort based on objective m More...
 
struct  sort_n
 sort based on rank, breaking ties with crowding distance More...
 

Public Member Functions

 NSGA2 (bool surv=false)
 
 ~NSGA2 ()
 
vector< size_tselect (Population< T > &pop, int island, const Parameters &p)
 selection according to the survival scheme of NSGA-II
 
vector< size_tsurvive (Population< T > &pop, int island, const Parameters &p)
 survival according to the survival scheme of NSGA-II
 
vector< vector< int > > fast_nds (Population< T > &, vector< size_t > &)
 
void crowding_distance (Population< T > &, vector< vector< int > > &, int)
 
- Public Member Functions inherited from Brush::Sel::SelectionOperator< T >
virtual ~SelectionOperator ()
 Destructor for the SelectionOperator class.
 

Private Member Functions

size_t tournament (Population< T > &pop, size_t i, size_t j) const
 

Additional Inherited Members

- Public Attributes inherited from Brush::Sel::SelectionOperator< T >
bool survival
 
string name
 

Detailed Description

template<ProgramType T>
class Brush::Sel::NSGA2< T >

Definition at line 14 of file nsga2.h.

Constructor & Destructor Documentation

◆ NSGA2()

template<ProgramType T>
Brush::Sel::NSGA2< T >::NSGA2 ( bool surv = false)

NSGA-II based selection and survival methods.

Definition at line 11 of file nsga2.cpp.

◆ ~NSGA2()

template<ProgramType T>
Brush::Sel::NSGA2< T >::~NSGA2 ( )
inline

Definition at line 23 of file nsga2.h.

Member Function Documentation

◆ crowding_distance()

template<ProgramType T>
void Brush::Sel::NSGA2< T >::crowding_distance ( Population< T > & pop,
vector< vector< int > > & front,
int fronti )

Definition at line 201 of file nsga2.cpp.

Here is the call graph for this function:

◆ fast_nds()

template<ProgramType T>
vector< vector< int > > Brush::Sel::NSGA2< T >::fast_nds ( Population< T > & pop,
vector< size_t > & island_pool )

Definition at line 116 of file nsga2.cpp.

Here is the call graph for this function:

◆ select()

template<ProgramType T>
vector< size_t > Brush::Sel::NSGA2< T >::select ( Population< T > & pop,
int island,
const Parameters & p )
virtual

selection according to the survival scheme of NSGA-II

Reimplemented from Brush::Sel::SelectionOperator< T >.

Definition at line 39 of file nsga2.cpp.

Here is the call graph for this function:

◆ survive()

template<ProgramType T>
vector< size_t > Brush::Sel::NSGA2< T >::survive ( Population< T > & pop,
int island,
const Parameters & p )
virtual

survival according to the survival scheme of NSGA-II

Reimplemented from Brush::Sel::SelectionOperator< T >.

Definition at line 69 of file nsga2.cpp.

Here is the call graph for this function:

◆ tournament()

template<ProgramType T>
size_t Brush::Sel::NSGA2< T >::tournament ( Population< T > & pop,
size_t i,
size_t j ) const
private

Definition at line 18 of file nsga2.cpp.

Here is the call graph for this function:

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