|
DGtal 2.2.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/ChordNaivePlaneComputer.h"#include "DGtal/geometry/surfaces/ChordGenericNaivePlaneComputer.h"Go to the source code of this file.
Functions | |
| template<typename Integer> | |
| Integer | getRandomInteger (Integer first, 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 NaivePlaneComputer> | |
| bool | checkPlaneGroupExtension (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) |
| template<typename Integer, typename NaivePlaneComputer> | |
| bool | checkWidth (Integer a, Integer b, Integer c, Integer d, int diameter, unsigned int nbtries) |
| template<typename Integer, typename NaivePlaneComputer> | |
| bool | checkWidths (unsigned int nbplanes, int diameter, unsigned int nbtries) |
| bool | testChordNaivePlaneComputer () |
| template<typename NaivePlaneComputer> | |
| bool | checkManyPlanes (unsigned int diameter, unsigned int nbplanes, unsigned int nbpoints) |
| 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 ChordNaivePlaneComputer.
This file is part of the DGtal library.
Definition in file testChordNaivePlaneComputer.cpp.
| bool checkExtendWithManyPoints | ( | unsigned int | diameter, |
| unsigned int | nbplanes, | ||
| unsigned int | nbpoints ) |
Definition at line 696 of file testChordNaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), DGtal::IntegerComputer< TInteger >::ceilDiv(), checkExtendWithManyPoints(), DGtal::Trace::endBlock(), getRandomInteger(), DGtal::Trace::info(), DGtal::trace, and DGtal::Trace::warning().
Referenced by checkExtendWithManyPoints(), and 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 283 of file testChordNaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::IntegerComputer< TInteger >::ceilDiv(), checkGenericPlane(), and getRandomInteger().
| bool checkManyPlanes | ( | unsigned int | diameter, |
| unsigned int | nbplanes, | ||
| unsigned int | nbpoints ) |
Definition at line 676 of file testChordNaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), checkManyPlanes(), checkPlanes(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by checkManyPlanes(), main(), and 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 testChordNaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::begin(), DGtal::IntegerComputer< TInteger >::ceilDiv(), checkPlane(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::end(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), getRandomInteger(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::isExtendable().
| bool checkPlaneGroupExtension | ( | 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 167 of file testChordNaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::begin(), DGtal::IntegerComputer< TInteger >::ceilDiv(), checkPlaneGroupExtension(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::end(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), getRandomInteger(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::isExtendable().
Referenced by checkPlaneGroupExtension(), and checkPlanes().
| bool checkPlanes | ( | unsigned int | nbplanes, |
| int | diameter, | ||
| unsigned int | nbtries ) |
Definition at line 388 of file testChordNaivePlaneComputer.cpp.
References checkPlane(), checkPlaneGroupExtension(), checkPlanes(), and getRandomInteger().
| bool checkWidth | ( | 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 426 of file testChordNaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::Trace::beginBlock(), DGtal::IntegerComputer< TInteger >::ceilDiv(), checkWidth(), DGtal::Trace::endBlock(), getRandomInteger(), DGtal::Trace::info(), and DGtal::trace.
Referenced by checkWidth(), and checkWidths().
| bool checkWidths | ( | unsigned int | nbplanes, |
| int | diameter, | ||
| unsigned int | nbtries ) |
Definition at line 495 of file testChordNaivePlaneComputer.cpp.
References checkWidth(), checkWidths(), and getRandomInteger().
Referenced by checkWidths(), and main().
Definition at line 50 of file testChordNaivePlaneComputer.cpp.
References getRandomInteger().
| int main | ( | int | , |
| char ** | ) |
Definition at line 774 of file testChordNaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), checkExtendWithManyPoints(), checkManyPlanes(), checkWidths(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), main(), testChordNaivePlaneComputer(), and DGtal::trace.
| bool testChordNaivePlaneComputer | ( | ) |
Example of a test. To be completed.
Definition at line 526 of file testChordNaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), checkGenericPlane(), checkPlane(), DGtal::Trace::endBlock(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), DGtal::Trace::info(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), testChordNaivePlaneComputer(), and DGtal::trace.
Referenced by main(), and testChordNaivePlaneComputer().