TVM  0.9.2
tvm::constraint::abstract::Constraint Class Reference

#include <tvm/constraint/abstract/Constraint.h>

Inheritance diagram for tvm::constraint::abstract::Constraint:
Collaboration diagram for tvm::constraint::abstract::Constraint:

Public Member Functions

virtual const Eigen::VectorXd & l () const
 
virtual const Eigen::VectorXd & u () const
 
virtual const Eigen::VectorXd & e () const
 
Type type () const
 
bool isEquality () const
 
RHS rhs () const
 
- Public Member Functions inherited from tvm::internal::ObjWithId
 ObjWithId (const ObjWithId &)=delete
 
 ObjWithId (ObjWithId &&other)
 
ObjWithIdoperator= (const ObjWithId &)=delete
 
ObjWithIdoperator= (ObjWithId &&other)
 
int id () const
 
- Public Member Functions inherited from tvm::graph::abstract::OutputSelector< Constraint, tvm::internal::FirstOrderProvider >
 OutputSelector (Args &&... args)
 
void lock ()
 
void unlock ()
 
bool isLocked () const
 

Protected Member Functions

 Constraint (Type ct, RHS cr, int m=0)
 
void resizeCache () override
 
Eigen::VectorXd & lRef ()
 
Eigen::VectorXd & uRef ()
 
Eigen::VectorXd & eRef ()
 
- Protected Member Functions inherited from tvm::internal::ObjWithId
 ObjWithId ()
 
- Protected Member Functions inherited from tvm::graph::abstract::OutputSelector< Constraint, tvm::internal::FirstOrderProvider >
void disableOutput (EnumT e)
 
void disableOutput (EnumT e, Args... args)
 
void enableOutput (EnumT e)
 
void enableOutput (EnumT e, Args... args)
 
bool isOutputCustomEnabled (int e) const override
 

Protected Attributes

internal::RHSVectors vectors_
 

Detailed Description

Base class for representing a constraint.

It manages the enabling/disabling of the outputs L, U and E (depending on its type and rhs convention).

FIXME: have the updateValue here and add an output check()

Constructor & Destructor Documentation

◆ Constraint()

tvm::constraint::abstract::Constraint::Constraint ( Type  ct,
RHS  cr,
int  m = 0 
)
protected

Constructor. Only available to derived classes.

Parameters
ctThe constraint type
crThe rhs convention
The(output) size of the constraint

Member Function Documentation

◆ e()

const Eigen::VectorXd & tvm::constraint::abstract::Constraint::e ( ) const
inlinevirtual

Return the vector e

Warning
the call is valid only if l exists for the given constraint conventions, but the method does not throw if it is not the case.

◆ eRef()

Eigen::VectorXd & tvm::constraint::abstract::Constraint::eRef ( )
inlineprotected

Direct (non-const) access to e for derived classes

◆ isEquality()

bool tvm::constraint::abstract::Constraint::isEquality ( ) const

Check whether this is an equality constraint.

◆ l()

const Eigen::VectorXd & tvm::constraint::abstract::Constraint::l ( ) const
inlinevirtual

Return the vector l

Warning
the call is valid only if l exists for the given constraint conventions, but the method does not throw if it is not the case.

◆ lRef()

Eigen::VectorXd & tvm::constraint::abstract::Constraint::lRef ( )
inlineprotected

Direct (non-const) access to l for derived classes

◆ resizeCache()

void tvm::constraint::abstract::Constraint::resizeCache ( )
overrideprotected

Resize the cache (rhs vector(s), jacobian matrices,...) for the current size of the constraint.

◆ rhs()

RHS tvm::constraint::abstract::Constraint::rhs ( ) const

Return the convention for the right-hand side e, l, u or both l and u of the constraint.

◆ type()

Type tvm::constraint::abstract::Constraint::type ( ) const

Return the type of the constraint.

◆ u()

const Eigen::VectorXd & tvm::constraint::abstract::Constraint::u ( ) const
inlinevirtual

Return the vector u

Warning
the call is valid only if l exists for the given constraint conventions, but the method does not throw if it is not the case.

◆ uRef()

Eigen::VectorXd & tvm::constraint::abstract::Constraint::uRef ( )
inlineprotected

Direct (non-const) access to u for derived classes

Member Data Documentation

◆ vectors_

internal::RHSVectors tvm::constraint::abstract::Constraint::vectors_
protected

Cache for l, u and e


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