OpenGM  2.3.x
Discrete Graphical Model Library
Public Types | Public Member Functions | Static Public Attributes | List of all members
TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix > Class Template Reference

#include <transportationsolver.hxx>

+ Inheritance diagram for TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >:
+ Collaboration diagram for TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >:

Public Types

enum  Direction { X, Y }
 
typedef DenseMatrix::ValueType floatType
 
typedef std::pair< size_t, DirectionCoordDir
 
typedef std::queue< CoordDirQueue
 
typedef List2D< floatTypeFeasiblePoint
 
typedef std::vector< floatTypeUnaryDense
 
typedef std::vector< size_tIndexArray
 
typedef std::list< typename FeasiblePoint::const_iteratorCycleList
 

Public Member Functions

 TransportationSolver (floatType relativePrecision=floatTypeEps, size_t maxIterationNumber=defaultMaxIterationNumber)
 
 TransportationSolver (const size_t &xsize, const size_t &ysize, const DenseMatrix &bin, floatType relativePrecision=floatTypeEps, size_t maxIterationNumber=100)
 
void Init (size_t xsize, size_t ysize, const DenseMatrix &bin)
 
template<class Iterator >
floatType Solve (Iterator xbegin, Iterator ybegin)
 
floatType GetObjectiveValue () const
 
template<class OutputMatrix >
floatType GetSolution (OutputMatrix *pbin) const
 returns value of the current basic solution More...
 

Static Public Attributes

static const floatType floatTypeEps =std::numeric_limits<TransportationSolver<OPTIMIZER,DenseMatrix>::floatType>::epsilon()
 
static const size_t defaultMaxIterationNumber =100
 
static const size_t MAXSIZE_T =std::numeric_limits<size_t>::max()
 

Detailed Description

template<class OPTIMIZER, class DenseMatrix>
class TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >

Definition at line 613 of file transportationsolver.hxx.

Member Typedef Documentation

template<class OPTIMIZER, class DenseMatrix>
typedef std::pair<size_t,Direction> TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::CoordDir

Definition at line 618 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
typedef std::list<typename FeasiblePoint::const_iterator> TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::CycleList

Definition at line 623 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
typedef List2D<floatType> TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::FeasiblePoint

Definition at line 620 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
typedef DenseMatrix::ValueType TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::floatType

Definition at line 616 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
typedef std::vector<size_t> TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::IndexArray

Definition at line 622 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
typedef std::queue<CoordDir> TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::Queue

Definition at line 619 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
typedef std::vector<floatType> TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::UnaryDense

Definition at line 621 of file transportationsolver.hxx.

Member Enumeration Documentation

template<class OPTIMIZER, class DenseMatrix>
enum TransportSolver::TransportationSolver::Direction
Enumerator

Definition at line 617 of file transportationsolver.hxx.

Constructor & Destructor Documentation

template<class OPTIMIZER, class DenseMatrix>
TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::TransportationSolver ( floatType  relativePrecision = floatTypeEps,
size_t  maxIterationNumber = defaultMaxIterationNumber 
)
inline

Definition at line 629 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::TransportationSolver ( const size_t xsize,
const size_t ysize,
const DenseMatrix &  bin,
floatType  relativePrecision = floatTypeEps,
size_t  maxIterationNumber = 100 
)
inline

Definition at line 642 of file transportationsolver.hxx.

Member Function Documentation

template<class OPTIMIZER, class DenseMatrix>
floatType TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::GetObjectiveValue ( ) const
inline

Definition at line 667 of file transportationsolver.hxx.

template<class OPTIMIZER , class DenseMatrix >
template<class OutputMatrix >
TransportationSolver< OPTIMIZER, DenseMatrix >::floatType TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::GetSolution ( OutputMatrix *  pbin) const

returns value of the current basic solution

Definition at line 1146 of file transportationsolver.hxx.

template<class OPTIMIZER , class DenseMatrix>
void TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::Init ( size_t  xsize,
size_t  ysize,
const DenseMatrix &  bin 
)

Definition at line 720 of file transportationsolver.hxx.

+ Here is the caller graph for this function:

template<class OPTIMIZER , class DenseMatrix >
template<class Iterator >
TransportationSolver< OPTIMIZER, DenseMatrix >::floatType TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::Solve ( Iterator  xbegin,
Iterator  ybegin 
)

Definition at line 1104 of file transportationsolver.hxx.

Member Data Documentation

template<class OPTIMIZER, class DenseMatrix>
const size_t TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::defaultMaxIterationNumber =100
static

Definition at line 626 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
const TransportationSolver< OPTIMIZER, DenseMatrix >::floatType TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::floatTypeEps =std::numeric_limits<TransportationSolver<OPTIMIZER,DenseMatrix>::floatType>::epsilon()
static

Definition at line 625 of file transportationsolver.hxx.

template<class OPTIMIZER, class DenseMatrix>
const size_t TransportSolver::TransportationSolver< OPTIMIZER, DenseMatrix >::MAXSIZE_T =std::numeric_limits<size_t>::max()
static

Definition at line 627 of file transportationsolver.hxx.