MLPACK  1.0.7
Public Member Functions | Private Attributes | List of all members
mlpack::optimization::LRSDP Class Reference
Collaboration diagram for mlpack::optimization::LRSDP:
Collaboration graph
[legend]

Public Member Functions

 LRSDP (const size_t numConstraints, const arma::mat &initialPoint)
 Create an LRSDP to be optimized. More...
 
 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. More...
 
const std::vector< arma::mat > & A () const
 Return the vector of A matrices (which correspond to the constraints). More...
 
std::vector< arma::mat > & A ()
 Modify the veector of A matrices (which correspond to the constraints). More...
 
const arma::uvec & AModes () const
 Return the vector of modes for the A matrices. More...
 
arma::uvec & AModes ()
 Modify the vector of modes for the A matrices. More...
 
const AugLagrangian< LRSDP > & AugLag () const
 Return the augmented Lagrangian object. More...
 
AugLagrangian< LRSDP > & AugLag ()
 Modify the augmented Lagrangian object. More...
 
const arma::vec & B () const
 Return the vector of B values. More...
 
arma::vec & B ()
 Modify the vector of B values. More...
 
const arma::mat & C () const
 Return the objective function matrix (C). More...
 
arma::mat & C ()
 Modify the objective function matrix (C). More...
 
double Evaluate (const arma::mat &coordinates) const
 Evaluate the objective function of the LRSDP (no constraints) at the given coordinates. More...
 
double EvaluateConstraint (const size_t index, const arma::mat &coordinates) const
 Evaluate a particular constraint of the LRSDP at the given coordinates. More...
 
const arma::mat & GetInitialPoint ()
 Get the initial point of the LRSDP. More...
 
void Gradient (const arma::mat &coordinates, arma::mat &gradient) const
 Evaluate the gradient of the LRSDP (no constraints) at the given coordinates. More...
 
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. More...
 
size_t NumConstraints () const
 Get the number of constraints in the LRSDP. More...
 
double Optimize (arma::mat &coordinates)
 Optimize the LRSDP and return the final objective value. More...
 

Private Attributes

std::vector< arma::mat > a
 A_i for each constraint. More...
 
arma::uvec aModes
 1 if entries in matrix, 0 for normal. More...
 
AugLagrangian< LRSDP > & augLag
 The AugLagrangian object which will be used for optimization. More...
 
AugLagrangian< LRSDPaugLagInternal
 Internal AugLagrangian object, if one was not passed at construction time. More...
 
arma::vec b
 b_i for each constraint. More...
 
arma::mat c
 For objective function. More...
 
arma::mat initialPoint
 Initial point. More...
 

Detailed Description

Definition at line 32 of file lrsdp.hpp.

Constructor & Destructor Documentation

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.

Parameters
numConstraintsNumber of constraints in the problem.
rankRank of the solution (<= rows).
rowsNumber 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.

Parameters
numConstraintsNumber of constraints in the problem.
initialPointInitial point of the optimization.
auglagPre-initialized AugLagrangian<LRSDP> object.

Member Function Documentation

const std::vector<arma::mat>& mlpack::optimization::LRSDP::A ( ) const
inline

Return the vector of A matrices (which correspond to the constraints).

Definition at line 106 of file lrsdp.hpp.

References a.

std::vector<arma::mat>& mlpack::optimization::LRSDP::A ( )
inline

Modify the veector of A matrices (which correspond to the constraints).

Definition at line 108 of file lrsdp.hpp.

References a.

const arma::uvec& mlpack::optimization::LRSDP::AModes ( ) const
inline

Return the vector of modes for the A matrices.

Definition at line 111 of file lrsdp.hpp.

References aModes.

arma::uvec& mlpack::optimization::LRSDP::AModes ( )
inline

Modify the vector of modes for the A matrices.

Definition at line 113 of file lrsdp.hpp.

References aModes.

const AugLagrangian<LRSDP>& mlpack::optimization::LRSDP::AugLag ( ) const
inline

Return the augmented Lagrangian object.

Definition at line 121 of file lrsdp.hpp.

References augLag.

AugLagrangian<LRSDP>& mlpack::optimization::LRSDP::AugLag ( )
inline

Modify the augmented Lagrangian object.

Definition at line 123 of file lrsdp.hpp.

References augLag.

const arma::vec& mlpack::optimization::LRSDP::B ( ) const
inline

Return the vector of B values.

Definition at line 116 of file lrsdp.hpp.

References b.

arma::vec& mlpack::optimization::LRSDP::B ( )
inline

Modify the vector of B values.

Definition at line 118 of file lrsdp.hpp.

References b.

const arma::mat& mlpack::optimization::LRSDP::C ( ) const
inline

Return the objective function matrix (C).

Definition at line 101 of file lrsdp.hpp.

References c.

arma::mat& mlpack::optimization::LRSDP::C ( )
inline

Modify the objective function matrix (C).

Definition at line 103 of file lrsdp.hpp.

References c.

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

Get the number of constraints in the LRSDP.

Definition at line 95 of file lrsdp.hpp.

References b.

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.

Parameters
coordinatesStarting coordinates for the optimization.

Member Data Documentation

std::vector<arma::mat> mlpack::optimization::LRSDP::a
private

A_i for each constraint.

Definition at line 131 of file lrsdp.hpp.

Referenced by A().

arma::uvec mlpack::optimization::LRSDP::aModes
private

1 if entries in matrix, 0 for normal.

Definition at line 136 of file lrsdp.hpp.

Referenced by AModes().

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().

AugLagrangian<LRSDP> mlpack::optimization::LRSDP::augLagInternal
private

Internal AugLagrangian object, if one was not passed at construction time.

Definition at line 142 of file lrsdp.hpp.

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

For objective function.

Definition at line 129 of file lrsdp.hpp.

Referenced by C().

arma::mat mlpack::optimization::LRSDP::initialPoint
private

Initial point.

Definition at line 139 of file lrsdp.hpp.


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