DGtal 1.4.2
|
#include <iostream>
#include <vector>
#include <algorithm>
#include <chrono>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/kernel/sets/DigitalSetBySTLSet.h"
#include "DGtal/topology/KhalimskySpaceND.h"
#include "DGtal/shapes/Shapes.h"
#include "DGtal/geometry/volumes/PConvexity.h"
#include "DGtal/geometry/volumes/DigitalConvexity.h"
Go to the source code of this file.
Functions | |
double | rand01 () |
template<Dimension dim> | |
void | timingsPConvexity (std::vector< std::tuple< std::size_t, double, bool > > &results, std::size_t nb_tries, std::size_t nb_vertices, std::size_t range, double pconvexity_probability=0.5) |
template<Dimension dim> | |
void | timingsFullConvexity (std::vector< std::tuple< std::size_t, double, bool > > &results, std::size_t nb_tries, std::size_t nb_vertices, std::size_t range, double fconvexity_probability=0.5) |
template<Dimension dim> | |
void | timingsFullConvexityFast (std::vector< std::tuple< std::size_t, double, bool > > &results, std::size_t nb_tries, std::size_t nb_vertices, std::size_t range, double fconvexity_probability=0.5) |
template<Dimension dim> | |
void | timingsPConvexityNonConvex (std::vector< std::tuple< std::size_t, double, bool > > &results, std::size_t nb_tries, std::size_t range) |
template<Dimension dim> | |
void | timingsFullConvexityNonConvex (std::vector< std::tuple< std::size_t, double, bool > > &results, std::size_t nb_tries, std::size_t range) |
template<Dimension dim> | |
void | timingsFullConvexityFastNonConvex (std::vector< std::tuple< std::size_t, double, bool > > &results, std::size_t nb_tries, std::size_t range) |
void | outputResults (Dimension dim, const std::vector< std::tuple< std::size_t, double, bool > > &results, const std::string &fname) |
int | main (int argc, char *argv[]) |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser 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/.
An example file named pConvexity-benchmark
This file is part of the DGtal library.
Definition in file pConvexity-benchmark.cpp.
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 391 of file pConvexity-benchmark.cpp.
References outputResults(), srand(), timingsFullConvexity(), timingsFullConvexityFast(), timingsFullConvexityFastNonConvex(), timingsFullConvexityNonConvex(), timingsPConvexity(), and timingsPConvexityNonConvex().
void outputResults | ( | Dimension | dim, |
const std::vector< std::tuple< std::size_t, double, bool > > & | results, | ||
const std::string & | fname ) |
Definition at line 343 of file pConvexity-benchmark.cpp.
References dim.
Referenced by main().
double rand01 | ( | ) |
Definition at line 70 of file pConvexity-benchmark.cpp.
Referenced by timingsFullConvexity(), timingsFullConvexityFast(), and timingsPConvexity().
void timingsFullConvexity | ( | std::vector< std::tuple< std::size_t, double, bool > > & | results, |
std::size_t | nb_tries, | ||
std::size_t | nb_vertices, | ||
std::size_t | range, | ||
double | fconvexity_probability = 0.5 ) |
Definition at line 122 of file pConvexity-benchmark.cpp.
References DGtal::DigitalConvexity< TKSpace >::CvxH(), dim, domain, dt, DGtal::DigitalConvexity< TKSpace >::envelope(), DGtal::BoundedLatticePolytope< TSpace >::getPoints(), DGtal::DigitalConvexity< TKSpace >::isFullyConvex(), rand01(), DGtal::trace, and DGtal::Trace::warning().
Referenced by main().
void timingsFullConvexityFast | ( | std::vector< std::tuple< std::size_t, double, bool > > & | results, |
std::size_t | nb_tries, | ||
std::size_t | nb_vertices, | ||
std::size_t | range, | ||
double | fconvexity_probability = 0.5 ) |
Definition at line 170 of file pConvexity-benchmark.cpp.
References DGtal::DigitalConvexity< TKSpace >::CvxH(), dim, domain, dt, DGtal::DigitalConvexity< TKSpace >::envelope(), DGtal::BoundedLatticePolytope< TSpace >::getPoints(), DGtal::DigitalConvexity< TKSpace >::isFullyConvexFast(), rand01(), DGtal::trace, and DGtal::Trace::warning().
Referenced by main().
void timingsFullConvexityFastNonConvex | ( | std::vector< std::tuple< std::size_t, double, bool > > & | results, |
std::size_t | nb_tries, | ||
std::size_t | range ) |
Definition at line 302 of file pConvexity-benchmark.cpp.
References dim, domain, dt, and DGtal::DigitalConvexity< TKSpace >::isFullyConvexFast().
Referenced by main().
void timingsFullConvexityNonConvex | ( | std::vector< std::tuple< std::size_t, double, bool > > & | results, |
std::size_t | nb_tries, | ||
std::size_t | range ) |
Definition at line 260 of file pConvexity-benchmark.cpp.
References dim, domain, dt, and DGtal::DigitalConvexity< TKSpace >::isFullyConvex().
Referenced by main().
void timingsPConvexity | ( | std::vector< std::tuple< std::size_t, double, bool > > & | results, |
std::size_t | nb_tries, | ||
std::size_t | nb_vertices, | ||
std::size_t | range, | ||
double | pconvexity_probability = 0.5 ) |
Definition at line 74 of file pConvexity-benchmark.cpp.
References DGtal::DigitalConvexity< TKSpace >::CvxH(), dim, domain, dt, DGtal::DigitalConvexity< TKSpace >::envelope(), DGtal::BoundedLatticePolytope< TSpace >::getPoints(), DGtal::PConvexity< TSpace >::isPConvex(), rand01(), DGtal::trace, and DGtal::Trace::warning().
Referenced by main().
void timingsPConvexityNonConvex | ( | std::vector< std::tuple< std::size_t, double, bool > > & | results, |
std::size_t | nb_tries, | ||
std::size_t | range ) |
Definition at line 219 of file pConvexity-benchmark.cpp.
References dim, domain, dt, and DGtal::PConvexity< TSpace >::isPConvex().
Referenced by main().