Public Member Functions | Protected Member Functions | Private Attributes
Hungarian Class Reference

#include <hungarian.h>

List of all members.

Public Member Functions

const vector< vector< int > > & assignment () const
int cost () const
 Hungarian ()
 Hungarian (const vector< vector< int > > &, int, int, MODE)
int init (const vector< vector< int > > &input_matrix, int rows, int cols, MODE mode)
void print_assignment ()
void print_cost ()
void print_status ()
bool solve ()

Protected Member Functions

bool assign_solution (const vector< int > &row_dec, const vector< int > &col_inc, const vector< int > &col_vertex)
bool check_solution (const vector< int > &row_dec, const vector< int > &col_inc, const vector< int > &col_vertex)

Private Attributes

vector< vector< int > > m_assignment
int m_cols
int m_cost
vector< vector< int > > m_costmatrix
int m_rows

Detailed Description

Definition at line 42 of file hungarian.h.


Constructor & Destructor Documentation

This method initialize the hungarian_problem structure and init the cost matrices (missing lines or columns are filled with 0). It returns the size of the quadratic(!) assignment matrix.

Definition at line 33 of file hungarian.cpp.

Hungarian::Hungarian ( const vector< vector< int > > &  input_matrix,
int  rows,
int  cols,
MODE  mode 
)

Definition at line 44 of file hungarian.cpp.


Member Function Documentation

bool Hungarian::assign_solution ( const vector< int > &  row_dec,
const vector< int > &  col_inc,
const vector< int > &  col_vertex 
) [protected]

Definition at line 225 of file hungarian.cpp.

const vector< vector< int > > & Hungarian::assignment ( ) const

Reference accessor for assignment

Definition at line 585 of file hungarian.cpp.

bool Hungarian::check_solution ( const vector< int > &  row_dec,
const vector< int > &  col_inc,
const vector< int > &  col_vertex 
) [protected]

Definition at line 189 of file hungarian.cpp.

int Hungarian::cost ( ) const

Accessor for the cost

Definition at line 580 of file hungarian.cpp.

int Hungarian::init ( const vector< vector< int > > &  input_matrix,
int  rows,
int  cols,
MODE  mode 
)

Definition at line 139 of file hungarian.cpp.

Print the computed optimal assignment.

Definition at line 120 of file hungarian.cpp.

Print the cost matrix.

Definition at line 124 of file hungarian.cpp.

Print cost matrix and assignment matrix.

Definition at line 128 of file hungarian.cpp.

bool Hungarian::solve ( )

This method computes the optimal assignment.

Definition at line 262 of file hungarian.cpp.


Member Data Documentation

vector<vector<int> > Hungarian::m_assignment [private]

Definition at line 86 of file hungarian.h.

int Hungarian::m_cols [private]

Definition at line 84 of file hungarian.h.

int Hungarian::m_cost [private]

Definition at line 82 of file hungarian.h.

vector<vector<int> > Hungarian::m_costmatrix [private]

Definition at line 85 of file hungarian.h.

int Hungarian::m_rows [private]

Definition at line 83 of file hungarian.h.


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


explorer
Author(s): Daniel Neuhold , Torsten Andre
autogenerated on Thu Aug 27 2015 11:56:52