mlpack  1.0.12
Public Member Functions | Private Attributes | List of all members
mlpack::optimization::LRSDPFunction Class Reference

The objective function that LRSDP is trying to optimize. More...

Public Member Functions

 LRSDPFunction (const size_t numConstraints, const arma::mat &initialPoint)
 Construct the LRSDPFunction with the given initial point and number of constraints. 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 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 () const
 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...
 
std::string ToString () const
 Return string representation of object. 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...
 
arma::vec b
 b_i for each constraint. More...
 
arma::mat c
 Objective function matrix c. More...
 
arma::mat initialPoint
 Initial point. More...
 

Detailed Description

The objective function that LRSDP is trying to optimize.

Definition at line 27 of file lrsdp_function.hpp.

Constructor & Destructor Documentation

mlpack::optimization::LRSDPFunction::LRSDPFunction ( const size_t  numConstraints,
const arma::mat &  initialPoint 
)

Construct the LRSDPFunction with the given initial point and number of constraints.

Set the A, B, and C matrices for each constraint using the A(), B(), and C() functions.

Member Function Documentation

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

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

Definition at line 75 of file lrsdp_function.hpp.

References a.

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

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

Definition at line 77 of file lrsdp_function.hpp.

References a.

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

Return the vector of modes for the A matrices.

Definition at line 80 of file lrsdp_function.hpp.

References aModes.

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

Modify the vector of modes for the A matrices.

Definition at line 82 of file lrsdp_function.hpp.

References aModes.

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

Return the vector of B values.

Definition at line 85 of file lrsdp_function.hpp.

References b.

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

Modify the vector of B values.

Definition at line 87 of file lrsdp_function.hpp.

References b.

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

Return the objective function matrix (C).

Definition at line 70 of file lrsdp_function.hpp.

References c.

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

Modify the objective function matrix (C).

Definition at line 72 of file lrsdp_function.hpp.

References c.

double mlpack::optimization::LRSDPFunction::Evaluate ( const arma::mat &  coordinates) const

Evaluate the objective function of the LRSDP (no constraints) at the given coordinates.

double mlpack::optimization::LRSDPFunction::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::LRSDPFunction::GetInitialPoint ( ) const
inline

Get the initial point of the LRSDP.

Definition at line 67 of file lrsdp_function.hpp.

References initialPoint.

void mlpack::optimization::LRSDPFunction::Gradient ( const arma::mat &  coordinates,
arma::mat &  gradient 
) const

Evaluate the gradient of the LRSDP (no constraints) at the given coordinates.

void mlpack::optimization::LRSDPFunction::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::LRSDPFunction::NumConstraints ( ) const
inline

Get the number of constraints in the LRSDP.

Definition at line 64 of file lrsdp_function.hpp.

References b.

std::string mlpack::optimization::LRSDPFunction::ToString ( ) const

Return string representation of object.

Member Data Documentation

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

A_i for each constraint.

Definition at line 96 of file lrsdp_function.hpp.

Referenced by A().

arma::uvec mlpack::optimization::LRSDPFunction::aModes
private

1 if entries in matrix, 0 for normal.

Definition at line 103 of file lrsdp_function.hpp.

Referenced by AModes().

arma::vec mlpack::optimization::LRSDPFunction::b
private

b_i for each constraint.

Definition at line 98 of file lrsdp_function.hpp.

Referenced by B(), and NumConstraints().

arma::mat mlpack::optimization::LRSDPFunction::c
private

Objective function matrix c.

Definition at line 94 of file lrsdp_function.hpp.

Referenced by C().

arma::mat mlpack::optimization::LRSDPFunction::initialPoint
private

Initial point.

Definition at line 101 of file lrsdp_function.hpp.

Referenced by GetInitialPoint().


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