idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
idol::AffExpr< KeyT, ValueT > Class Template Reference
Inheritance diagram for idol::AffExpr< KeyT, ValueT >:
Inheritance graph
Collaboration diagram for idol::AffExpr< KeyT, ValueT >:
Collaboration graph

Public Member Functions

 AffExpr (ValueT t_constant)
 
 AffExpr (const KeyT &t_key)
 
 AffExpr (LinExpr< KeyT > t_expr)
 
 AffExpr (const AffExpr &t_src)=default
 
 AffExpr (AffExpr &&) noexcept=default
 
AffExproperator= (const AffExpr &t_rhs)=default
 
AffExproperator= (AffExpr &&) noexcept=default
 
AffExproperator+= (const AffExpr &t_rhs)
 
AffExproperator-= (const AffExpr &t_rhs)
 
AffExproperator*= (double t_rhs)
 
AffExproperator/= (double t_rhs)
 
AffExpr operator- () const
 
LinExpr< KeyT, ValueT > & linear ()
 
const LinExpr< KeyT, ValueT > & linear () const
 
ValueT & constant ()
 
const ValueT & constant () const
 
bool is_zero (double t_tolerance) const
 
void clear ()
 

Static Public Attributes

static const AffExpr< KeyT, ValueT > Zero {}
 

Detailed Description

template<class KeyT = idol::Var, class ValueT = double>
class idol::AffExpr< KeyT, ValueT >

Definition at line 19 of file AffExpr.h.

Constructor & Destructor Documentation

◆ AffExpr() [1/3]

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT >::AffExpr ( )

Definition at line 76 of file AffExpr.h.

◆ AffExpr() [2/3]

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT >::AffExpr ( ValueT  t_constant)

Definition at line 81 of file AffExpr.h.

◆ AffExpr() [3/3]

template<class KeyT , class ValueT >
idol::AffExpr< KeyT, ValueT >::AffExpr ( const KeyT &  t_key)

Definition at line 63 of file AffExpr.h.

Member Function Documentation

◆ clear()

template<class KeyT = idol::Var, class ValueT = double>
void idol::AffExpr< KeyT, ValueT >::clear ( )
inline

Definition at line 52 of file AffExpr.h.

◆ constant() [1/2]

template<class KeyT = idol::Var, class ValueT = double>
ValueT & idol::AffExpr< KeyT, ValueT >::constant ( )
inline

Definition at line 46 of file AffExpr.h.

◆ constant() [2/2]

template<class KeyT = idol::Var, class ValueT = double>
const ValueT & idol::AffExpr< KeyT, ValueT >::constant ( ) const
inline

Definition at line 48 of file AffExpr.h.

◆ is_zero()

template<class KeyT = idol::Var, class ValueT = double>
bool idol::AffExpr< KeyT, ValueT >::is_zero ( double  t_tolerance) const
inline

Definition at line 50 of file AffExpr.h.

◆ linear() [1/2]

template<class KeyT = idol::Var, class ValueT = double>
LinExpr< KeyT, ValueT > & idol::AffExpr< KeyT, ValueT >::linear ( )
inline

Definition at line 43 of file AffExpr.h.

◆ linear() [2/2]

template<class KeyT = idol::Var, class ValueT = double>
const LinExpr< KeyT, ValueT > & idol::AffExpr< KeyT, ValueT >::linear ( ) const
inline

Definition at line 44 of file AffExpr.h.

◆ operator*=()

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT > & idol::AffExpr< Key1, ValueT >::operator*= ( double  t_rhs)

Definition at line 105 of file AffExpr.h.

◆ operator+=()

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT > & idol::AffExpr< Key1, ValueT >::operator+= ( const AffExpr< KeyT, ValueT > &  t_rhs)

Definition at line 91 of file AffExpr.h.

◆ operator-()

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT > idol::AffExpr< Key1, ValueT >::operator- ( ) const

Definition at line 68 of file AffExpr.h.

◆ operator-=()

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT > & idol::AffExpr< Key1, ValueT >::operator-= ( const AffExpr< KeyT, ValueT > &  t_rhs)

Definition at line 98 of file AffExpr.h.

◆ operator/=()

template<class Key1 , class ValueT >
idol::AffExpr< Key1, ValueT > & idol::AffExpr< Key1, ValueT >::operator/= ( double  t_rhs)

Definition at line 112 of file AffExpr.h.

Member Data Documentation

◆ Zero

template<class KeyT , class ValueT >
const idol::AffExpr< KeyT, ValueT > idol::AffExpr< KeyT, ValueT >::Zero {}
static

Definition at line 57 of file AffExpr.h.