|
DGtal 2.0.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 407 of file testCOBANaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::ceilDiv(), getRandomInteger(), and DGtal::trace.
| 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(), DGtal::IntegerComputer< TInteger >::ceilDiv(), and getRandomInteger().
Referenced by testCOBANaivePlaneComputer().
| bool checkManyPlanes | ( | unsigned int | diameter, |
| unsigned int | nbplanes, | ||
| unsigned int | nbpoints ) |
Definition at line 371 of file testCOBANaivePlaneComputer.cpp.
References checkPlanes(), and DGtal::trace.
Referenced by maxDiameter().
| 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(), getRandomInteger(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::isExtendable().
Referenced by checkPlanes(), and testCOBANaivePlaneComputer().
| bool checkPlanes | ( | unsigned int | nbplanes, |
| int | diameter, | ||
| unsigned int | nbtries ) |
Definition at line 253 of file testCOBANaivePlaneComputer.cpp.
References checkPlane(), and getRandomInteger().
Referenced by checkManyPlanes().
| Integer getRandomInteger | ( | const Integer & | first, |
| const Integer & | after_last ) |
Definition at line 50 of file testCOBANaivePlaneComputer.cpp.
Referenced by checkExtendWithManyPoints(), checkGenericPlane(), checkPlane(), and checkPlanes().
| int main | ( | int | , |
| char ** | ) |
Definition at line 483 of file testCOBANaivePlaneComputer.cpp.
References checkExtendWithManyPoints(), checkManyPlanes(), testCOBANaivePlaneComputer(), and DGtal::trace.
| unsigned int maxDiameter | ( | unsigned int | min, |
| unsigned int | max ) |
NB (JOL): Unreliable.
Definition at line 393 of file testCOBANaivePlaneComputer.cpp.
References checkManyPlanes(), and max().
| bool testCOBANaivePlaneComputer | ( | ) |
Example of a test. To be completed.
Definition at line 283 of file testCOBANaivePlaneComputer.cpp.
References checkGenericPlane(), checkPlane(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::trace.
Referenced by main().