---
name: "mlpack_optimization_LovaszThetaSDP"
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_LovaszThetaSDP"
---

# mlpack\_optimization\_LovaszThetaSDP(3)

This function is the Lovasz-Theta semidefinite program, as implemented in the following paper:

## NAME

mlpack::optimization::LovaszThetaSDP -

This function is the Lovasz-Theta semidefinite program, as implemented in the following paper:

## SYNOPSIS

### Public Member Functions

**LovaszThetaSDP** ()\
 **LovaszThetaSDP** (const arma::mat &**edges**)\
 *Initialize the Lovasz-Theta SDP with the given set of edges.*  const arma::mat & **Edges** () const \
 arma::mat & **Edges** ()\
 double **Evaluate** (const arma::mat &coordinates)\
 double **EvaluateConstraint** (const size\_t index, const arma::mat &coordinates)\
 const arma::mat & **GetInitialPoint** ()\
 void **Gradient** (const arma::mat &coordinates, arma::mat &gradient)\
 void **GradientConstraint** (const size\_t index, const arma::mat &coordinates, arma::mat &gradient)\
 size\_t **NumConstraints** () const \

### Private Attributes

arma::mat **edges**\
 arma::mat **initialPoint**\
 size\_t **vertices**\

## Detailed Description

This function is the Lovasz-Theta semidefinite program, as implemented in the following paper:

S. Burer, R. Monteiro 'A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization.' Journal of Mathematical Programming, 2004

Given a simple, undirected graph G = (V, E), the Lovasz-Theta SDP is defined by:

min\_X{Tr(-(e e^T)^T X) : Tr(X) = 1, X\_ij = 0 for all (i, j) in E, X \>= 0}

where e is the vector of all ones and X has dimension \|V\| x \|V\|.

In the Monteiro-Burer formulation, we take X = R \* R^T, where R is the coordinates given to the **Evaluate()**, **Gradient()**, **EvaluateConstraint()**, and **GradientConstraint()** functions.

Definition at line 118 of file aug\_lagrangian\_test\_functions.hpp.

## Constructor & Destructor Documentation

### mlpack::optimization::LovaszThetaSDP::LovaszThetaSDP ()

### mlpack::optimization::LovaszThetaSDP::LovaszThetaSDP (const arma::mat &edges)

Initialize the Lovasz-Theta SDP with the given set of edges. The edge matrix should consist of rows of two dimensions, where dimension 0 is the first vertex of the edge and dimension 1 is the second edge (or vice versa, as it doesn't make a difference).

**Parameters:**

*edges* Matrix of edges.

## Member Function Documentation

### const arma::mat& mlpack::optimization::LovaszThetaSDP::Edges () const` [inline]`

Definition at line 145 of file aug\_lagrangian\_test\_functions.hpp.

References edges.

### arma::mat& mlpack::optimization::LovaszThetaSDP::Edges ()` [inline]`

Definition at line 146 of file aug\_lagrangian\_test\_functions.hpp.

References edges.

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

### double mlpack::optimization::LovaszThetaSDP::EvaluateConstraint (const size\_tindex, const arma::mat &coordinates)

### const arma::mat& mlpack::optimization::LovaszThetaSDP::GetInitialPoint ()

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

### void mlpack::optimization::LovaszThetaSDP::GradientConstraint (const size\_tindex, const arma::mat &coordinates, arma::mat &gradient)

### size\_t mlpack::optimization::LovaszThetaSDP::NumConstraints () const

## Member Data Documentation

### arma::mat mlpack::optimization::LovaszThetaSDP::edges` [private]`

Definition at line 149 of file aug\_lagrangian\_test\_functions.hpp.

Referenced by Edges().

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

Definition at line 152 of file aug\_lagrangian\_test\_functions.hpp.

### size\_t mlpack::optimization::LovaszThetaSDP::vertices` [private]`

Definition at line 150 of file aug\_lagrangian\_test\_functions.hpp.

## Author

Generated automatically by Doxygen for MLPACK from the source code.
