DGtal 1.3.0
|
#include <cstdio>
#include <cmath>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <numeric>
#include <iterator>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/kernel/PointVector.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/base/CConstBidirectionalRange.h"
#include "DGtalCatch.h"
Go to the source code of this file.
Functions | |
TEST_CASE ("Simple HyperRectDomain", "[domain][4D]") | |
template<typename Iterator , typename Point , typename Domain , typename Dimension > | |
void | testIteratorHelperImpl (Iterator &it, Iterator const &it_begin, Iterator const &it_end, typename std::iterator_traits< Iterator >::difference_type &cnt_begin, Point &pt, Domain const &domain, std::vector< Dimension > const &dimensions, std::size_t id, bool forward) |
Checking iterator given then span domain and dimensions order. More... | |
template<typename Iterator , typename Point , typename Domain , typename Dimension > | |
void | testIteratorHelper (Iterator const &it_begin, Iterator const &it_end, Point pt, Domain const &domain, std::vector< Dimension > const &dimensions, bool forward=true) |
template<typename Iterator , typename Point , typename Domain > | |
void | testIteratorHelper (Iterator const &it_begin, Iterator const &it_end, Point pt, Domain const &domain, bool forward=true) |
template<typename Point > | |
void | testIterator (Point const &a, Point const &b, Point const &c) |
TEST_CASE ("Iterator 2D", "[iterator][2D]") | |
TEST_CASE ("Iterator 4D", "[iterator][4D]") | |
TEST_CASE ("Iterator 4D GMP", "[iterator][4D][GMP]") | |
TEST_CASE ("STL compatiblity", "[iterator][4D][STL]") | |
TEST_CASE ("Empty domain", "[domain][3D][empty]") | |
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/.
This file is part of the DGtal library
Definition in file testHyperRectDomain.cpp.
TEST_CASE | ( | "Empty domain" | , |
"" | [domain][3D][empty] | ||
) |
Definition at line 372 of file testHyperRectDomain.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), domain, DGtal::HyperRectDomain< TSpace >::end(), DGtal::HyperRectDomain< TSpace >::isEmpty(), DGtal::HyperRectDomain< TSpace >::lowerBound(), DGtal::HyperRectDomain< TSpace >::rbegin(), DGtal::HyperRectDomain< TSpace >::rend(), REQUIRE(), DGtal::HyperRectDomain< TSpace >::size(), and DGtal::HyperRectDomain< TSpace >::subRange().
TEST_CASE | ( | "Iterator 2D" | , |
"" | [iterator][2D] | ||
) |
Definition at line 306 of file testHyperRectDomain.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), testIterator(), and DGtal::trace.
TEST_CASE | ( | "Iterator 4D GMP" | , |
"" | [iterator][4D][GMP] | ||
) |
Definition at line 335 of file testHyperRectDomain.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), testIterator(), and DGtal::trace.
TEST_CASE | ( | "Iterator 4D" | , |
"" | [iterator][4D] | ||
) |
Definition at line 320 of file testHyperRectDomain.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), testIterator(), and DGtal::trace.
TEST_CASE | ( | "Simple HyperRectDomain" | , |
"" | [domain][4D] | ||
) |
Definition at line 56 of file testHyperRectDomain.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::Trace::beginBlock(), DGtal::HyperRectDomain< TSpace >::end(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::HyperRectDomain< TSpace >::isEmpty(), DGtal::HyperRectDomain< TSpace >::isValid(), DGtal::HyperRectDomain< TSpace >::lowerBound(), DGtal::HyperRectDomain< TSpace >::rbegin(), DGtal::HyperRectDomain< TSpace >::rend(), REQUIRE(), DGtal::HyperRectDomain< TSpace >::size(), DGtal::trace, and DGtal::HyperRectDomain< TSpace >::upperBound().
TEST_CASE | ( | "STL compatiblity" | , |
"" | [iterator][4D][STL] | ||
) |
Definition at line 350 of file testHyperRectDomain.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::HyperRectDomain< TSpace >::end(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Definition at line 251 of file testHyperRectDomain.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), domain, DGtal::Trace::emphase(), DGtal::HyperRectDomain< TSpace >::end(), DGtal::Trace::info(), DGtal::HyperRectDomain< TSpace >::lowerBound(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::partialCopy(), DGtal::HyperRectDomain< TSpace >::rbegin(), DGtal::HyperRectDomain< TSpace >::rend(), DGtal::HyperRectDomain< TSpace >::subRange(), testIteratorHelper(), DGtal::trace, and DGtal::HyperRectDomain< TSpace >::upperBound().
Referenced by TEST_CASE().
void testIteratorHelper | ( | Iterator const & | it_begin, |
Iterator const & | it_end, | ||
Point | pt, | ||
Domain const & | domain, | ||
bool | forward = true |
||
) |
Definition at line 237 of file testHyperRectDomain.cpp.
References domain, and testIteratorHelper().
void testIteratorHelper | ( | Iterator const & | it_begin, |
Iterator const & | it_end, | ||
Point | pt, | ||
Domain const & | domain, | ||
std::vector< Dimension > const & | dimensions, | ||
bool | forward = true |
||
) |
Definition at line 217 of file testHyperRectDomain.cpp.
References domain, REQUIRE(), DGtal::HyperRectDomain< TSpace >::size(), and testIteratorHelperImpl().
Referenced by testIterator(), and testIteratorHelper().
void testIteratorHelperImpl | ( | Iterator & | it, |
Iterator const & | it_begin, | ||
Iterator const & | it_end, | ||
typename std::iterator_traits< Iterator >::difference_type & | cnt_begin, | ||
Point & | pt, | ||
Domain const & | domain, | ||
std::vector< Dimension > const & | dimensions, | ||
std::size_t | id, | ||
bool | forward | ||
) |
Checking iterator given then span domain and dimensions order.
Definition at line 163 of file testHyperRectDomain.cpp.
References domain, DGtal::HyperRectDomain< TSpace >::lowerBound(), REQUIRE(), testIteratorHelperImpl(), DGtal::trace, DGtal::HyperRectDomain< TSpace >::upperBound(), and DGtal::Trace::warning().
Referenced by testIteratorHelper(), and testIteratorHelperImpl().