DGtal 1.3.0
|
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/NumberTraits.h"
#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h"
#include "DGtal/geometry/tools/determinant/Simple2x2DetComputer.h"
#include "DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.h"
#include "DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.h"
#include "DGtal/geometry/tools/determinant/Filtered2x2DetComputer.h"
Go to the source code of this file.
Functions | |
template<typename DetComputer > | |
bool | simpleTest2x2DetComputer (DetComputer aComputer) |
template<typename I1 , typename I2 > | |
bool | hasTheSameSign (I1 x1, I2 x2) |
DGtal::int32_t | randomBelow2exp15 () |
DGtal::int32_t | adHocRandom () |
template<typename DetComputer > | |
bool | randomTest2x2DetComputer (DetComputer aComputer) |
int | main (int argc, char **argv) |
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 classes that implements a model of C2x2DetComputer.
This file is part of the DGtal library.
Definition in file test2x2DetComputers.cpp.
DGtal::int32_t adHocRandom | ( | ) |
Definition at line 188 of file test2x2DetComputers.cpp.
References randomBelow2exp15().
Referenced by randomTest2x2DetComputer().
bool hasTheSameSign | ( | I1 | x1, |
I2 | x2 | ||
) |
Function that retuns 'true' if x1 and x2 have the same sign:
x1 | a first integer |
x2 | a second integer |
I1 | type of the first integer |
I2 | type of the second integer |
Definition at line 159 of file test2x2DetComputers.cpp.
Referenced by randomTest2x2DetComputer().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 245 of file test2x2DetComputers.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), randomTest2x2DetComputer(), simpleTest2x2DetComputer(), and DGtal::trace.
DGtal::int32_t randomBelow2exp15 | ( | ) |
Definition at line 184 of file test2x2DetComputers.cpp.
Referenced by adHocRandom().
bool randomTest2x2DetComputer | ( | DetComputer | aComputer | ) |
Function that compares the result returned by aComputer against the result returned by Simple2x2DetComputer using integers on 32 and 64 bits for various matrices whose entries are random integers whose absolute value is less than 2^32.
aComputer | a determinant computer to test |
DetComputer | a model of CIncremental2x2DetComputer |
Definition at line 205 of file test2x2DetComputers.cpp.
References adHocRandom(), DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), hasTheSameSign(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool simpleTest2x2DetComputer | ( | DetComputer | aComputer | ) |
Function that compares the result returned by aComputer with a ground truth in each quadrant.
aComputer | any determinant computer |
DetComputer | a model of CIncremental2x2DetComputer |
Definition at line 56 of file test2x2DetComputers.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().