DGtal
0.9.3
|
#include <cstdio>
#include <cmath>
#include <iostream>
#include <fstream>
#include <vector>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/PointVector.h"
Go to the source code of this file.
Functions | |
bool | testComparison () |
bool | testMaxMin () |
bool | testSimplePoint () |
bool | testNorms () |
bool | testSimpleVector () |
bool | testIterator () |
bool | testOperators () |
bool | testIntegerNorms () |
int | main () |
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 testPointVector.cpp.
int main | ( | ) |
Definition at line 288 of file testPointVector.cpp.
References testComparison(), testIntegerNorms(), testIterator(), testMaxMin(), testNorms(), testOperators(), testSimplePoint(), and testSimpleVector().
bool testComparison | ( | ) |
A PointVector may represent either a point or a vector depending on the context. For performance reasons, these two types are just aliases. The user should take care how to use it depending on the context. For instance, adding two points has no meaning, but will be authorized by the compiler.
The default less than operator is the one of the lexicographic ordering, starting from dimension 0 to N-1.
PointVector also realizes the concept CLattice with an infimum (meet, greatest lower bound) and a supremum (join, least upper bound) operation.
Usage example:
Definition at line 76 of file testPointVector.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool testIntegerNorms | ( | ) |
Definition at line 261 of file testPointVector.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm1(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::normInfinity(), and DGtal::trace.
Referenced by main().
bool testIterator | ( | ) |
Definition at line 204 of file testPointVector.cpp.
References aPoint(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::begin(), DGtal::Trace::beginBlock(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::end(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool testMaxMin | ( | ) |
Definition at line 106 of file testPointVector.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::max(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::maxElement(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::min(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::minElement(), and DGtal::trace.
Referenced by main().
bool testNorms | ( | ) |
Definition at line 156 of file testPointVector.cpp.
References aPoint(), DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool testOperators | ( | ) |
Definition at line 226 of file testPointVector.cpp.
References DGtal::Trace::beginBlock(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::dot(), DGtal::Trace::endBlock(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::inf(), DGtal::Trace::info(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::sup(), and DGtal::trace.
Referenced by main().
bool testSimplePoint | ( | ) |
Test instanciation of Points
Definition at line 126 of file testPointVector.cpp.
References aPoint(), DGtal::Trace::beginBlock(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::dimension, DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().
bool testSimpleVector | ( | ) |
Test instancition of Vectors
Definition at line 184 of file testPointVector.cpp.
References DGtal::Trace::beginBlock(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::dimension, DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by main().