123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676 |
- /**
- * @file tests/boost_graph/tests.cpp
- * @author The PARADEVS Development Team
- * See the AUTHORS or Authors.txt file
- */
- /*
- * PARADEVS - the multimodeling and simulation environment
- * This file is a part of the PARADEVS environment
- *
- * Copyright (C) 2013-2015 ULCO http://www.univ-litoral.fr
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- #include <boost/timer.hpp>
- #include <paradevs/common/RootCoordinator.hpp>
- #include <tests/boost_graph/models.hpp>
- #include <tests/boost_graph/graph_builder.hpp>
- #include <tests/boost_graph/graph_generator.hpp>
- #include <tests/boost_graph/graph_manager.hpp>
- #include <tests/boost_graph/graph_partitioning.hpp>
- using namespace paradevs::common;
- using namespace paradevs::common::scheduler;
- using namespace paradevs::pdevs;
- using namespace paradevs::tests::boost_graph;
- #include <fstream>
- std::ofstream log_file("log");
- /* flat models */
- template < class GraphBuilder >
- void flat_heap_test(double duration)
- {
- RootCoordinator <
- DoubleTime,
- paradevs::pdevs::Coordinator <
- DoubleTime,
- SchedulerType,
- SchedulerHandle,
- InBuildFlatGraphManager <
- SchedulerHandle,
- GraphBuilder > >
- > rc(0, duration, "root");
- rc.run();
- }
- template < class GraphBuilder >
- void flat_vector_test(double duration)
- {
- RootCoordinator <
- DoubleTime,
- paradevs::pdevs::Coordinator <
- DoubleTime,
- paradevs::common::scheduler::VectorScheduler <
- paradevs::common::DoubleTime >,
- paradevs::common::scheduler::NoSchedulerHandle,
- InBuildFlatGraphManager <
- paradevs::common::scheduler::NoSchedulerHandle,
- GraphBuilder > >
- > rc(0, duration, "root");
- rc.run();
- }
- /* partitionning models */
- template < class GraphGenerator >
- void partitionning_heap_test(double duration,
- int cluster_number,
- std::string partitioning_method_name,
- int contraction_coef,
- bool contraction_coef_flag,
- GraphGenerator& g)
- {
- RootCoordinator <
- DoubleTime,
- paradevs::pdevs::Coordinator <
- DoubleTime,
- SchedulerType,
- SchedulerHandle,
- HeapHierarchicalGraphManager <
- SchedulerHandle,
- PartitioningGraphBuilder>,
- paradevs::common::NoParameters,
- PartitioningParameters >
- > rc(0, duration, "root", NoParameters(),
- PartitioningParameters(cluster_number, partitioning_method_name,
- contraction_coef, contraction_coef_flag,
- g));
- rc.run();
- }
- template < class GraphGenerator >
- void partitionning_vector_test(double duration,
- int cluster_number,
- std::string partitioning_method_name,
- int contraction_coef,
- bool contraction_coef_flag,
- GraphGenerator& g)
- {
- RootCoordinator <
- DoubleTime,
- paradevs::pdevs::Coordinator <
- DoubleTime,
- paradevs::common::scheduler::VectorScheduler <
- paradevs::common::DoubleTime >,
- paradevs::common::scheduler::NoSchedulerHandle,
- VectorHierarchicalGraphManager <
- paradevs::common::scheduler::NoSchedulerHandle,
- PartitioningGraphBuilder >,
- paradevs::common::NoParameters,
- PartitioningParameters >
- > rc(0, duration, "root", NoParameters(),
- PartitioningParameters(cluster_number, partitioning_method_name,
- contraction_coef, contraction_coef_flag, g));
- rc.run();
- }
- /* iteration for partitionning methods */
- template < class GraphGenerator >
- void test(double duration, std::string partitioning_method_name,
- unsigned int min, unsigned int max, unsigned int step,
- bool vector, bool heap,
- int contraction_coef,
- bool contraction_coef_flag,
- GraphGenerator& g)
- {
- boost::timer t;
- int nbr_ite = 10;
-
- log_file << "==== " << partitioning_method_name << " with ";
- if (contraction_coef_flag) {
- log_file << "/";
- }
- log_file << contraction_coef << " ===" << std::endl;
- log_file << "n";
- if (heap) {
- log_file << "\t heap";
- }
- if (vector) {
- log_file << "\t vector";
- }
- log_file << std::endl;
- if (contraction_coef_flag) {
- for (unsigned int n = min; n <= max; n += step) {
- log_file << n << "\t";
- if (heap) {
- double t1 = t.elapsed();
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- partitionning_heap_test(duration, n,
- partitioning_method_name,
- contraction_coef,
- contraction_coef_flag, g);
- }
- double t2 = t.elapsed();
- log_file << (t2 - t1) / nbr_ite << "\t";
- }
- if (vector) {
- double t1 = t.elapsed();
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- partitionning_vector_test(duration, n,
- partitioning_method_name,
- contraction_coef,
- contraction_coef_flag, g);
- }
- double t2 = t.elapsed();
- log_file << (t2 - t1) / nbr_ite << std::endl;
- } else {
- log_file << std::endl;
- }
- }
- } else {
- log_file << contraction_coef << "\t";
- if (heap) {
- double t1 = t.elapsed();
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- partitionning_heap_test(duration, contraction_coef,
- partitioning_method_name,
- contraction_coef,
- contraction_coef_flag, g);
- }
- double t2 = t.elapsed();
- log_file << (t2 - t1) / nbr_ite << "\t";
- }
- if (vector) {
- double t1 = t.elapsed();
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- partitionning_vector_test(duration, contraction_coef,
- partitioning_method_name,
- contraction_coef,
- contraction_coef_flag, g);
- }
- double t2 = t.elapsed();
- log_file << (t2 - t1) / nbr_ite << std::endl;
- } else {
- log_file << std::endl;
- }
- }
- }
- /* 38 nodes graph */
- const double duration_38 = 20;
- void test_flat_38()
- {
- boost::timer t;
- log_file << "== 38 nodes ==" << std::endl;
- log_file << "flat graph with heap = ";
- for (unsigned int i = 0; i < 20; ++i) {
- flat_heap_test< FlatGraphBuilder >(duration_38);
- }
- double t2 = t.elapsed();
- log_file << t2 / 20 << std::endl;
- log_file << "flat graph with vector = ";
- for (unsigned int i = 0; i < 20; ++i) {
- flat_vector_test< FlatGraphBuilder >(duration_38);
- }
- double t3 = t.elapsed();
- log_file << (t3 - t2) / 20 << std::endl;
- }
- void test_partitioning_38()
- {
- ArtificialGraphGenerator g(38);
- for (int i = 1; i <= 2; ++i) {
- /*std::cout<<"Méthode ggp"<<std::endl;
- test < ArtificialGraphGenerator >(duration_38, "ggp", 2, 16, 2,
- true, true, i, true, g);*/
- std::cout<<"Méthode gggp"<<std::endl;
- test < ArtificialGraphGenerator >(duration_38, "gggp_pond", 2, 16, 2,
- true, true, i, true, g);
- std::cout<<"Méthode random"<<std::endl;
- test < ArtificialGraphGenerator >(duration_38, "random", 2, 16, 2,
- true, true, i, true, g);
- }
- for (int i = 2; i <= 8; i += 2) {
- test < ArtificialGraphGenerator >(duration_38, "gggp_pond", 0, 0, 0,
- true, true, i, false, g);
- }
- }
- /* random graph */
- const double duration_random = 0;
- void test_flat_random()
- {
- boost::timer t;
- uint nbr_ite = 20;
- log_file << "== Random Graph ==" << std::endl;
- log_file << "flat graph with heap = ";
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- flat_heap_test< RandomFlatGraphBuilder >(duration_random);
- }
- double t2 = t.elapsed();
- /*log_file << t2 / 10 << std::endl;
- log_file << "flat graph with vector = ";
- for (unsigned int i = 0; i < 10; ++i) {
- flat_vector_test< FlatGraphBuilder >(duration_random);
- }
- double t3 = t.elapsed();*/
- //log_file << (t3 - t2) / 10 << std::endl;
- log_file << t2 / nbr_ite << std::endl;
- }
- void test_partitioning_random()
- {
- std::vector < int > levels = {/*5,4,*/ 3, 2 };
- int nbr_sommets = 200;
- int sources = nbr_sommets/100*1;
-
- RandomGraphGenerator g(nbr_sommets, levels, sources, 2, 3);
- /*test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 200, 2,
- false, true, 5, true, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 200, 2,
- false, true, 10, true, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 200, 2,
- false, true, 20, true, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 42, 42, 2,
- false, true, 40, true, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 50, 2,
- false, true, 60, true, g);*/
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 200, 2,
- false, true, 1 , true, g);
- /* test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 100, true, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 30, 2,
- false, true, 200, true, g);*/
- /*test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 15, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 20, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 25, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 30, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 35, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 40, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 45, false, g);
- test < RandomGraphGenerator >(duration_random, "gggp_pond", 2, 32, 2,
- false, true, 50, false, g);*/
- /*test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 5, true, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 10, true, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 20, true, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 40, true, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 60, true, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 80, true, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 30, 2,
- false, true, 100, true, g);*/
- /*test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 15, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 20, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 25, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 30, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 35, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 40, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 45, false, g);
- test < RandomGraphGenerator >(duration_random, "ggp", 2, 32, 2,
- false, true, 50, false, g);
- test < RandomGraphGenerator >(duration_random, "random", 2, 32, 2,
- false, true, 5, true, g);
- test < RandomGraphGenerator >(duration_random, "random", 2, 32, 2,
- false, true, 10, true, g);
- test < RandomGraphGenerator >(duration_random, "random", 2, 32, 2,
- false, true, 20, true, g);
- test < RandomGraphGenerator >(duration_random, "random", 2, 32, 2,
- false, true, 40, true, g);
- test < RandomGraphGenerator >(duration_random, "random", 2, 22, 2,
- false, true, 100, true, g);*/
- }
- const double duration_random_grid = 40;
- void test_flat_random_grid()
- {
- boost::timer t;
- uint nbr_ite = 10;
- log_file << "== Random Graph ==" << std::endl;
- log_file << "flat graph with heap = ";
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- flat_heap_test< RandomGridFlatGraphBuilder >(duration_random_grid);
- }
- double t2 = t.elapsed();
- /*log_file << t2 / 10 << std::endl;
- log_file << "flat graph with vector = ";
- for (unsigned int i = 0; i < 10; ++i) {
- flat_vector_test< FlatGraphBuilder >(duration_random);
- }
- double t3 = t.elapsed();*/
- //log_file << (t3 - t2) / 10 << std::endl;
- log_file << t2 / nbr_ite << std::endl;
- }
- void test_partitioning_random_grid()
- {
- unsigned int side = 90;
- std::vector<std::pair<int,int>> vertex_selection;
- std::pair<int,int> tmp;
- tmp.first = 0;
- tmp.second = 3;
- vertex_selection.push_back(tmp);
- Entiers weight_vertex;
- weight_vertex.push_back(1);
- const char *edge_weight;
- edge_weight = "../../sortie_graphe/tests_grid.txt";
- bool rec = false;
-
- RandomGridGraphGenerator g(side, vertex_selection, weight_vertex, edge_weight, rec);
- test < RandomGridGraphGenerator >(duration_random_grid, "gggp_pond", 2, 100, 2,
- false, true, 80 , true, g);
-
- test < RandomGridGraphGenerator >(duration_random_grid, "gggp_pond", 2, 100, 2,
- false, true, 40 , true, g);
- }
- const double duration_random_linked = 30;
- void test_flat_random_linked()
- {
- boost::timer t;
- uint nbr_ite = 20;
- log_file << "== Random Linked Graph ==" << std::endl;
- log_file << "flat graph with heap = ";
- for (unsigned int i = 0; i < nbr_ite; ++i) {
- flat_heap_test< RandomLinkedFlatGraphBuilder >(duration_random_linked);
- }
- double t2 = t.elapsed();
- /*log_file << t2 / 10 << std::endl;
- log_file << "flat graph with vector = ";
- for (unsigned int i = 0; i < 10; ++i) {
- flat_vector_test< FlatGraphBuilder >(duration_random);
- }
- double t3 = t.elapsed();*/
- //log_file << (t3 - t2) / 10 << std::endl;
- log_file << t2 / nbr_ite << std::endl;
- }
- void test_partitioning_random_linked()
- {
- unsigned int levels = 60;
- int nbr_sommets = 5000;
- RandomLinkedGraphGenerator g(nbr_sommets, levels, 2, 3);
- // gggp
- /*test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 5, true, g);*/
- test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 10, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 20, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 40, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 60, true, g);
- /*test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 80, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 100, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "gggp_pond", 2, 50, 2,
- false, true, 200, true, g);*/
-
- // ggp
- /*test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 5, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 10, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 20, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 40, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 60, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 80, true, g);
- test < RandomLinkedGraphGenerator >(duration_random_linked, "ggp", 2, 50, 2,
- false, true, 100, true, g);*/
- }
- /* corsen graph */
- const double corsen_duration = 20;
- void test_flat_corsen()
- {
- boost::timer t;
- log_file << "== CORSEN == " << std::endl;
- log_file << "flat graph with heap = ";
- for (unsigned int i = 0; i < 20; ++i) {
- flat_heap_test< CorsenFlatGraphBuilder >(corsen_duration);
- }
- double t2 = t.elapsed();
- log_file << t2 / 20 << std::endl;
- log_file << "flat graph with vector = ";
- for (unsigned int i = 0; i < 20; ++i) {
- flat_vector_test< CorsenFlatGraphBuilder >(corsen_duration);
- }
- double t3 = t.elapsed();
- log_file << (t3 - t2) / 20 << std::endl;
- }
- void test_partitioning_corsen()
- {
- CorsenGraphGenerator g;
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 10, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 20, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 40, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 80, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 22, 2,
- false, true, 200, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 30, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 40, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 50, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 60, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 70, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 80, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 90, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "gggp_pond", 2, 32, 2,
- false, true, 100, false, g);
- /*test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 10, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 20, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 40, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 80, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 22, 2,
- false, true, 200, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 30, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 40, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 50, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 60, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 70, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 80, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 90, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "ggp", 2, 32, 2,
- false, true, 100, false, g);
- test < CorsenGraphGenerator >(corsen_duration, "random", 2, 32, 2,
- false, true, 10, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "random", 2, 32, 2,
- false, true, 20, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "random", 2, 32, 2,
- false, true, 40, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "random", 2, 32, 2,
- false, true, 80, true, g);
- test < CorsenGraphGenerator >(corsen_duration, "random", 2, 22, 2,
- false, true, 200, true, g);*/
- }
- /* three graph types : 38 nodes, corsen and random */
- void test_38()
- {
- test_flat_38();
- test_partitioning_38();
- }
- void test_corsen()
- {
- test_flat_corsen();
- test_partitioning_corsen();
- }
- void test_random()
- {
- test_flat_random();
- test_partitioning_random();
- }
- void test_random_linked()
- {
- test_flat_random_linked();
- test_partitioning_random_linked();
- }
- void test_random_grid()
- {
- test_flat_random_grid();
- test_partitioning_random_grid();
- }
- int main()
- {
- srand(7262);
- //std::cout<<"Simulation pour graphe 38"<<std::endl;
- //test_38();
- //std::cout<<std::endl;
- //std::cout<<"Simulation pour graphe RANDOM 4000"<<std::endl;
- //test_random();
- std::cout<<"Simulation pour graphe RANDOM_TREE 200"<<std::endl;
- test_random_grid();
- //std::cout<<"Simulation pour graphe RANDOM_LINKED 6000"<<std::endl;
- //test_random_linked();
- //std::cout<<std::endl;
- //std::cout<<"Simulation pour graphe CORSEN"<<std::endl;
- //test_corsen();
- return 0;
- }
|