|
DGtal 2.0.0
|
#include <iostream>#include <sstream>#include "DGtal/base/Common.h"#include "DGtal/geometry/curves/ArithmeticalDSL.h"#include "DGtal/geometry/curves/ArithmeticalDSSConvexHull.h"#include "DGtal/geometry/curves/ArithmeticalDSS.h"#include "DGtal/kernel/SpaceND.h"#include "DGtal/kernel/NumberTraits.h"#include "DGtal/arithmetic/LatticePolytope2D.h"Go to the source code of this file.
Functions | |
| template<typename DSL> | |
| bool | basicTest (const DSL &aDSL) |
| template<typename DSL> | |
| bool | basicTest (typename DSL::Coordinate a, typename DSL::Coordinate b) |
| bool | testWithoutLengthConstraint () |
| template<typename DSL> | |
| bool | comparisonLeftHull (typename DSL::Coordinate a, typename DSL::Coordinate b) |
| bool | testWithLengthConstraint () |
| template<typename DSL> | |
| DSL | smartCHSubsegment (const DSL &aDSL, typename DSL::Position x, typename DSL::Position y) |
| template<typename DSL> | |
| DSL | trivialSubsegment (const DSL &aDSL, typename DSL::Position x, typename DSL::Position y) |
| template<typename DSL> | |
| bool | comparisonSubsegment (const DSL &aDSL, typename DSL::Position x, typename DSL::Position y) |
| template<typename DSL> | |
| bool | comparisonSubsegment (typename DSL::Coordinate a, typename DSL::Coordinate b) |
| bool | testSubsegment () |
| template<typename DSL> | |
| bool | basicTest2 (const DSL &aDSL) |
| template<typename DSL> | |
| bool | basicTest2 (typename DSL::Coordinate a, typename DSL::Coordinate b) |
| bool | testWithoutLengthConstraint2 () |
| template<typename DSS> | |
| DSS::DSL | reversedSmartCHSubsegment (const DSS &aDSS, typename DSS::Position aBound) |
| template<typename DSS> | |
| bool | comparisonSubsegment2 (const DSS &aDSS, typename DSS::Position aBound) |
| template<typename DSL> | |
| bool | comparisonSubsegment2 (typename DSL::Coordinate a, typename DSL::Coordinate b) |
| bool | testSubsegment2 () |
| 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 ArithmeticalDSSConvexHull.
This file is part of the DGtal library.
Definition in file testArithmeticalDSSConvexHull.cpp.
| bool basicTest | ( | const DSL & | aDSL | ) |
Applies smartCH on a segment starting from (0,0) and contained in a given arithmetical DSL
| aDSL | any DSL |
| DSL | an arithmeticalDSS type (either naive or standard) |
Definition at line 62 of file testArithmeticalDSSConvexHull.cpp.
References DGtal::functions::smartCH(), and DGtal::trace.
Referenced by basicTest(), main(), and testWithoutLengthConstraint().
| bool basicTest | ( | typename DSL::Coordinate | a, |
| typename DSL::Coordinate | b ) |
Applies smartCH on a segment starting from (0,0) and contained in a naive DSL of slope a, b with various intercepts
| a | numerator of the slope |
| b | denominator of the slope |
| DSL | an arithmeticalDSL type (either naive or standard) |
Definition at line 118 of file testArithmeticalDSSConvexHull.cpp.
References basicTest().
| bool basicTest2 | ( | const DSL & | aDSL | ) |
Applies reversedSmartCH on a segment starting from (0,0) and contained in a given arithmetical DSL
| aDSL | any DSL |
| DSL | an arithmeticalDSL type (either naive or standard) |
Definition at line 495 of file testArithmeticalDSSConvexHull.cpp.
References DGtal::functions::reversedSmartCH(), and DGtal::trace.
Referenced by basicTest2(), and testWithoutLengthConstraint2().
| bool basicTest2 | ( | typename DSL::Coordinate | a, |
| typename DSL::Coordinate | b ) |
Applies reversedSmartCH on a segment starting from (0,0) and contained in a naive DSL of slope a, b with various intercepts
| a | numerator of the slope |
| b | denominator of the slope |
| DSL | an arithmeticalDSL type (either naive or standard) |
Definition at line 550 of file testArithmeticalDSSConvexHull.cpp.
References basicTest2().
| bool comparisonLeftHull | ( | typename DSL::Coordinate | a, |
| typename DSL::Coordinate | b ) |
Compares smartCH to the algorithm of Charrier and Buzer, implemented in LatticePolytope2D.
| a | (positive) numerator of the slope |
| b | (positive) denominator of the slope |
| DSL | an arithmeticalDSL type (either naive or standard) |
Definition at line 195 of file testArithmeticalDSSConvexHull.cpp.
References DGtal::functions::smartCH(), and DGtal::trace.
Referenced by testWithLengthConstraint().
| bool comparisonSubsegment | ( | const DSL & | aDSL, |
| typename DSL::Position | x, | ||
| typename DSL::Position | y ) |
Compares smartCH to the classical incremental recognition algorithm for one subgement of a given DSL
| aDSL | DSL containing the subsegment |
| x | minimal position |
| y | maximal position |
| DSL | an arithmetical DSL (either naive or standard) |
Definition at line 396 of file testArithmeticalDSSConvexHull.cpp.
References smartCHSubsegment(), and trivialSubsegment().
Referenced by comparisonSubsegment(), and main().
| bool comparisonSubsegment | ( | typename DSL::Coordinate | a, |
| typename DSL::Coordinate | b ) |
Compares smartCH 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 415 of file testArithmeticalDSSConvexHull.cpp.
References comparisonSubsegment(), and DGtal::trace.
| bool comparisonSubsegment2 | ( | const DSS & | aDSS, |
| typename DSS::Position | aBound ) |
Compares reversedSmartCH to the classical incremental recognition algorithm for one subgement of a greater DSS
| aDSS | DSS containing the subsegment |
| aBound | maximal position |
| DSS | an arithmetical DSS (either naive or standard) |
Definition at line 657 of file testArithmeticalDSSConvexHull.cpp.
References reversedSmartCHSubsegment(), and trivialSubsegment().
Referenced by comparisonSubsegment2(), and testSubsegment2().
| bool comparisonSubsegment2 | ( | typename DSL::Coordinate | a, |
| typename DSL::Coordinate | b ) |
Compares 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 678 of file testArithmeticalDSSConvexHull.cpp.
References comparisonSubsegment2(), and DGtal::trace.
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 763 of file testArithmeticalDSSConvexHull.cpp.
References basicTest(), comparisonSubsegment(), testSubsegment(), testSubsegment2(), testWithLengthConstraint(), testWithoutLengthConstraint(), testWithoutLengthConstraint2(), and DGtal::trace.
| DSS::DSL reversedSmartCHSubsegment | ( | const DSS & | aDSS, |
| typename DSS::Position | aBound ) |
Computes the minimal parameters of a subsegment with reversedSmartCH
| aDSS | DSS containing the subsegment |
| aBound | maximal position |
| DSS | an arithmetical DSS (either naive or standard) |
Definition at line 622 of file testArithmeticalDSSConvexHull.cpp.
References DGtal::functions::reversedSmartCH().
Referenced by comparisonSubsegment2().
| DSL smartCHSubsegment | ( | const DSL & | aDSL, |
| typename DSL::Position | x, | ||
| typename DSL::Position | y ) |
Computes the minimal parameters of a subsegment with smartCH
| aDSL | DSL containing the subsegment |
| x | minimal position |
| y | maximal position |
| DSL | an arithmetical DSL (either naive or standard) |
Definition at line 317 of file testArithmeticalDSSConvexHull.cpp.
References DGtal::functions::smartCH().
Referenced by comparisonSubsegment().
| bool testSubsegment | ( | ) |
Testing function.
Definition at line 447 of file testArithmeticalDSSConvexHull.cpp.
References comparisonSubsegment(), and DGtal::trace.
Referenced by main().
| bool testSubsegment2 | ( | ) |
Testing function.
Definition at line 723 of file testArithmeticalDSSConvexHull.cpp.
References comparisonSubsegment2(), and DGtal::trace.
Referenced by main().
| bool testWithLengthConstraint | ( | ) |
Testing function.
Definition at line 285 of file testArithmeticalDSSConvexHull.cpp.
References comparisonLeftHull(), and DGtal::trace.
Referenced by main().
| bool testWithoutLengthConstraint | ( | ) |
Testing function.
Definition at line 138 of file testArithmeticalDSSConvexHull.cpp.
References basicTest(), and DGtal::trace.
Referenced by main().
| bool testWithoutLengthConstraint2 | ( | ) |
Testing function.
Definition at line 570 of file testArithmeticalDSSConvexHull.cpp.
References basicTest2(), and DGtal::trace.
Referenced by main().
| DSL trivialSubsegment | ( | const DSL & | aDSL, |
| typename DSL::Position | x, | ||
| typename DSL::Position | y ) |
Computes the minimal parameters of a subsegment with the classical recognition algorithm, implemented in ArithmeticalDSS.
| aDSL | DSL containing the subsegment |
| x | minimal position |
| y | maximal position |
| DSL | an arithmetical DSL (either naive or standard) |
Definition at line 355 of file testArithmeticalDSSConvexHull.cpp.
Referenced by comparisonSubsegment(), and comparisonSubsegment2().