DGtal
1.5.beta
|
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/base/Circulator.h"
#include "DGtal/kernel/PointVector.h"
#include "DGtal/geometry/tools/Hull2DHelpers.h"
#include "DGtal/geometry/tools/PolarPointComparatorBy2x2DetComputer.h"
#include "DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.h"
#include "DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.h"
#include "DGtal/io/boards/Board2D.h"
Go to the source code of this file.
Functions | |
template<typename ForwardIterator > | |
bool | circularlyEqual (const ForwardIterator &first1, const ForwardIterator &last1, const ForwardIterator &first2, const ForwardIterator &last2) |
bool | testConvexHull2D () |
bool | testConvexHullCompThickness () |
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 the functions devoted to convex hull computations.
This file is part of the DGtal library.
Definition in file testConvexHull2D.cpp.
bool circularlyEqual | ( | const ForwardIterator & | first1, |
const ForwardIterator & | last1, | ||
const ForwardIterator & | first2, | ||
const ForwardIterator & | last2 | ||
) |
Function that checks whether two ranges are equal up to circular shifts or not. For example, (1, 2, 3) and (2, 3, 1) are equal, but (1, 2, 3) and (2, 1, 3) are not equal.
first1 | begin iterator of the first range |
last1 | end iterator of the first range |
first2 | begin iterator of the second range |
last2 | end iterator of the second range |
ForwardIterator | a model of forward iterator |
Definition at line 66 of file testConvexHull2D.cpp.
Referenced by testConvexHull2D().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 370 of file testConvexHull2D.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), testConvexHull2D(), testConvexHullCompThickness(), and DGtal::trace.
bool testConvexHull2D | ( | ) |
Testing functions that computes the convex hull of a range of points
Definition at line 102 of file testConvexHull2D.cpp.
References DGtal::Trace::beginBlock(), ch, circularlyEqual(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool testConvexHullCompThickness | ( | ) |
Testing functions that computes the convex hull thickness.
Definition at line 274 of file testConvexHull2D.cpp.
References DGtal::Trace::beginBlock(), DGtal::Color::Blue, ch, DGtal::functions::Hull2D::computeHullThickness(), LibBoard::Board::drawCircle(), LibBoard::Board::drawLine(), DGtal::functions::Hull2D::EuclideanThickness, DGtal::functions::Hull2D::getThicknessAntipodalPair(), DGtal::functions::Hull2D::HorizontalVerticalThickness, DGtal::Trace::info(), DGtal::Color::Red, LibBoard::Board::saveEPS(), LibBoard::Board::setPenColor(), thicknessE, thicknessHV, and DGtal::trace.
Referenced by main().