Public Member Functions | |
LRSDP (const size_t numConstraints, const arma::mat &initialPoint, AugLagrangian< LRSDP > &augLagrangian) | |
Create an LRSDP to be optimized, passing in an already-created AugLagrangian object. | |
LRSDP (const size_t numConstraints, const arma::mat &initialPoint) | |
Create an LRSDP to be optimized. | |
std::vector< arma::mat > & | A () |
Modify the veector of A matrices (which correspond to the constraints). | |
const std::vector< arma::mat > & | A () const |
Return the vector of A matrices (which correspond to the constraints). | |
arma::uvec & | AModes () |
Modify the vector of modes for the A matrices. | |
const arma::uvec & | AModes () const |
Return the vector of modes for the A matrices. | |
AugLagrangian< LRSDP > & | AugLag () |
Modify the augmented Lagrangian object. | |
const AugLagrangian< LRSDP > & | AugLag () const |
Return the augmented Lagrangian object. | |
arma::vec & | B () |
Modify the vector of B values. | |
const arma::vec & | B () const |
Return the vector of B values. | |
arma::mat & | C () |
Modify the objective function matrix (C). | |
const arma::mat & | C () const |
Return the objective function matrix (C). | |
double | Evaluate (const arma::mat &coordinates) const |
Evaluate the objective function of the LRSDP (no constraints) at the given coordinates. | |
double | EvaluateConstraint (const size_t index, const arma::mat &coordinates) const |
Evaluate a particular constraint of the LRSDP at the given coordinates. | |
const arma::mat & | GetInitialPoint () |
Get the initial point of the LRSDP. | |
void | Gradient (const arma::mat &coordinates, arma::mat &gradient) const |
Evaluate the gradient of the LRSDP (no constraints) at the given coordinates. | |
void | GradientConstraint (const size_t index, const arma::mat &coordinates, arma::mat &gradient) const |
Evaluate the gradient of a particular constraint of the LRSDP at the given coordinates. | |
size_t | NumConstraints () const |
Get the number of constraints in the LRSDP. | |
double | Optimize (arma::mat &coordinates) |
Optimize the LRSDP and return the final objective value. | |
Private Attributes | |
std::vector< arma::mat > | a |
A_i for each constraint. | |
arma::uvec | aModes |
1 if entries in matrix, 0 for normal. | |
AugLagrangian< LRSDP > & | augLag |
The AugLagrangian object which will be used for optimization. | |
AugLagrangian< LRSDP > | augLagInternal |
Internal AugLagrangian object, if one was not passed at construction time. | |
arma::vec | b |
b_i for each constraint. | |
arma::mat | c |
For objective function. | |
arma::mat | initialPoint |
Initial point. |
Definition at line 32 of file lrsdp.hpp.
mlpack::optimization::LRSDP::LRSDP | ( | const size_t | numConstraints, | |
const arma::mat & | initialPoint | |||
) |
Create an LRSDP to be optimized.
The solution will end up being a matrix of size (rank) x (rows). To construct each constraint and the objective function, use the functions A(), B(), and C() to set them correctly.
numConstraints | Number of constraints in the problem. | |
rank | Rank of the solution (<= rows). | |
rows | Number of rows in the solution. |
mlpack::optimization::LRSDP::LRSDP | ( | const size_t | numConstraints, | |
const arma::mat & | initialPoint, | |||
AugLagrangian< LRSDP > & | augLagrangian | |||
) |
Create an LRSDP to be optimized, passing in an already-created AugLagrangian object.
The given initial point should be set to the size (rows) x (rank), where (rank) is the reduced rank of the problem.
numConstraints | Number of constraints in the problem. | |
initialPoint | Initial point of the optimization. | |
auglag | Pre-initialized AugLagrangian<LRSDP> object. |
std::vector<arma::mat>& mlpack::optimization::LRSDP::A | ( | ) | [inline] |
const std::vector<arma::mat>& mlpack::optimization::LRSDP::A | ( | ) | const [inline] |
arma::uvec& mlpack::optimization::LRSDP::AModes | ( | ) | [inline] |
const arma::uvec& mlpack::optimization::LRSDP::AModes | ( | ) | const [inline] |
AugLagrangian<LRSDP>& mlpack::optimization::LRSDP::AugLag | ( | ) | [inline] |
const AugLagrangian<LRSDP>& mlpack::optimization::LRSDP::AugLag | ( | ) | const [inline] |
arma::vec& mlpack::optimization::LRSDP::B | ( | ) | [inline] |
const arma::vec& mlpack::optimization::LRSDP::B | ( | ) | const [inline] |
arma::mat& mlpack::optimization::LRSDP::C | ( | ) | [inline] |
const arma::mat& mlpack::optimization::LRSDP::C | ( | ) | const [inline] |
double mlpack::optimization::LRSDP::Evaluate | ( | const arma::mat & | coordinates | ) | const |
Evaluate the objective function of the LRSDP (no constraints) at the given coordinates.
This is used by AugLagrangian<LRSDP>.
double mlpack::optimization::LRSDP::EvaluateConstraint | ( | const size_t | index, | |
const arma::mat & | coordinates | |||
) | const |
Evaluate a particular constraint of the LRSDP at the given coordinates.
const arma::mat& mlpack::optimization::LRSDP::GetInitialPoint | ( | ) |
Get the initial point of the LRSDP.
void mlpack::optimization::LRSDP::Gradient | ( | const arma::mat & | coordinates, | |
arma::mat & | gradient | |||
) | const |
Evaluate the gradient of the LRSDP (no constraints) at the given coordinates.
This is used by AugLagrangian<LRSDP>.
void mlpack::optimization::LRSDP::GradientConstraint | ( | const size_t | index, | |
const arma::mat & | coordinates, | |||
arma::mat & | gradient | |||
) | const |
Evaluate the gradient of a particular constraint of the LRSDP at the given coordinates.
size_t mlpack::optimization::LRSDP::NumConstraints | ( | ) | const [inline] |
double mlpack::optimization::LRSDP::Optimize | ( | arma::mat & | coordinates | ) |
Optimize the LRSDP and return the final objective value.
The given coordinates will be modified to contain the final solution.
coordinates | Starting coordinates for the optimization. |
std::vector<arma::mat> mlpack::optimization::LRSDP::a [private] |
arma::uvec mlpack::optimization::LRSDP::aModes [private] |
AugLagrangian<LRSDP>& mlpack::optimization::LRSDP::augLag [private] |
The AugLagrangian object which will be used for optimization.
Definition at line 145 of file lrsdp.hpp.
Referenced by AugLag().
Internal AugLagrangian object, if one was not passed at construction time.
arma::vec mlpack::optimization::LRSDP::b [private] |
b_i for each constraint.
Definition at line 133 of file lrsdp.hpp.
Referenced by B(), and NumConstraints().
arma::mat mlpack::optimization::LRSDP::c [private] |
arma::mat mlpack::optimization::LRSDP::initialPoint [private] |