|
DGtal 2.1.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()) |
| std::uniform_real_distribution< double > | uniform (-1.0, 1.0) |
| template<typename RealPoint > | |
| void | perturbate (RealPoint &x, double perturbation) |
| template<typename RealPoint > | |
| void | perturbate (std::vector< RealPoint > &X, double perturbation) |
| 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 Point > | |
| std::vector< Point > | makeRandomRealPointsFromDirVectors (int nb, const vector< Point > &V) |
| SCENARIO ("AffineGeometry< Point2i > unit tests", "[affine_subset][2i]") | |
| SCENARIO ("AffineGeometry< Point2d > unit tests", "[affine_subset][2d]") | |
| SCENARIO ("AffineGeometry< Point2i > orthogonal tests", "[orthogonal_vector][2i]") | |
| SCENARIO ("AffineGeometry< Point3i > unit tests", "[affine_subset][3i]") | |
| SCENARIO ("AffineGeometry< Point3i > orthogonal tests", "[orthogonal_vector][3i]") | |
| SCENARIO ("AffineGeometry< Point4i > unit tests", "[affine_subset][4i]") | |
| SCENARIO ("AffineGeometry< Point4d > unit tests", "[affine_subset][4d]") | |
| SCENARIO ("AffineGeometry< Point4i > orthogonal tests", "[orthogonal_vector][4i]") | |
| SCENARIO ("AffineGeometry< Z3 > bug", "[affine_geom][3d]") | |
| SCENARIO ("AffineGeometry< Z3 > orthogonality", "[affine_geom][3d]") | |
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 AffineGeometry.
This file is part of the DGtal library.
Definition in file testAffineGeometry.cpp.
| std::mt19937 g | ( | rd() | ) |
| std::vector< Point > makeRandomLatticePointsFromDirVectors | ( | int | nb, |
| const vector< Point > & | V | ||
| ) |
Definition at line 79 of file testAffineGeometry.cpp.
References g().
Referenced by SCENARIO(), and SCENARIO().
| std::vector< Point > makeRandomRealPointsFromDirVectors | ( | int | nb, |
| const vector< Point > & | V | ||
| ) |
Definition at line 105 of file testAffineGeometry.cpp.
References g().
Referenced by SCENARIO().
Definition at line 63 of file testAffineGeometry.cpp.
References g().
Definition at line 50 of file testAffineGeometry.cpp.
References g(), and uniform().
Referenced by perturbate(), and SCENARIO().
| SCENARIO | ( | "AffineGeometry< Point2d > unit tests" | , |
| "" | [affine_subset][2d] | ||
| ) |
Definition at line 159 of file testAffineGeometry.cpp.
References CAPTURE(), GIVEN(), perturbate(), and REQUIRE().
| SCENARIO | ( | "AffineGeometry< Point2i > orthogonal tests" | , |
| "" | [orthogonal_vector][2i] | ||
| ) |
Definition at line 216 of file testAffineGeometry.cpp.
| SCENARIO | ( | "AffineGeometry< Point2i > unit tests" | , |
| "" | [affine_subset][2i] | ||
| ) |
Definition at line 133 of file testAffineGeometry.cpp.
| SCENARIO | ( | "AffineGeometry< Point3i > orthogonal tests" | , |
| "" | [orthogonal_vector][3i] | ||
| ) |
Definition at line 297 of file testAffineGeometry.cpp.
| SCENARIO | ( | "AffineGeometry< Point3i > unit tests" | , |
| "" | [affine_subset][3i] | ||
| ) |
Definition at line 240 of file testAffineGeometry.cpp.
References CAPTURE(), GIVEN(), makeRandomLatticePointsFromDirVectors(), and REQUIRE().
| SCENARIO | ( | "AffineGeometry< Point4d > unit tests" | , |
| "" | [affine_subset][4d] | ||
| ) |
Definition at line 417 of file testAffineGeometry.cpp.
References CAPTURE(), DGtal::functions::computeAffineSubset(), DGtal::functions::getAffineBasis(), GIVEN(), makeRandomRealPointsFromDirVectors(), and REQUIRE().
| SCENARIO | ( | "AffineGeometry< Point4i > orthogonal tests" | , |
| "" | [orthogonal_vector][4i] | ||
| ) |
Definition at line 485 of file testAffineGeometry.cpp.
| SCENARIO | ( | "AffineGeometry< Point4i > unit tests" | , |
| "" | [affine_subset][4i] | ||
| ) |
Definition at line 350 of file testAffineGeometry.cpp.
References CAPTURE(), DGtal::functions::computeAffineSubset(), DGtal::functions::getAffineBasis(), GIVEN(), makeRandomLatticePointsFromDirVectors(), and REQUIRE().
| SCENARIO | ( | "AffineGeometry< Z3 > bug" | , |
| "" | [affine_geom][3d] | ||
| ) |
Definition at line 527 of file testAffineGeometry.cpp.
References CAPTURE(), DGtal::functions::computeOrthogonalVectorToBasis(), DGtal::functions::computeSimplifiedVector(), DGtal::crossProduct(), DGtal::functions::getAffineBasis(), and REQUIRE().
| SCENARIO | ( | "AffineGeometry< Z3 > orthogonality" | , |
| "" | [affine_geom][3d] | ||
| ) |
Definition at line 551 of file testAffineGeometry.cpp.
References DGtal::functions::computeSimplifiedVector(), DGtal::crossProduct(), DGtal::functions::getOrthogonalVector(), and REQUIRE().
| std::uniform_real_distribution< double > uniform | ( | -1. | 0, |
| 1. | 0 | ||
| ) |
Referenced by perturbate().
| std::random_device rd |
Definition at line 45 of file testAffineGeometry.cpp.