DGtal 1.4.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(), DGtal::Trace::endBlock(), getRandomInteger(), 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 283 of file testChordNaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::IntegerComputer< TInteger >::ceilDiv(), and getRandomInteger().
Referenced by testChordNaivePlaneComputer().
bool checkManyPlanes | ( | unsigned int | diameter, |
unsigned int | nbplanes, | ||
unsigned int | nbpoints ) |
Definition at line 676 of file testChordNaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), checkPlanes(), 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 testChordNaivePlaneComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::begin(), DGtal::IntegerComputer< TInteger >::ceilDiv(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::end(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), getRandomInteger(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::isExtendable().
Referenced by checkPlanes(), and testChordNaivePlaneComputer().
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(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::end(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), getRandomInteger(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::isExtendable().
Referenced by checkPlanes().
bool checkPlanes | ( | unsigned int | nbplanes, |
int | diameter, | ||
unsigned int | nbtries ) |
Definition at line 388 of file testChordNaivePlaneComputer.cpp.
References checkPlane(), checkPlaneGroupExtension(), and getRandomInteger().
Referenced by checkManyPlanes().
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(), DGtal::Trace::endBlock(), getRandomInteger(), DGtal::Trace::info(), and DGtal::trace.
Referenced by checkWidths().
bool checkWidths | ( | unsigned int | nbplanes, |
int | diameter, | ||
unsigned int | nbtries ) |
Definition at line 495 of file testChordNaivePlaneComputer.cpp.
References checkWidth(), and getRandomInteger().
Referenced by main().
Definition at line 50 of file testChordNaivePlaneComputer.cpp.
Referenced by checkExtendWithManyPoints(), checkGenericPlane(), checkPlane(), checkPlaneGroupExtension(), checkPlanes(), checkWidth(), and checkWidths().
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(), 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(), and DGtal::trace.
Referenced by main().