TTK
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ttk::AssignmentExhaustive< dataType > Class Template Reference

#include <AssignmentExhaustive.h>

Inheritance diagram for ttk::AssignmentExhaustive< dataType >:
ttk::Debug ttk::AssignmentSolver< dataType > ttk::BaseClass ttk::Debug ttk::BaseClass

Public Member Functions

 AssignmentExhaustive ()=default
 
 ~AssignmentExhaustive () override=default
 
int run (std::vector< MatchingType > &matchings) override
 
void setSaveAsgn (bool doSave)
 
dataType tryAssignment (std::vector< int > &asgn, std::vector< MatchingType > &matchings)
 
std::string vectorToString (std::vector< dataType > &my_vector)
 
void enumerateAssignments (unsigned int min_dim, unsigned int max_dim, std::vector< std::vector< int > > &allAsgn)
 
void printAssignments (std::vector< std::vector< int > > &allAsgn)
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 
- Public Member Functions inherited from ttk::AssignmentSolver< dataType >
 AssignmentSolver ()=default
 
 ~AssignmentSolver () override=default
 
virtual void clear ()
 
virtual void clearMatrix ()
 
virtual int setInput (std::vector< std::vector< dataType > > &C_)
 
virtual void setBalanced (bool balanced)
 
virtual std::vector< std::vector< dataType > > getCostMatrix ()
 
virtual std::vector< std::vector< dataType > > * getCostMatrixPointer ()
 
void printTableVector (std::vector< std::vector< dataType > > &table)
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 
- Protected Attributes inherited from ttk::AssignmentSolver< dataType >
std::vector< std::vector< dataType > > costMatrix
 
int rowSize = 0
 
int colSize = 0
 
bool balancedAssignment
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

template<class dataType>
class ttk::AssignmentExhaustive< dataType >
Author
Mathieu Pont (mathi.nosp@m.eu.p.nosp@m.ont@l.nosp@m.ip6..nosp@m.fr)

Exhaustive Search for Unbalanced Assignment Problem (TODO manage balanced problem)

The cost matrix in input has a size of (n + 1) x (m + 1)

An exhaustive search for the assignment problem has an exponential complexity Use this algorithm only for small assignment problem

Definition at line 31 of file AssignmentExhaustive.h.

Constructor & Destructor Documentation

◆ AssignmentExhaustive()

template<class dataType >
ttk::AssignmentExhaustive< dataType >::AssignmentExhaustive ( )
default

◆ ~AssignmentExhaustive()

template<class dataType >
ttk::AssignmentExhaustive< dataType >::~AssignmentExhaustive ( )
overridedefault

Member Function Documentation

◆ enumerateAssignments()

template<class dataType >
void ttk::AssignmentExhaustive< dataType >::enumerateAssignments ( unsigned int  min_dim,
unsigned int  max_dim,
std::vector< std::vector< int > > &  allAsgn 
)
inline

Definition at line 55 of file AssignmentExhaustive.h.

◆ printAssignments()

template<class dataType >
void ttk::AssignmentExhaustive< dataType >::printAssignments ( std::vector< std::vector< int > > &  allAsgn)
inline

Definition at line 118 of file AssignmentExhaustive.h.

◆ run()

template<typename dataType >
int ttk::AssignmentExhaustive< dataType >::run ( std::vector< MatchingType > &  matchings)
overridevirtual

Implements ttk::AssignmentSolver< dataType >.

Definition at line 164 of file AssignmentExhaustive.h.

◆ setSaveAsgn()

template<class dataType >
void ttk::AssignmentExhaustive< dataType >::setSaveAsgn ( bool  doSave)
inline

Definition at line 41 of file AssignmentExhaustive.h.

◆ tryAssignment()

template<typename dataType >
dataType ttk::AssignmentExhaustive< dataType >::tryAssignment ( std::vector< int > &  asgn,
std::vector< MatchingType > &  matchings 
)

Definition at line 144 of file AssignmentExhaustive.h.

◆ vectorToString()

template<class dataType >
std::string ttk::AssignmentExhaustive< dataType >::vectorToString ( std::vector< dataType > &  my_vector)
inline

Definition at line 48 of file AssignmentExhaustive.h.


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