idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
idol::Point< T > Class Template Reference
Inheritance diagram for idol::Point< T >:
Inheritance graph
Collaboration diagram for idol::Point< T >:
Collaboration graph

Public Types

using iterator = typename map_t::iterator
 
using const_iterator = typename map_t::const_iterator
 

Public Member Functions

 Point (const SparseVector< T, double > &t_vector)
 
 Point (SparseVector< T, double > &&t_vector)
 
SolutionStatus status () const
 
void set_status (SolutionStatus t_status)
 
SolutionReason reason () const
 
void set_reason (SolutionReason t_reason)
 
double objective_value () const
 
void set_objective_value (double t_objective_value)
 
bool has_objective_value () const
 
void reset_objective_value ()
 
Pointoperator*= (double t_factor) override
 
Pointoperator+= (const Point &t_other)
 
Pointoperator+= (Point &&t_other)
 
Pointoperator-= (const Point &t_other)
 
Pointoperator-= (Point &&t_other)
 
virtual SparseVectoroperator+= (const SparseVector &t_vector)
 
virtual SparseVectoroperator-= (const SparseVector &t_vector)
 
virtual SparseVectoroperator*= (std::conditional_t< std::is_arithmetic_v< double >, double, double > t_scalar)
 
virtual SparseVectoroperator/= (std::conditional_t< std::is_arithmetic_v< double >, double, double > t_scalar)
 
SparseVector operator- () const
 
unsigned int size () const
 
bool empty () const
 
bool has_index (const T &t_index) const
 
const double & get (const T &t_index1) const
 
void set (const T &t_index, const double &t_value)
 
virtual bool is_zero (double t_tolerance) const
 
void remove (const T &t_index)
 
void clear ()
 
void reserve (unsigned int t_capacity)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
SparseVectormerge_without_conflict (const SparseVector &t_vec)
 

Detailed Description

template<class T>
class idol::Point< T >

Definition at line 21 of file Point.h.

Member Typedef Documentation

◆ const_iterator

using idol::SparseVector< T , double >::const_iterator = typename map_t::const_iterator
inherited

Definition at line 128 of file SparseVector.h.

◆ iterator

using idol::SparseVector< T , double >::iterator = typename map_t::iterator
inherited

Definition at line 127 of file SparseVector.h.

Constructor & Destructor Documentation

◆ Point() [1/2]

template<class T >
idol::Point< T >::Point ( const SparseVector< T, double > &  t_vector)
inlineexplicit

Definition at line 27 of file Point.h.

◆ Point() [2/2]

template<class T >
idol::Point< T >::Point ( SparseVector< T, double > &&  t_vector)
inlineexplicit

Definition at line 28 of file Point.h.

Member Function Documentation

◆ begin() [1/2]

iterator idol::SparseVector< T , double >::begin ( )
inlineinherited

Definition at line 130 of file SparseVector.h.

◆ begin() [2/2]

const_iterator idol::SparseVector< T , double >::begin ( ) const
inlineinherited

Definition at line 134 of file SparseVector.h.

◆ cbegin()

const_iterator idol::SparseVector< T , double >::cbegin ( ) const
inlineinherited

Definition at line 138 of file SparseVector.h.

◆ cend()

const_iterator idol::SparseVector< T , double >::cend ( ) const
inlineinherited

Definition at line 140 of file SparseVector.h.

◆ clear()

void idol::SparseVector< T , double >::clear ( )
inlineinherited

Definition at line 119 of file SparseVector.h.

◆ empty()

bool idol::SparseVector< T , double >::empty ( ) const
inlineinherited

Definition at line 107 of file SparseVector.h.

◆ end() [1/2]

iterator idol::SparseVector< T , double >::end ( )
inlineinherited

Definition at line 132 of file SparseVector.h.

◆ end() [2/2]

const_iterator idol::SparseVector< T , double >::end ( ) const
inlineinherited

Definition at line 136 of file SparseVector.h.

◆ get()

const double & idol::SparseVector< T , double >::get ( const T &  t_index1) const
inherited

Definition at line 111 of file SparseVector.h.

◆ has_index()

bool idol::SparseVector< T , double >::has_index ( const T &  t_index) const
inlineinherited

Definition at line 109 of file SparseVector.h.

◆ has_objective_value()

template<class T >
bool idol::Point< T >::has_objective_value ( ) const
inline

Definition at line 41 of file Point.h.

◆ is_zero()

bool idol::SparseVector< T , double >::is_zero ( double  t_tolerance) const
virtualinherited

Definition at line 115 of file SparseVector.h.

◆ merge_without_conflict()

idol::SparseVector< T , double > & idol::SparseVector< T , double >::merge_without_conflict ( const SparseVector< T, double > &  t_vec)
inherited

Definition at line 142 of file SparseVector.h.

◆ objective_value()

template<class T >
double idol::Point< T >::objective_value ( ) const

Definition at line 53 of file Point.h.

◆ operator*=() [1/2]

template<class T >
Point & idol::Point< T >::operator*= ( double  t_factor)
inlineoverride

Definition at line 45 of file Point.h.

◆ operator*=() [2/2]

idol::SparseVector< T , double > & idol::SparseVector< T , double >::operator*= ( std::conditional_t< std::is_arithmetic_v< double >, double , double >  t_scalar)
virtualinherited

Definition at line 101 of file SparseVector.h.

◆ operator+=() [1/3]

template<class T >
Point & idol::Point< T >::operator+= ( const Point< T > &  t_other)
inline

Definition at line 46 of file Point.h.

◆ operator+=() [2/3]

idol::SparseVector< T , double > & idol::SparseVector< T , double >::operator+= ( const SparseVector< T, double > &  t_vector)
virtualinherited

Definition at line 99 of file SparseVector.h.

◆ operator+=() [3/3]

template<class T >
Point & idol::Point< T >::operator+= ( Point< T > &&  t_other)
inline

Definition at line 47 of file Point.h.

◆ operator-()

idol::SparseVector< T , double > idol::SparseVector< T , double >::operator- ( ) const
inherited

Definition at line 103 of file SparseVector.h.

◆ operator-=() [1/3]

template<class T >
Point & idol::Point< T >::operator-= ( const Point< T > &  t_other)
inline

Definition at line 48 of file Point.h.

◆ operator-=() [2/3]

idol::SparseVector< T , double > & idol::SparseVector< T , double >::operator-= ( const SparseVector< T, double > &  t_vector)
virtualinherited

Definition at line 100 of file SparseVector.h.

◆ operator-=() [3/3]

template<class T >
Point & idol::Point< T >::operator-= ( Point< T > &&  t_other)
inline

Definition at line 49 of file Point.h.

◆ operator/=()

idol::SparseVector< T , double > & idol::SparseVector< T , double >::operator/= ( std::conditional_t< std::is_arithmetic_v< double >, double , double >  t_scalar)
virtualinherited

Definition at line 102 of file SparseVector.h.

◆ reason()

template<class T >
SolutionReason idol::Point< T >::reason ( ) const
inline

Definition at line 33 of file Point.h.

◆ remove()

void idol::SparseVector< T , double >::remove ( const T &  t_index)
inlineinherited

Definition at line 117 of file SparseVector.h.

◆ reserve()

void idol::SparseVector< T , double >::reserve ( unsigned int  t_capacity)
inlineinherited

Definition at line 121 of file SparseVector.h.

◆ reset_objective_value()

template<class T >
void idol::Point< T >::reset_objective_value ( )
inline

Definition at line 43 of file Point.h.

◆ set()

void idol::SparseVector< T , double >::set ( const T &  t_index,
const double &  t_value 
)
inherited

Definition at line 113 of file SparseVector.h.

◆ set_objective_value()

template<class T >
void idol::Point< T >::set_objective_value ( double  t_objective_value)
inline

Definition at line 39 of file Point.h.

◆ set_reason()

template<class T >
void idol::Point< T >::set_reason ( SolutionReason  t_reason)
inline

Definition at line 35 of file Point.h.

◆ set_status()

template<class T >
void idol::Point< T >::set_status ( SolutionStatus  t_status)
inline

Definition at line 31 of file Point.h.

◆ size()

unsigned int idol::SparseVector< T , double >::size ( ) const
inlineinherited

Definition at line 105 of file SparseVector.h.

◆ status()

template<class T >
SolutionStatus idol::Point< T >::status ( ) const
inline

Definition at line 30 of file Point.h.