diff --git a/testMainWithPoint.cpp b/testMainWithPoint.cpp new file mode 100644 index 0000000..b5c7bd8 --- /dev/null +++ b/testMainWithPoint.cpp @@ -0,0 +1,124 @@ +#include +#include "Hungarian.h" +#include +using namespace std; + + +vector> find_distance_table(int number_of_point, float x_start[], float y_start[], float z_start[], float x_goal[], float y_goal[], float z_goal[]) +{ + + vector> distance_table(number_of_point, vector (number_of_point, 0)); + for(int i=0 ; i assignment, float x_goal[], float y_goal[], float z_goal[]) +{ + + + float* x_goal_copy = new float(number_of_point); + float* y_goal_copy = new float(number_of_point); + float* z_goal_copy = new float(number_of_point); + + for(int i=0 ; i > costMatrix ={{ 92, 90, 61, 42}, + // { 90, 92, 81, 61 }, + // { 24, 14, 108, 98}, + // { 14, 24, 120, 108} }; + + vector< vector > costMatrix = find_distance_table(number_of_point, x_start, y_start, z_start, x_goal, y_goal, z_goal); + + HungarianAlgorithm HungAlgo; + vector assignment; + + double cost = HungAlgo.Solve(costMatrix, assignment); + + change_order_of_goals(number_of_point, assignment, x_goal, y_goal, z_goal); + + + cout << "\n\nOutput : \n\n"; + for(int i=0 ; i pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy