This file contains various helper functions. More...
#include <cassert>#include <cmath>#include <cstdlib>#include <limits>#include <list>#include <sstream>#include <string>#include <tuple>#include <utility>#include <vector>#include <Eigen/Core>#include "Coordinate.hpp"#include <QTransform>
 Include dependency graph for Tools.hpp:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | TRTK | 
Namespace of the Transformation and Registration Toolkit.  | |
| namespace | TRTK::Tools | 
This namespace contains various helper functions.  | |
Functions | |
| template<class EigenMatrix > | |
| QTransform | TRTK::Tools::Eigen3x3_to_QTransfom (const EigenMatrix &eigenMatrix) | 
| Converts an Eigen 3x3 matrix into a QTransform.   | |
| template<class T > | |
| std::pair< Eigen::Matrix< T, 3, 1 > , T >  | TRTK::Tools::axisAngleFromRotationMatrix (const Eigen::Matrix< T, 3, 3 > &matrix) | 
| template<class T > | |
| std::tuple< T, T, T > | TRTK::Tools::cartesian2Spherical (const T &x, const T &y, const T &z) | 
| template<class T > | |
| Eigen::Matrix< T, 3, 1 > | TRTK::Tools::cartesian2Spherical (const Eigen::Matrix< T, 3, 1 > &point) | 
| template<class T > | |
| Coordinate< T > | TRTK::Tools::cartesian2Spherical (const Coordinate< T > &point) | 
| bool | TRTK::Tools::fileExists (const char *file_name) | 
| Checks whether a certain file exists.   | |
| unsigned long long | TRTK::Tools::fileLength (const char *file_name) | 
| Returns the size of a certain file.   | |
| unsigned long long | TRTK::Tools::fileLength (std::ifstream &file_stream) | 
| Returns the size of a certain file stream.  | |
| string | TRTK::Tools::getCurrentDate () | 
| Returns the current date in ISO 8601 format (YYYY-MM-DD).   | |
| string | TRTK::Tools::getCurrentTime () | 
| Returns the current time in format hh:mm:ss.   | |
| template<class Derived , class Base > | |
| bool | TRTK::Tools::isClass (Base *base_ptr) | 
| Checks whether an object is of a certain class.   | |
| template<class Derived , class Base > | |
| bool | TRTK::Tools::isClass (Base &base) | 
| Checks whether an object is of a certain class.   | |
| template<typename Base > | |
| bool | TRTK::Tools::isDerivedFrom (const Base *base_ptr) | 
| Checks whether an object is derived from a certain class.   | |
| template<typename Base > | |
| bool | TRTK::Tools::isDerivedFrom (const void *base_ptr) | 
| Checks whether an object is derived from a certain class.   | |
| template<class T > | |
| bool | TRTK::Tools::isEqual (const T x, const T y) | 
| Tests for equality of two scalars.   | |
| template<> | |
| bool | TRTK::Tools::isEqual< int > (const int x, const int y) | 
| template<class T > | |
| bool | TRTK::Tools::isZero (const T value) | 
| Tests for equality with zero.   | |
| template<class T > | |
| std::vector< T > | TRTK::Tools::listToVector (const std::list< T > &lst) | 
| Converts an STL list into an STL vector.   | |
| template<class Container , class ValueType > | |
| ValueType | TRTK::Tools::mean (const Container &container, ValueType null_value=ValueType()) | 
| Returns the mean of all container elements.   | |
| template<class WeightsContainer , class ValuesContainer , class ValueType = typename ValuesContainer::value_type> | |
| ValueType | TRTK::Tools::weightedMean (const WeightsContainer &weights, const ValuesContainer &values, ValueType null_value=ValueType(0)) | 
| Returns the weighted mean of all container elements.   | |
| template<class Container > | |
| auto | TRTK::Tools::median (const Container &container)-> std | 
| Returns the median of all container elements.   | |
| template<class T > | |
| TRTK::Coordinate< T > | TRTK::Tools::orthogonalMatrixToQuaternion (const Eigen::Matrix< T, 3, 3 > &matrix) | 
| Converts an orthogonal matrix to a unit quaternion.   | |
| template<class T > | |
| TRTK::Coordinate< T > | TRTK::Tools::orthogonalMatrixToQuaternion2 (const Eigen::Matrix< T, 3, 3 > &matrix) | 
| Converts an orthogonal matrix to a unit quaternion.   | |
| template<class T > | |
| Eigen::Matrix< T, 3, 3 > | TRTK::Tools::quaternionToOrthogonalMatrix (T q0, T q1, T q2, T q3) | 
| Converts a unit quaternion to an orthogonal matrix.   | |
| template<class T > | |
| Eigen::Matrix< T, 3, 3 > | TRTK::Tools::quaternionToOrthogonalMatrix (const TRTK::Coordinate< T > &quaternion) | 
| Converts a unit quaternion to an orthogonal matrix.   | |
| template<class T > | |
| T | TRTK::Tools::rand () | 
| Random sample of the standard uniform distribution.   | |
| template<class T > | |
| T | TRTK::Tools::rand (T a, T b) | 
| Random sample of a uniform distribution.   | |
| template<> | |
| int | TRTK::Tools::rand< int > (int a, int b) | 
| template<> | |
| unsigned | TRTK::Tools::rand< unsigned > (unsigned a, unsigned b) | 
| double | TRTK::Tools::randn () | 
| Random sample of the standard normal distribution.   | |
| template<class T > | |
| T | TRTK::Tools::randn (T mu, T sigma) | 
| Random sample of the normal distribution.   | |
| template<> | |
| int | TRTK::Tools::randn (int mu, int sigma) | 
| template<class T > | |
| int | TRTK::Tools::sign (T value) | 
| Extracts the sign of a floating point number.   | |
| template<class T > | |
| Eigen::Matrix< T, 3, 3 > | TRTK::Tools::rotationMatrix (const Eigen::Matrix< T, 3, 1 > &axis_, double angle) | 
| template<class T > | |
| T | TRTK::Tools::round (const T number) | 
| Rounds towards the next (signed) integer value.   | |
| template<> | |
| int | TRTK::Tools::round< int > (const int number) | 
| template<class T > | |
| std::tuple< T, T, T > | TRTK::Tools::spherical2Cartesian (const T &r, const T &theta, const T &phi) | 
| template<class T > | |
| Coordinate< T > | TRTK::Tools::spherical2Cartesian (const Coordinate< T > &point) | 
| template<class T > | |
| Eigen::Matrix< T, 3, 1 > | TRTK::Tools::spherical2Cartesian (const Eigen::Matrix< T, 3, 1 > &point) | 
| template<class Container , class ValueType > | |
| ValueType | TRTK::Tools::standardDeviation (const Container &container, ValueType null_value=ValueType()) | 
| Computes the corrected sample standard deviation of all container elements.   | |
| template<class T > | |
| std::string | TRTK::Tools::toString (const T &value) | 
| Converts the input argument (int, double etc.) into a std::string.   | |
| template<class Container , class ValueType > | |
| ValueType | TRTK::Tools::variance (const Container &container, ValueType null_value=ValueType()) | 
| Computes the sample variance of all container elements.   | |
| template<class T > | |
| std::list< T > | TRTK::Tools::vectorToList (const std::vector< T > &vec) | 
| Converts an STL vector into an STL list.   | |
| template<class T1 , class T2 > | |
| std::vector< std::pair< T1, T2 > > | TRTK::Tools::zip (const std::vector< T1 > &v1, const std::vector< T2 > &v2) | 
| Zips two STL vectors into a single one.   | |
This file contains various helper functions.
Definition in file Tools.hpp.
Documentation generated by Doxygen