|
DGtal 2.0.0
|
#include <iostream>#include "DGtal/base/Common.h"#include "DGtal/kernel/CPointPredicate.h"#include "DGtal/base/CConstBidirectionalRange.h"#include "DGtal/geometry/curves/ArithmeticalDSS.h"#include "DGtal/geometry/curves/ArithmeticalDSSFactory.h"#include "DGtal/geometry/curves/StabbingLineComputer.h"Go to the source code of this file.
Functions | |
| template<typename DSS> | |
| bool | mainTest () |
| template<typename DSS> | |
| bool | rangeTest (const DSS &dss) |
| template<typename DSS> | |
| void | extensionTest (const DSS &dss, typename DSS::Point newPointToFront, typename DSS::Point newPointToBack, unsigned int &nbok, unsigned int &nb, const unsigned short int &code=0) |
| template<typename DSS> | |
| void | retractionTest (const DSS &dss, unsigned int &nbok, unsigned int &nb, bool res=true) |
| template<typename DSS> | |
| bool | updateTest () |
| template<typename DSS> | |
| bool | compatibleStepsTest (const DSS &dss) |
| template<typename DSS> | |
| bool | constructorsTest () |
| template<typename DSS> | |
| bool | comparisonSubsegment (const DSS &aDSS, typename DSS::Position x, typename DSS::Position y) |
| template<typename DSL> | |
| bool | comparisonSubsegment (typename DSL::Coordinate a, typename DSL::Coordinate b) |
| bool | unionTest () |
| int | max (int a, int b) |
| template<typename TCoordinate, typename TInteger, unsigned short adjacency> | |
| bool | unionComparisonTest (int modb, int modx, unsigned int nbtries) |
| bool | createDSSTest () |
| bool | testPatchCreatePattern () |
| 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 class ArithmeticalDSS.
This file is part of the DGtal library.
Definition in file testArithmeticalDSS.cpp.
| bool comparisonSubsegment | ( | const DSS & | aDSS, |
| typename DSS::Position | x, | ||
| typename DSS::Position | y ) |
Compares smartCH and reversedSmartCH to the classical incremental recognition algorithm for one subgement of a greater DSS
| aDSS | DSS containing the subsegment |
| x | minimal position |
| y | maximal position |
| DSS | an arithmetical DSS (either naive or standard) |
Definition at line 812 of file testArithmeticalDSS.cpp.
Referenced by comparisonSubsegment(), main(), and testSubsegment().
| bool comparisonSubsegment | ( | typename DSL::Coordinate | a, |
| typename DSL::Coordinate | b ) |
Compares smartCH and reversedSmartCH to the classical incremental recognition algorithm for various intercepts and lengths
| a | numerator of the slope |
| b | denominator of the slope |
| DSL | an arithmetical DSL (either naive or standard) |
Definition at line 833 of file testArithmeticalDSS.cpp.
References comparisonSubsegment(), and DGtal::trace.
| bool compatibleStepsTest | ( | const DSS & | dss | ) |
Test of the directional position and the checks of the steps
| dss | an instance of DSS |
| DSS | a model of arithmetical DSS, either naive or standard |
Definition at line 659 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by main().
| bool constructorsTest | ( | ) |
Test of the main constructors
| DSS | a model of arithmetical DSS, either naive or standard |
Definition at line 740 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by main().
| bool createDSSTest | ( | ) |
Definition at line 1302 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by main().
| void extensionTest | ( | const DSS & | dss, |
| typename DSS::Point | newPointToFront, | ||
| typename DSS::Point | newPointToBack, | ||
| unsigned int & | nbok, | ||
| unsigned int & | nb, | ||
| const unsigned short int & | code = 0 ) |
Unit test of the extension service
| dss | an instance of DSS |
| DSS | a model of arithmetical DSS, either naive or standard |
| newPointToFront | point to add to the dss front |
| newPointToBack | point to add to the dss back |
| nbok | (returned) number of passed tests |
| nb | (returned) number of tests |
| code | index of the tested configuration |
Definition at line 289 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by updateTest().
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 1359 of file testArithmeticalDSS.cpp.
References comparisonSubsegment(), compatibleStepsTest(), constructorsTest(), createDSSTest(), rangeTest(), testPatchCreatePattern(), DGtal::trace, unionComparisonTest(), unionTest(), and updateTest().
| bool mainTest | ( | ) |
Test of the main operators
| DSS | a model of arithmetical DSS, either naive or standard |
Definition at line 52 of file testArithmeticalDSS.cpp.
References DGtal::trace.
| int max | ( | int | a, |
| int | b ) |
Definition at line 1108 of file testArithmeticalDSS.cpp.
Referenced by DGtal::BoundedLatticePolytope< Space >::countUpTo(), DGtal::BoundedRationalPolytope< Space >::countUpTo(), DGtal::BoundedLatticePolytope< Space >::countUpToByScanning(), DGtal::ChordGenericNaivePlaneComputer< TSpace, TInputPoint, TInternalScalar >::getBounds(), DGtal::ChordGenericStandardPlaneComputer< TSpace, TInputPoint, TInternalScalar >::getBounds(), DGtal::ChordNaivePlaneComputer< Space, InputPoint, InternalScalar >::getBounds(), DGtal::COBAGenericNaivePlaneComputer< TSpace, TInternalInteger >::getBounds(), DGtal::COBAGenericStandardPlaneComputer< TSpace, TInternalInteger >::getBounds(), DGtal::COBANaivePlaneComputer< Space, InternalInteger >::getBounds(), DGtal::Shortcuts< Z3i::KSpace >::getColorMap(), DGtal::Shortcuts< Z3i::KSpace >::getZeroTickedColorMap(), incTest(), main(), maxDiameter(), DGtal::RegularBinner< Quantity >::RegularBinner(), DGtal::TangencyComputer< TKSpace >::ShortestPaths::ShortestPaths(), and testSegmentationLarger().
| bool rangeTest | ( | const DSS & | dss | ) |
Test of the range services
| dss | an instance of DSS |
| DSS | a model of arithmetical DSS, either naive or standard |
Definition at line 204 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by main().
| void retractionTest | ( | const DSS & | dss, |
| unsigned int & | nbok, | ||
| unsigned int & | nb, | ||
| bool | res = true ) |
Unit test of the retraction service
| dss | an instance of DSS |
| DSS | a model of arithmetical DSS, either naive or standard |
| nbok | (returned) number of passed tests |
| nb | (returned) number of tests |
| res | result of the retraction: 'true' if done, 'false' otherwise |
Definition at line 360 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by updateTest().
| bool testPatchCreatePattern | ( | ) |
Definition at line 1333 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by main().
| bool unionComparisonTest | ( | int | modb, |
| int | modx, | ||
| unsigned int | nbtries ) |
Definition at line 1119 of file testArithmeticalDSS.cpp.
References DGtal::IntegerComputer< TInteger >::ceilDiv(), DGtal::IntegerComputer< TInteger >::dotProduct(), DGtal::IntegerComputer< TInteger >::floorDiv(), DGtal::IntegerComputer< TInteger >::gcd(), DGtal::ArithmeticalDSLKernel< TCoordinate, adjacency >::norm(), and DGtal::trace.
Referenced by main().
| bool unionTest | ( | ) |
Definition at line 880 of file testArithmeticalDSS.cpp.
References DGtal::trace.
Referenced by main().
| bool updateTest | ( | ) |
Test of the update services
| DSS | a model of arithmetical DSS, either naive or standard |
Definition at line 423 of file testArithmeticalDSS.cpp.
References extensionTest(), retractionTest(), and DGtal::trace.
Referenced by main().