|
| State (int n, const Scalar_x *x0, Scalar_fx fx0) |
|
void | step (std::vector< Scalar_x > &y, Scalar_fx y_cost) |
|
◆ State()
template<typename Scalar_x, typename Scalar_fx>
CSA::State< Scalar_x, Scalar_fx >::State |
( |
int |
n, |
|
|
const Scalar_x * |
x0, |
|
|
Scalar_fx |
fx0 |
|
) |
| |
|
inline |
Contruct a state from an initial solution.
- Parameters
-
n | The dimension of x0 . |
x0 | The initial solution guess. |
fx0 | The value of the cost function associated with x0 . |
◆ step()
template<typename Scalar_x, typename Scalar_fx>
void CSA::State< Scalar_x, Scalar_fx >::step |
( |
std::vector< Scalar_x > & |
y, |
|
|
Scalar_fx |
y_cost |
|
) |
| |
|
inline |
Move the current solution to y
. Internally, this just swaps the pointers of x
and y
.
- Parameters
-
y | The new solution. |
y_cost | The value of the cost function associated with y . |
◆ best_cost
template<typename Scalar_x, typename Scalar_fx>
Scalar_fx CSA::State< Scalar_x, Scalar_fx >::best_cost |
The cost associated with best_x
.
◆ best_x
template<typename Scalar_x, typename Scalar_fx>
std::vector<Scalar_x> CSA::State< Scalar_x, Scalar_fx >::best_x |
The solution with the best cost so far.
◆ cost
template<typename Scalar_x, typename Scalar_fx>
template<typename Scalar_x, typename Scalar_fx>
std::vector<Scalar_x> CSA::State< Scalar_x, Scalar_fx >::x |
The documentation for this class was generated from the following file: