DGtal
1.5.beta
|
#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(), DGtal::Trace::info(), DGtal::trace, and DGtal::Trace::warning().
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(), and DGtal::IntegerComputer< TInteger >::ceilDiv().
bool checkManyPlanes | ( | unsigned int | diameter, |
unsigned int | nbplanes, | ||
unsigned int | nbpoints | ||
) |
Definition at line 676 of file testChordNaivePlaneComputer.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 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(), 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(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::end(), 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 388 of file testChordNaivePlaneComputer.cpp.
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(), DGtal::Trace::info(), and DGtal::trace.
bool checkWidths | ( | unsigned int | nbplanes, |
int | diameter, | ||
unsigned int | nbtries | ||
) |
Definition at line 50 of file testChordNaivePlaneComputer.cpp.
int main | ( | int | , |
char ** | |||
) |
Definition at line 774 of file testChordNaivePlaneComputer.cpp.
References DGtal::Trace::beginBlock(), 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(), DGtal::Trace::endBlock(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::extend(), DGtal::Trace::info(), DGtal::COBANaivePlaneComputer< TSpace, TInternalInteger >::init(), and DGtal::trace.
Referenced by main().