CSA
CSA::SharedStates< Scalar_x, Scalar_fx > Class Template Reference

Public Member Functions

State< Scalar_x, Scalar_fx > & operator[] (int i)
 
const State< Scalar_x, Scalar_fx > & operator[] (int i) const
 
 SharedStates (int m, int n, const Scalar_x *x0, Scalar_fx fx0)
 

Public Attributes

const int m
 
const int n
 
std::vector< State< Scalar_x, Scalar_fx > > states
 

Constructor & Destructor Documentation

◆ SharedStates()

template<typename Scalar_x, typename Scalar_fx>
CSA::SharedStates< Scalar_x, Scalar_fx >::SharedStates ( int  m,
int  n,
const Scalar_x *  x0,
Scalar_fx  fx0 
)
inline

Construct shared states from an initial solution.

Parameters
mThe number of threads/shared states.
nThe dimension of x0.
x0The initial solution guess. Each thread will start from the same initial solution.
fx0The value of the cost function associated with x0.

Member Data Documentation

◆ m

template<typename Scalar_x, typename Scalar_fx>
const int CSA::SharedStates< Scalar_x, Scalar_fx >::m

The number of shared states.

◆ n

template<typename Scalar_x, typename Scalar_fx>
const int CSA::SharedStates< Scalar_x, Scalar_fx >::n

The dimension of the shared states.

◆ states

template<typename Scalar_x, typename Scalar_fx>
std::vector<State<Scalar_x, Scalar_fx> > CSA::SharedStates< Scalar_x, Scalar_fx >::states

Vector of States.


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