DGtal 1.3.0
|
#include <cstdlib>
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/kernel/CPointPredicate.h"
#include "DGtal/geometry/surfaces/CAdditivePrimitiveComputer.h"
#include "DGtal/geometry/surfaces/COBANaivePlaneComputer.h"
#include "DGtal/geometry/surfaces/COBAGenericNaivePlaneComputer.h"
Go to the source code of this file.
Functions | |
template<typename Integer > | |
Integer | getRandomInteger (const Integer &first, const Integer &after_last) |
template<typename Integer , typename NaivePlaneComputer > | |
bool | checkPlane (Integer a, Integer b, Integer c, Integer d, int diameter, unsigned int nbtries) |
template<typename Integer , typename GenericNaivePlaneComputer > | |
bool | checkGenericPlane (Integer a, Integer b, Integer c, Integer d, int diameter, unsigned int nbtries) |
template<typename Integer , typename NaivePlaneComputer > | |
bool | checkPlanes (unsigned int nbplanes, int diameter, unsigned int nbtries) |
bool | testCOBANaivePlaneComputer () |
template<typename NaivePlaneComputer > | |
bool | checkManyPlanes (unsigned int diameter, unsigned int nbplanes, unsigned int nbpoints) |
template<typename NaivePlaneComputer > | |
unsigned int | maxDiameter (unsigned int min, unsigned int max) |
template<typename GenericNaivePlaneComputer > | |
bool | checkExtendWithManyPoints (unsigned int diameter, unsigned int nbplanes, unsigned int nbpoints) |
int | main (int, char **) |
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/.
Functions for testing class COBANaivePlaneComputer.
This file is part of the DGtal library.
Definition in file testCOBANaivePlaneComputer.cpp.
bool checkExtendWithManyPoints | ( | unsigned int | diameter, |
unsigned int | nbplanes, | ||
unsigned int | nbpoints | ||
) |
Definition at line 408 of file testCOBANaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), DGtal::IntegerComputer< TInteger >::ceilDiv(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::trace, and DGtal::Trace::warning().
Referenced by main().
bool checkGenericPlane | ( | Integer | a, |
Integer | b, | ||
Integer | c, | ||
Integer | d, | ||
int | diameter, | ||
unsigned int | nbtries | ||
) |
Checks the naive plane d <= ax+by+cz <= d + max(|a|,|b|,|c|)-1
Definition at line 158 of file testCOBANaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), and DGtal::IntegerComputer< TInteger >::ceilDiv().
bool checkManyPlanes | ( | unsigned int | diameter, |
unsigned int | nbplanes, | ||
unsigned int | nbpoints | ||
) |
Definition at line 372 of file testCOBANaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool checkPlane | ( | Integer | a, |
Integer | b, | ||
Integer | c, | ||
Integer | d, | ||
int | diameter, | ||
unsigned int | nbtries | ||
) |
Checks the naive plane d <= ax+by+cz <= d + max(|a|,|b|,|c|)-1
Definition at line 61 of file testCOBANaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::IntegerComputer< TInteger >::ceilDiv(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::isExtendable().
bool checkPlanes | ( | unsigned int | nbplanes, |
int | diameter, | ||
unsigned int | nbtries | ||
) |
Definition at line 253 of file testCOBANaivePlaneComputer.cpp.
Integer getRandomInteger | ( | const Integer & | first, |
const Integer & | after_last | ||
) |
Definition at line 50 of file testCOBANaivePlaneComputer.cpp.
int main | ( | int | , |
char ** | |||
) |
Definition at line 484 of file testCOBANaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), checkExtendWithManyPoints(), checkManyPlanes(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), testCOBANaivePlaneComputer(), and DGtal::trace.
unsigned int maxDiameter | ( | unsigned int | min, |
unsigned int | max | ||
) |
NB (JOL): Unreliable.
Definition at line 394 of file testCOBANaivePlaneComputer.cpp.
References max().
bool testCOBANaivePlaneComputer | ( | ) |
Example of a test. To be completed.
Definition at line 283 of file testCOBANaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), DGtal::Trace::info(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::trace.
Referenced by main().