Turi Create  4.0
Optimization Constraints

Classes

class  turi::optimization::constraint_interface
 
class  turi::optimization::non_negative_orthant
 
class  turi::optimization::box_constraints
 

Functions

 turi::optimization::non_negative_orthant::non_negative_orthant (const size_t &_variables)
 
 turi::optimization::non_negative_orthant::~non_negative_orthant ()
 
void turi::optimization::non_negative_orthant::project (DenseVector &point) const
 
void turi::optimization::non_negative_orthant::project_block (DenseVector &point, const size_t block_start, const size_t block_size) const
 
bool turi::optimization::non_negative_orthant::is_satisfied (const DenseVector &point) const
 
double turi::optimization::non_negative_orthant::first_order_optimality_conditions (const DenseVector &point, const DenseVector &gradient) const
 
 turi::optimization::box_constraints::box_constraints (const double &_lb, const double &_ub, const size_t &_variables)
 
 turi::optimization::box_constraints::box_constraints (const DenseVector &_lb, const DenseVector &_ub)
 
 turi::optimization::box_constraints::~box_constraints ()
 
void turi::optimization::box_constraints::project (DenseVector &point) const
 
void turi::optimization::box_constraints::project_block (DenseVector &point, const size_t block_start, const size_t block_size) const
 
bool turi::optimization::box_constraints::is_satisfied (const DenseVector &point) const
 
double turi::optimization::box_constraints::first_order_optimality_conditions (const DenseVector &point, const DenseVector &gradient) const
 

Variables

size_t turi::optimization::non_negative_orthant::variables
 
DenseVector turi::optimization::box_constraints::lb
 
DenseVector turi::optimization::box_constraints::ub
 
size_t turi::optimization::box_constraints::variables
 

Detailed Description

Function Documentation

◆ box_constraints() [1/2]

turi::optimization::box_constraints::box_constraints ( const double &  _lb,
const double &  _ub,
const size_t &  _variables 
)
inline

Default constructor.

Parameters
[in]_variablesNumber of variables
[in]_lbLower bound
[in]_ubUpper bound

Definition at line 158 of file constraints-inl.hpp.

◆ box_constraints() [2/2]

turi::optimization::box_constraints::box_constraints ( const DenseVector &  _lb,
const DenseVector &  _ub 
)
inline

Default constructor.

Parameters
[in]_variablesNumber of variables
[in]_lbLower bound
[in]_ubUpper bound

Definition at line 173 of file constraints-inl.hpp.

◆ non_negative_orthant()

turi::optimization::non_negative_orthant::non_negative_orthant ( const size_t &  _variables)
inline

Default constructor.

Definition at line 52 of file constraints-inl.hpp.

◆ ~box_constraints()

turi::optimization::box_constraints::~box_constraints ( )
inline

Default desctuctor. Do nothing.

Definition at line 184 of file constraints-inl.hpp.

◆ ~non_negative_orthant()

turi::optimization::non_negative_orthant::~non_negative_orthant ( )
inline

Default desctuctor. Do nothing.

Definition at line 59 of file constraints-inl.hpp.

◆ first_order_optimality_conditions() [1/2]

double turi::optimization::non_negative_orthant::first_order_optimality_conditions ( const DenseVector &  point,
const DenseVector &  gradient 
) const
inline

A measure of the first order optimality conditions.

Parameters
[in]pointPoint which we are querying.
[in]gradientGradient at that point for a given function

Use the Cauchy point as a measure of optimality. See Pg 486 of Nocedal and Wright (Edition 2)

Definition at line 120 of file constraints-inl.hpp.

◆ first_order_optimality_conditions() [2/2]

double turi::optimization::box_constraints::first_order_optimality_conditions ( const DenseVector &  point,
const DenseVector &  gradient 
) const
inlinevirtual

A measure of the first order optimality conditions.

Parameters
[in]pointPoint which we are querying.
[in]gradientGradient at that point for a given function

Use the Cauchy point as a measure of optimality. See Pg 486 of Nocedal and Wright (Edition 2)

Implements turi::optimization::constraint_interface.

Definition at line 251 of file constraints-inl.hpp.

◆ is_satisfied() [1/2]

bool turi::optimization::non_negative_orthant::is_satisfied ( const DenseVector &  point) const
inline

Boolean function to deterstd::mine if a dense point is present in a constraint space.

Parameters
[in]pointPoint which we are querying.

Definition at line 100 of file constraints-inl.hpp.

◆ is_satisfied() [2/2]

bool turi::optimization::box_constraints::is_satisfied ( const DenseVector &  point) const
inlinevirtual

Boolean function to determine if a dense point is present in a constraint space.

Parameters
[in]pointPoint which we are querying.

Implements turi::optimization::constraint_interface.

Definition at line 230 of file constraints-inl.hpp.

◆ project() [1/2]

void turi::optimization::non_negative_orthant::project ( DenseVector &  point) const
inline

Project a dense point into the constraint space.

Parameters
[in,out]pointPoint (Dense Vector)

Given a convex set X, the projection operator is given by P(y) = ::max(x, o)

Definition at line 71 of file constraints-inl.hpp.

◆ project() [2/2]

void turi::optimization::box_constraints::project ( DenseVector &  point) const
inlinevirtual

Project a dense point into the constraint space.

Parameters
[in,out]pointPoint (Dense Vector)

Given a convex set X, the projection operator is given by P(y) = ::max(x, o)

Implements turi::optimization::constraint_interface.

Definition at line 196 of file constraints-inl.hpp.

◆ project_block() [1/2]

void turi::optimization::non_negative_orthant::project_block ( DenseVector &  point,
const size_t  block_start,
const size_t  block_size 
) const
inline

Project a block of a dense point into the constraint space.

Parameters
[in,out]pointA block project the point.
[in]block_startStart index of the block
[in]block_sizeSize of the block

Given a convex set X, the projection operator is given by P(y) = ::max(x, o)

Definition at line 87 of file constraints-inl.hpp.

◆ project_block() [2/2]

void turi::optimization::box_constraints::project_block ( DenseVector &  point,
const size_t  block_start,
const size_t  block_size 
) const
inlinevirtual

Project a block of a dense point into the constraint space.

Parameters
[in,out]pointA block project the point.
[in]block_startStart index of the block
[in]block_sizeSize of the block

Given a convex set X, the projection operator is given by P(y) = ::max(x, o)

Implements turi::optimization::constraint_interface.

Definition at line 214 of file constraints-inl.hpp.

Variable Documentation

◆ lb

DenseVector turi::optimization::box_constraints::lb
protected

Upper bound

Definition at line 145 of file constraints-inl.hpp.

◆ ub

DenseVector turi::optimization::box_constraints::ub
protected

Lower bound

Definition at line 146 of file constraints-inl.hpp.

◆ variables [1/2]

size_t turi::optimization::non_negative_orthant::variables
protected

Variables in the problem

Definition at line 44 of file constraints-inl.hpp.

◆ variables [2/2]

size_t turi::optimization::box_constraints::variables
protected

Variables in the problem

Definition at line 147 of file constraints-inl.hpp.