aimstil  5.0.5
miscUtils.h File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdarg>
#include <numeric>
#include <boost/array.hpp>
#include <boost/type_traits.hpp>
#include "aims/vector/vector.h"
#include "til/is_traits.h"
#include "til/Matrix3.h"
#include "til/TExpr.h"
#include "til/TExprOperators.h"
#include "globalTraits.h"
#include "misc_utils.tpp"
Include dependency graph for miscUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  til::policy::Radian_CenteredRange
 A policy label to indicate that radian range is ]-PI; PI]. More...
 
class  til::policy::Radian_PositiveRange
 A policy label to indicate that radian range is [0; PI[. More...
 
struct  til::functor::Diff2
 Computes the squared Euclidean distance between two vectors. More...
 
struct  til::functor::Diff
 Computes the Euclidean distance between two vectors. More...
 
struct  til::functor::Normalize< TVector3D >
 Normalize a vector with its Euclidean norm. More...
 
struct  til::Lexicographical_compare< T >
 
struct  til::Lesser_PointeeAddress< TIterator >
 operator< on the address in memory of the pointed object More...
 
struct  til::Lesser_Pair2< T1, T2 >
 operator< on the second member of a pair. More...
 
struct  til::Greater_Pair2< T1, T2 >
 operator> on the second member of a pair. More...
 
struct  til::Return_pair1< T1, T2 >
 Returns first value of pair. More...
 
struct  til::SquaredEuclideanDist< TPrec >
 
class  til::Incrementor< T >
 A class which returns a value that is increased everytime it is returned. More...
 

Namespaces

 til
 Belongs to package Box Do not include directly, include til/Box.h instead.
 
 til::policy
 
 til::detail
 Multiply an image with another object.
 
 til::functor
 

Functions

template<typename T >
til::norm2 (T x, T y, T z)
 Squared euclidean norm of vector (x,y,z) More...
 
template<typename TContainer1 , typename TContainer2 >
boost::disable_if_c< is_container< typename TContainer1::value_type >::value &&is_container< typename TContainer2::value_type >::value >::type til::detail::_allocate_sameSize (const TContainer1 &c1, TContainer2 &c2)
 
template<typename TContainer1 , typename TContainer2 >
boost::enable_if_c< is_container< typename TContainer1::value_type >::value &&is_container< typename TContainer2::value_type >::value >::type til::detail::_allocate_sameSize (const TContainer1 &c1, TContainer2 &c2)
 
template<typename TContainer1 , typename TContainer2 >
void til::allocate_sameSize (const TContainer1 &c1, TContainer2 &c2)
 A simple function to allocate a container so that its size matches the size of a second container. More...
 
template<typename TPrecision , typename TVector3D >
TPrecision til::functor::diff2 (const TVector3D &v1, const TVector3D &v2)
 Computes the squared Euclidean distance between two vectors. More...
 
template<typename TPrecision , typename TVector3D >
TPrecision til::functor::diff (const TVector3D &v1, const TVector3D &v2)
 Computes the Euclidean distance between two vectors. More...
 
template<typename TRes , typename TIterator >
void til::mean (TIterator begin, TIterator end, TRes &res)
 Computes the centroid of a list of vertices. More...
 
template<typename TRes , typename TCollection >
void til::centroid (const TCollection &c, TRes &res) __attribute__((__deprecated__("use mean() instead")))
 Computes the centroid of a list of vertices. More...
 
template<typename TPoint , typename TPointCollection >
void til::stdev (const TPointCollection &c, TPoint &res)
 
template<typename T1 , typename T2 >
bool til::same_sign (const T1 &x, const T2 &y)
 Return true iff both arguments have same sign. More...
 
template<typename T1 , typename T2 >
T1 til::sign (T1 x, T2 y)
 Change the sign of x if y < 0. More...
 
template<typename T >
char * til::sprintf (T format,...)
 
template<typename TIndexCollection >
std::vector< std::list< std::size_t > > til::invertIndices (const std::vector< TIndexCollection > &c)
 Invert an index array. More...
 
template<typename T >
std::size_t til::max_index (T x0, T x1, T x2)
 Returns i0, where X_i0 is the greatesstructt of all Xi's. More...
 
template<typename T >
std::size_t til::min_index (T x0, T x1, T x2)
 Returns i0, where X_i0 is the smallest of all Xi's. More...
 
template<typename T >
bool til::is_nan (T x)
 Check if x is NaN. More...
 
template<typename T >
bool til::is_dyadic (T n)
 Returns true if argument is of the form 2^m, m>=1. More...
 
template<typename T >
int til::log2 (T n)
 Returns the largest m so that n >= 2^m. More...
 
template<typename T >
til::exp2 (unsigned int n)
 Returns 2^n. More...
 
template<typename T >
til::lower_dyadic (T n)
 Return the greater power of two inferior or equal to n. More...