DGtal 1.3.0
|
#include <iostream>
#include <random>
#include "DGtalCatch.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/shapes/parametric/Lemniscate2D.h"
Go to the source code of this file.
Typedefs | |
typedef Z2i::Space | Space |
typedef Z2i::Point | Point |
typedef Z2i::RealPoint | RealPoint |
typedef Lemniscate2D< Space > | Shape |
Functions | |
double | notNullValue (std::uniform_real_distribution< double > &unif, std::default_random_engine &re) |
RealPoint | notNullRealPoint (std::uniform_real_distribution< double > &unif, std::default_random_engine &re) |
TEST_CASE ("Lemniscate2D") | |
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 the methods of the Lemniscate2D shape. In particular, test the x(), xp() and xpp() methods for cases leadind to a division by 0.
This file is part of the DGtal library.
Definition in file testLemniscate2D.cpp.
typedef Z2i::Point Point |
Definition at line 45 of file testLemniscate2D.cpp.
typedef Z2i::RealPoint RealPoint |
Definition at line 46 of file testLemniscate2D.cpp.
typedef Lemniscate2D<Space> Shape |
Definition at line 48 of file testLemniscate2D.cpp.
typedef Z2i::Space Space |
Definition at line 44 of file testLemniscate2D.cpp.
RealPoint notNullRealPoint | ( | std::uniform_real_distribution< double > & | unif, |
std::default_random_engine & | re | ||
) |
Definition at line 62 of file testLemniscate2D.cpp.
References notNullValue(), re, and unif().
double notNullValue | ( | std::uniform_real_distribution< double > & | unif, |
std::default_random_engine & | re | ||
) |
Definition at line 50 of file testLemniscate2D.cpp.
Referenced by notNullRealPoint().
TEST_CASE | ( | "Lemniscate2D" | ) |
Definition at line 69 of file testLemniscate2D.cpp.
References DGtal::Astroid2D< TSpace >::center(), DGtal::Astroid2D< TSpace >::getLowerBound(), DGtal::Astroid2D< TSpace >::getUpperBound(), re, REQUIRE(), SECTION(), unif(), DGtal::Astroid2D< TSpace >::x(), and DGtal::Astroid2D< TSpace >::xp().