|
DGtal 1.4.2
|
#include <cstdlib>#include <iostream>#include "DGtal/base/Common.h"#include "DGtal/arithmetic/IntegerComputer.h"Go to the source code of this file.
Functions | |
| template<typename Integer > | |
| bool | testGCD (const IntegerComputer< Integer > &ic) |
| template<typename Integer > | |
| bool | testCFrac (const IntegerComputer< Integer > &ic) |
| template<typename Integer > | |
| bool | testCeilFloorDiv (const IntegerComputer< Integer > &ic) |
| template<typename Integer > | |
| bool | testExtendedEuclid (const IntegerComputer< Integer > &ic) |
| template<typename Integer > | |
| bool | testCoefficientIntersection (const IntegerComputer< Integer > &ic) |
| template<typename Integer > | |
| bool | testValidBezout (const IntegerComputer< Integer > &ic) |
| bool | testIntegerComputer () |
| 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 IntegerComputer.
This file is part of the DGtal library.
Definition in file testIntegerComputer.cpp.
| int main | ( | int | , |
| char ** | ) |
Definition at line 331 of file testIntegerComputer.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), testIntegerComputer(), and DGtal::trace.
| bool testCeilFloorDiv | ( | const IntegerComputer< Integer > & | ic | ) |
Definition at line 122 of file testIntegerComputer.cpp.
References DGtal::IntegerComputer< TInteger >::ceilDiv(), DGtal::IntegerComputer< TInteger >::floorDiv(), DGtal::IntegerComputer< TInteger >::getFloorCeilDiv(), DGtal::Trace::info(), DGtal::IntegerComputer< TInteger >::isZero(), and DGtal::trace.
Referenced by testIntegerComputer().
| bool testCFrac | ( | const IntegerComputer< Integer > & | ic | ) |
Definition at line 82 of file testIntegerComputer.cpp.
References DGtal::IntegerComputer< TInteger >::convergent(), DGtal::IntegerComputer< TInteger >::gcd(), DGtal::IntegerComputer< TInteger >::getCFrac(), DGtal::Trace::info(), and DGtal::trace.
Referenced by testIntegerComputer().
| bool testCoefficientIntersection | ( | const IntegerComputer< Integer > & | ic | ) |
Definition at line 176 of file testIntegerComputer.cpp.
References DGtal::IntegerComputer< TInteger >::dotProduct(), DGtal::IntegerComputer< TInteger >::getCoefficientIntersection(), DGtal::Trace::info(), and DGtal::trace.
Referenced by testIntegerComputer().
| bool testExtendedEuclid | ( | const IntegerComputer< Integer > & | ic | ) |
Definition at line 154 of file testIntegerComputer.cpp.
References DGtal::IntegerComputer< TInteger >::extendedEuclid(), DGtal::IntegerComputer< TInteger >::gcd(), DGtal::Trace::info(), and DGtal::trace.
Referenced by testIntegerComputer().
| bool testGCD | ( | const IntegerComputer< Integer > & | ic | ) |
Definition at line 45 of file testIntegerComputer.cpp.
References DGtal::IntegerComputer< TInteger >::gcd(), DGtal::IntegerComputer< TInteger >::getGcd(), DGtal::Trace::info(), DGtal::IntegerComputer< TInteger >::isZero(), and DGtal::trace.
Referenced by testIntegerComputer().
| bool testIntegerComputer | ( | ) |
Example of a test. To be completed.
Definition at line 264 of file testIntegerComputer.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), testCeilFloorDiv(), testCFrac(), testCoefficientIntersection(), testExtendedEuclid(), testGCD(), testValidBezout(), and DGtal::trace.
Referenced by main().
| bool testValidBezout | ( | const IntegerComputer< Integer > & | ic | ) |
Definition at line 210 of file testIntegerComputer.cpp.
References DGtal::IntegerComputer< TInteger >::abs(), DGtal::IntegerComputer< TInteger >::crossProduct(), DGtal::IntegerComputer< TInteger >::dotProduct(), DGtal::IntegerComputer< TInteger >::getValidBezout(), DGtal::Trace::info(), DGtal::IntegerComputer< TInteger >::reduce(), and DGtal::trace.
Referenced by testIntegerComputer().