---
name: "mlpack_optimization_LRSDPFunction"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_optimization_LRSDPFunction"
---

# mlpack\_optimization\_LRSDPFunction(3)

The objective function that LRSDP is trying to optimize.

## NAME

mlpack::optimization::LRSDPFunction -

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

## SYNOPSIS

### Public Member Functions

**LRSDPFunction** (const size\_t numConstraints, const arma::mat &**initialPoint**)\
 *Construct the* **LRSDPFunction** *with the given initial point and number of constraints.*  const std::vector\< arma::mat \> & **A** () const \
 *Return the vector of A matrices (which correspond to the constraints).*  std::vector\< arma::mat \> & **A** ()\
 *Modify the veector of A matrices (which correspond to the constraints).*  const arma::uvec & **AModes** () const \
 *Return the vector of modes for the A matrices.*  arma::uvec & **AModes** ()\
 *Modify the vector of modes for the A matrices.*  const arma::vec & **B** () const \
 *Return the vector of B values.*  arma::vec & **B** ()\
 *Modify the vector of B values.*  const arma::mat & **C** () const \
 *Return the objective function matrix (C).*  arma::mat & **C** ()\
 *Modify 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** () const \
 *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***.*  std::string **ToString** () const \
 *Return string representation of object.*

### Private Attributes

std::vector\< arma::mat \> **a**\
 *A\_i for each constraint.*  arma::uvec **aModes**\
 *1 if entries in matrix, 0 for normal.*  arma::vec **b**\
 *b\_i for each constraint.*  arma::mat **c**\
 *Objective function matrix c.*  arma::mat **initialPoint**\
 *Initial point.*

## Detailed Description

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

Definition at line 35 of file lrsdp\_function.hpp.

## Constructor & Destructor Documentation

### mlpack::optimization::LRSDPFunction::LRSDPFunction (const size\_tnumConstraints, 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 83 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 85 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 88 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 90 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 93 of file lrsdp\_function.hpp.

References b.

### arma::vec& mlpack::optimization::LRSDPFunction::B ()` [inline]`

Modify the vector of B values.

Definition at line 95 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 78 of file lrsdp\_function.hpp.

References c.

### arma::mat& mlpack::optimization::LRSDPFunction::C ()` [inline]`

Modify the objective function matrix (C).

Definition at line 80 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\_tindex, 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 75 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\_tindex, 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 72 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 104 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 111 of file lrsdp\_function.hpp.

Referenced by AModes().

### arma::vec mlpack::optimization::LRSDPFunction::b` [private]`

b\_i for each constraint.

Definition at line 106 of file lrsdp\_function.hpp.

Referenced by B(), and NumConstraints().

### arma::mat mlpack::optimization::LRSDPFunction::c` [private]`

Objective function matrix c.

Definition at line 102 of file lrsdp\_function.hpp.

Referenced by C().

### arma::mat mlpack::optimization::LRSDPFunction::initialPoint` [private]`

Initial point.

Definition at line 109 of file lrsdp\_function.hpp.

Referenced by GetInitialPoint().

## Author

Generated automatically by Doxygen for MLPACK from the source code.
