/* -*- C++ -*- * * This file is a part of LEMON, a generic C++ optimization library * * Copyright (C) 2003-2008 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ #include #include"bench_tools.h" using namespace lemon; ///Makes a full graph by adding and deleting a lot of edges; ///\param n Number of nodes. ///\param rat The funcion will make \f$rat\timesn^2\f$ edge addition and ///\f$(rat-1)\timesn^2\f$ deletion. ///\param p Tuning parameters. ///\warning \c rat, \c p, and \c n must be pairwise relative primes. template void makeFullGraph(int n, int rat, int p) { GRAPH_TYPEDEFS(typename Graph); Graph G; // Node nodes[n]; std::vector nodes(n); for(int i=0;i equ(rat); /// \bug There is no long long int type in C++98. long long int count; for(count=0;count(nextPrim(1000),nextPrim(300),nextPrim(100)); PrintTime("BIG",T); T.restart(); makeFullGraph(nextPrim(100),nextPrim(30000),nextPrim(150)); PrintTime("SMALL",T); }