35 #include <boost/shared_ptr.hpp>
37 #include <Eigen/Dense>
38 #include <Eigen/Cholesky>
50 using Eigen::MatrixXd;
51 using Eigen::VectorXd;
74 ostream &operator<<(ostream &o,vector<orderedPairPtr>& op);
89 o<<
"cost: "<<a.
cost<<
" ";
130 gettimeofday(&start, NULL);
148 gettimeofday(&end, NULL);
151 values[
t] = (end.tv_sec - timers[
t].tv_sec);
152 values[
t]+= (end.tv_usec - timers[
t].tv_usec) / 1000000.0;
161 return values[
t]*1000.;
171 double munkers_wrapper(MatrixXd&cost_mat,vector<orderedPairPtr>&assignments);
177 vector<int>
getRows(vector<orderedPairPtr>& pairs);
178 vector<int>
getCols(vector<orderedPairPtr>& pairs);
180 ostream &operator<<(ostream &o,vector<AssignmentsPtr>& assing);
vector< AssignmentsPtr > k_best_assignment(MatrixXd &cost_mat, uint k)
vector< orderedPairPtr > fixed
bool compareOrdered_pair(orderedPairPtr &p1, orderedPairPtr &p2)
vector< orderedPairPtr > pairs
vector< orderedPairPtr > excluded
NodePtr calcNodeCost(Node &node_in, MatrixXd &cost_mat, bool non_square_matrix=false)
vector< int > getRows(vector< orderedPairPtr > &pairs)
map< int, double > values
boost::shared_ptr< Assignments > AssignmentsPtr
map< int, timeval > timers
friend ostream & operator<<(ostream &o, Assignments &a)
double toMiliseconds(int t=0)
uint countRepeatingValues(vector< type > sorted_values)
Only works on sorted vectors.
double munkers_wrapper(MatrixXd &cost_mat, vector< orderedPairPtr > &assignments)
vector< NodePtr > partitionNode(Node &node_in, MatrixXd &cost_mat)
vector< int > getCols(vector< orderedPairPtr > &pairs)
External library declaration to preform the Hungarian algorithm (Munkres)
ostream & operator<<(ostream &o, vector< orderedPairPtr > &op)
vector< vector< int > > convertToStdVector(MatrixXd &mat)
vector< orderedPairPtr > unspecific
boost::shared_ptr< Node > NodePtr
boost::shared_ptr< orderedPair > orderedPairPtr