|
DGtal 2.2.0
|
#include <iostream>#include <vector>#include <algorithm>#include <random>#include "DGtal/base/Common.h"#include "DGtal/kernel/SpaceND.h"#include "DGtal/geometry/tools/AffineGeometry.h"#include "DGtal/geometry/tools/AffineBasis.h"#include "DGtalCatch.h"Go to the source code of this file.
Functions | |
| std::mt19937 | g (rd()) |
| template<typename Point> | |
| std::vector< Point > | makeRandomVectors (int nb, int amplitude) |
| template<typename Point> | |
| std::vector< Point > | makeRandomLatticePointsFromDirVectors (int nb, const vector< Point > &V) |
| template<typename TPoint> | |
| bool | sameDirection (const TPoint &a, const TPoint &b) |
| template<typename TPoint> | |
| std::pair< TPoint, TPoint > | boundingBox (const std::vector< TPoint > &v) |
| template<typename T, typename C> | |
| T | determinant (const PointVector< 2, T, C > &u, const PointVector< 2, T, C > &v) |
| template<typename T, typename C> | |
| T | determinant (const PointVector< 3, T, C > &u, const PointVector< 3, T, C > &v, const PointVector< 3, T, C > &w) |
| SCENARIO ("AffineBasis< Point2i > unit tests", "[affine_basis][2i]") | |
| SCENARIO ("AffineBasis< Z3 > LLL tests", "[affine_basis][3d][LLL]") | |
| SCENARIO ("AffineBasis< Point4i > unit tests", "[affine_basis][4i]") | |
| SCENARIO ("AffineBasis< Point4i > projection tests", "[affine_basis][4i][4d]") | |
| SCENARIO ("AffineBasis< Point5i > unit tests", "[affine_basis][5i]") | |
| SCENARIO ("AffineBasis< Z10 > LLL tests", "[affine_basis][10d][LLL]") | |
| SCENARIO ("AffineBasis< Point5i > projection tests", "[affine_basis][5i][5d]") | |
Variables | |
| std::random_device | rd |
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 AffineBasis.
This file is part of the DGtal library.
Definition in file testAffineBasis.cpp.
| std::pair< TPoint, TPoint > boundingBox | ( | const std::vector< TPoint > & | v | ) |
Definition at line 98 of file testAffineBasis.cpp.
References boundingBox().
Referenced by boundingBox(), SCENARIO(), and SCENARIO().
| T determinant | ( | const PointVector< 2, T, C > & | u, |
| const PointVector< 2, T, C > & | v ) |
Definition at line 115 of file testAffineBasis.cpp.
References determinant().
Referenced by determinant(), determinant(), and SCENARIO().
| T determinant | ( | const PointVector< 3, T, C > & | u, |
| const PointVector< 3, T, C > & | v, | ||
| const PointVector< 3, T, C > & | w ) |
Definition at line 123 of file testAffineBasis.cpp.
References determinant().
| std::mt19937 g | ( | rd() | ) |
Referenced by checkChordGenericStandardPlaneComputer(), checkCOBAGenericStandardPlaneComputer(), computeLaplace(), DGtal::DigitalSurfaceConvolver< ShapeSpelFunctor, KernelSpelFunctor, KSpace, DigitalShapeKernel >::DigitalSurfaceConvolver(), DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 2 >::DigitalSurfaceConvolver(), DGtal::DigitalSurfaceConvolver< TFunctor, TKernelFunctor, TKSpace, TDigitalKernel, 3 >::DigitalSurfaceConvolver(), DGtal::euclidDiv(), DGtal::euclidDiv(), DGtal::MPolynomial< n - 1, Ring, Alloc >::euclidDiv, exhaustiveTestLatticePolytope2D(), g(), DGtal::gcd(), DGtal::gcd(), DGtal::IntegerComputer< Integer >::getGcd(), DGtal::detail::AffineGeometryScalarOperations< Scalar >::getMultipliers(), DGtal::detail::AffineGeometryScalarOperations< Scalar >::lcmPositive(), main(), main(), main(), DGtal::detail::GenericLatticeConvexHullComputers< dim, TCoordinateInteger, TInternalInteger, K-1 >::makePolytope(), makeRandomLatticePointsFromDirVectors(), makeRandomLatticePointsFromDirVectors(), makeRandomLatticePointsFromDirVectors(), makeRandomLatticePointsFromDirVectors(), makeRandomRealPointsFromDirVectors(), makeRandomVectors(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::median(), DGtal::mmonomial(), DGtal::mmonomial(), DGtal::detail::AffineGeometryPointOperations< dimension, Scalar, Container >::normalizeVector(), DGtal::SimpleDistanceColorMap< TValue >::operator()(), perturb(), SCENARIO(), SCENARIO(), SCENARIO(), TEST_CASE(), TEST_CASE_METHOD(), testCFrac(), testColor(), testConvexHull2D(), testExtendedEuclid(), testGCD(), testInitFraction(), testMPolynomial(), testOrthogonalLattice(), testPatterns(), testReducedFraction(), testSimplestFractionInBetween(), and testSort().
| std::vector< Point > makeRandomLatticePointsFromDirVectors | ( | int | nb, |
| const vector< Point > & | V ) |
Definition at line 66 of file testAffineBasis.cpp.
References g(), and makeRandomLatticePointsFromDirVectors().
Referenced by checkAffineGeometry(), main(), makeRandomLatticePointsFromDirVectors(), makeRandomLatticePointsFromDirVectors(), makeRandomLatticePointsFromDirVectors(), makeRandomLatticePointsFromDirVectors(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), and SCENARIO().
Definition at line 50 of file testAffineBasis.cpp.
References g(), and makeRandomVectors().
Referenced by makeRandomVectors(), SCENARIO(), SCENARIO(), and SCENARIO().
| bool sameDirection | ( | const TPoint & | a, |
| const TPoint & | b ) |
Definition at line 91 of file testAffineBasis.cpp.
References sameDirection().
Referenced by sameDirection(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Point2i > unit tests" | , |
| "" | [affine_basis][2i] ) |
Definition at line 137 of file testAffineBasis.cpp.
References B< TC >::B(), CAPTURE(), GIVEN(), REQUIRE(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Point4i > projection tests" | , |
| "" | [affine_basis][4i][4d] ) |
Definition at line 259 of file testAffineBasis.cpp.
References B< TC >::B(), boundingBox(), CAPTURE(), GIVEN(), makeRandomLatticePointsFromDirVectors(), REQUIRE(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Point4i > unit tests" | , |
| "" | [affine_basis][4i] ) |
Definition at line 191 of file testAffineBasis.cpp.
References B< TC >::B(), CAPTURE(), GIVEN(), makeRandomLatticePointsFromDirVectors(), makeRandomVectors(), REQUIRE(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Point5i > projection tests" | , |
| "" | [affine_basis][5i][5d] ) |
Definition at line 457 of file testAffineBasis.cpp.
References B< TC >::B(), boundingBox(), CAPTURE(), determinant(), GIVEN(), DGtal::L, makeRandomLatticePointsFromDirVectors(), REQUIRE(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Point5i > unit tests" | , |
| "" | [affine_basis][5i] ) |
Definition at line 332 of file testAffineBasis.cpp.
References B< TC >::B(), DGtal::functions::computeAffineDimension(), makeRandomVectors(), REQUIRE(), sameDirection(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Z10 > LLL tests" | , |
| "" | [affine_basis][10d][LLL] ) |
Definition at line 401 of file testAffineBasis.cpp.
References CAPTURE(), DGtal::L, REQUIRE(), and SCENARIO().
| SCENARIO | ( | "AffineBasis< Z3 > LLL tests" | , |
| "" | [affine_basis][3d][LLL] ) |
Definition at line 163 of file testAffineBasis.cpp.
References CAPTURE(), DGtal::functions::computeIndependentVector(), DGtal::L, REQUIRE(), and SCENARIO().
| std::random_device rd |
Definition at line 45 of file testAffineBasis.cpp.
Referenced by checkChordGenericStandardPlaneComputer(), checkCOBAGenericStandardPlaneComputer(), g(), TEST_CASE(), and TEST_CASE().