A.I.M.S


vector.h File Reference
#include <aims/def/assert.h>
#include <aims/def/general.h>
#include <soma-io/utilities/asciidatasourcetraits.h>
#include <cartobase/type/types.h>
#include <fstream>
#include <math.h>
#include <cartobase/object/object.h>
Include dependency graph for vector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AimsVector< T, D >
 The template class to implement basic vectors. More...
 
class  AimsVector< T, D >
 The template class to implement basic vectors. More...
 
class  carto::DataTypeCode< AimsVector< T, D > >
 
class  internal::fill_aimsvector2< T, D >
 
class  internal::fill_aimsvector3< T, D >
 
class  internal::fill_aimsvector4< T, D >
 
class  internal::fill_aimsvector2< T, 1 >
 
class  internal::fill_aimsvector3< T, 1 >
 
class  internal::fill_aimsvector4< T, 1 >
 
class  internal::fill_aimsvector3< T, 2 >
 
class  internal::fill_aimsvector4< T, 2 >
 
class  internal::fill_aimsvector4< T, 3 >
 

Namespaces

 carto
 
 internal
 

Typedefs

Useful type definitions
typedef AimsVector< int16_t, 2 > Point2d
 
typedef AimsVector< int16_t, 3 > Point3d
 
typedef AimsVector< int16_t, 4 > Point4d
 
typedef AimsVector< uint32_t, 2 > Point2du
 
typedef AimsVector< uint32_t, 3 > Point3du
 
typedef AimsVector< uint32_t, 4 > Point4du
 
typedef AimsVector< int16_t, 2 > Point2ds
 
typedef AimsVector< int16_t, 3 > Point3ds
 
typedef AimsVector< int16_t, 4 > Point4ds
 
typedef AimsVector< int32_t, 2 > Point2di
 
typedef AimsVector< int32_t, 3 > Point3di
 
typedef AimsVector< int32_t, 4 > Point4di
 
typedef AimsVector< int64_t, 2 > Point2dl
 
typedef AimsVector< int64_t, 3 > Point3dl
 
typedef AimsVector< int64_t, 4 > Point4dl
 
typedef AimsVector< uint16_t, 2 > Point2dus
 
typedef AimsVector< uint16_t, 3 > Point3dus
 
typedef AimsVector< uint16_t, 4 > Point4dus
 
typedef AimsVector< uint32_t, 2 > Point2dui
 
typedef AimsVector< uint32_t, 3 > Point3dui
 
typedef AimsVector< uint32_t, 4 > Point4dui
 
typedef AimsVector< uint64_t, 2 > Point2dul
 
typedef AimsVector< uint64_t, 3 > Point3dul
 
typedef AimsVector< uint64_t, 4 > Point4dul
 
typedef AimsVector< float, 2 > Point2df
 
typedef AimsVector< float, 3 > Point3df
 
typedef AimsVector< float, 4 > Point4df
 
typedef AimsVector< double, 2 > Point2dd
 
typedef AimsVector< double, 3 > Point3dd
 
typedef AimsVector< double, 4 > Point4dd
 

Functions

template<class T , int D>
bool operator== (const AimsVector< T, D > &v1, const AimsVector< T, D > &v2)
 
template<class T , int D>
bool operator== (const AimsVector< T, D > &v1, const T &val)
 
template<class T , int D>
bool operator!= (const AimsVector< T, D > &v1, const AimsVector< T, D > &v2)
 should be defined implicitely, but fails with some compilers (Intel) More...
 
template<class T , int D>
bool operator!= (const AimsVector< T, D > &v1, const T &val)
 should be defined implicitely, but fails with some compilers (Intel) More...
 
template<class T , int D>
AimsVector< T, D > operator+ (const AimsVector< T, D > &v1, const AimsVector< T, D > &v2)
 
template<class T , int D>
AimsVector< T, D > operator- (const AimsVector< T, D > &v1, const AimsVector< T, D > &v2)
 
template<class T , int D>
AimsVector< T, D > operator* (const AimsVector< T, D > &v1, double value)
 
template<class T , int D>
AimsVector< T, D > operator* (double value, const AimsVector< T, D > &v1)
 
template<class T , int D>
AimsVector< T, D > operator/ (const AimsVector< T, D > &v1, double value)
 
template<class T , int D>
AimsVector< T, D > operator+ (const AimsVector< T, D > &v1)
 
template<class T , int D>
AimsVector< T, D > operator- (const AimsVector< T, D > &v1)
 
template<class T , int D>
AimsVector< T, 3 > crossed (const AimsVector< T, D > &v1, const AimsVector< T, D > &v2)
 
template<class T , int D>
float norm (const AimsVector< T, D > &v1)
 
template<class T , int D>
float norm2 (const AimsVector< T, D > &v1)
 
template<class T , int D>
double dnorm (const AimsVector< T, D > &v1)
 
template<class T , int D>
double dnorm2 (const AimsVector< T, D > &v1)
 
template<class T , int D>
std::ostream & operator<< (std::ostream &out, const AimsVector< T, D > &thing)
 
template<class T , int D>
std::istream & operator>> (std::istream &in, AimsVector< T, D > &thing)
 
template<int D>
std::ostream & operator<< (std::ostream &out, const AimsVector< char, D > &thing)
 
template<int D>
std::ostream & operator<< (std::ostream &out, const AimsVector< byte, D > &thing)
 
template<int D>
std::istream & operator>> (std::istream &is, AimsVector< char, D > &thing)
 
template<int D>
std::istream & operator>> (std::istream &is, AimsVector< byte, D > &thing)
 
template<typename T >
AimsVector< T, 3 > vectProduct (const AimsVector< T, 3 > &v1, const AimsVector< T, 3 > &v2)
 

Typedef Documentation

typedef AimsVector<int16_t,2> Point2d

Definition at line 211 of file vector.h.

typedef AimsVector<double,2> Point2dd

Definition at line 239 of file vector.h.

typedef AimsVector<float,2> Point2df

Definition at line 236 of file vector.h.

typedef AimsVector<int32_t,2> Point2di

Definition at line 221 of file vector.h.

typedef AimsVector<int64_t,2> Point2dl

Definition at line 224 of file vector.h.

typedef AimsVector<int16_t,2> Point2ds

Definition at line 218 of file vector.h.

typedef AimsVector<uint32_t,2> Point2du

Definition at line 214 of file vector.h.

typedef AimsVector<uint32_t,2> Point2dui

Definition at line 230 of file vector.h.

typedef AimsVector<uint64_t,2> Point2dul

Definition at line 233 of file vector.h.

typedef AimsVector<uint16_t,2> Point2dus

Definition at line 227 of file vector.h.

typedef AimsVector<int16_t,3> Point3d

Definition at line 212 of file vector.h.

typedef AimsVector<double,3> Point3dd

Definition at line 240 of file vector.h.

typedef AimsVector<float,3> Point3df

Definition at line 237 of file vector.h.

typedef AimsVector<int32_t,3> Point3di

Definition at line 222 of file vector.h.

typedef AimsVector<int64_t,3> Point3dl

Definition at line 225 of file vector.h.

typedef AimsVector<int16_t,3> Point3ds

Definition at line 219 of file vector.h.

typedef AimsVector<uint32_t,3> Point3du

Definition at line 215 of file vector.h.

typedef AimsVector<uint32_t,3> Point3dui

Definition at line 231 of file vector.h.

typedef AimsVector<uint64_t,3> Point3dul

Definition at line 234 of file vector.h.

typedef AimsVector<uint16_t,3> Point3dus

Definition at line 228 of file vector.h.

typedef AimsVector<int16_t,4> Point4d

Definition at line 213 of file vector.h.

typedef AimsVector<double,4> Point4dd

Definition at line 241 of file vector.h.

typedef AimsVector<float,4> Point4df

Definition at line 238 of file vector.h.

typedef AimsVector<int32_t,4> Point4di

Definition at line 223 of file vector.h.

typedef AimsVector<int64_t,4> Point4dl

Definition at line 226 of file vector.h.

typedef AimsVector<int16_t,4> Point4ds

Definition at line 220 of file vector.h.

typedef AimsVector<uint32_t,4> Point4du

Definition at line 216 of file vector.h.

typedef AimsVector<uint32_t,4> Point4dui

Definition at line 232 of file vector.h.

typedef AimsVector<uint64_t,4> Point4dul

Definition at line 235 of file vector.h.

typedef AimsVector<uint16_t,4> Point4dus

Definition at line 229 of file vector.h.

Function Documentation

template<class T , int D>
AimsVector< T, 3 > crossed ( const AimsVector< T, D > &  v1,
const AimsVector< T, D > &  v2 
)
inline

Definition at line 817 of file vector.h.

Referenced by AimsSurface< D, T >::updateNormals().

template<class T , int D>
double dnorm ( const AimsVector< T, D > &  v1)
inline

Definition at line 845 of file vector.h.

References AimsVector< T, D >::dnorm().

template<class T , int D>
double dnorm2 ( const AimsVector< T, D > &  v1)
inline

Definition at line 853 of file vector.h.

References AimsVector< T, D >::dnorm2().

template<class T , int D>
float norm ( const AimsVector< T, D > &  v1)
inline

Definition at line 830 of file vector.h.

References AimsVector< T, D >::norm().

Referenced by AimsVector< T, D >::normalize().

template<class T , int D>
float norm2 ( const AimsVector< T, D > &  v1)
inline
template<class T , int D>
bool operator!= ( const AimsVector< T, D > &  v1,
const AimsVector< T, D > &  v2 
)

should be defined implicitely, but fails with some compilers (Intel)

Definition at line 61 of file vector.h.

template<class T , int D>
bool operator!= ( const AimsVector< T, D > &  v1,
const T &  val 
)

should be defined implicitely, but fails with some compilers (Intel)

Definition at line 69 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator* ( const AimsVector< T, D > &  v1,
double  value 
)
inline

Definition at line 762 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator* ( double  value,
const AimsVector< T, D > &  v1 
)
inline

Definition at line 774 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator+ ( const AimsVector< T, D > &  v1,
const AimsVector< T, D > &  v2 
)
inline

Definition at line 738 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator+ ( const AimsVector< T, D > &  v1)
inline

Definition at line 798 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator- ( const AimsVector< T, D > &  v1,
const AimsVector< T, D > &  v2 
)
inline

Definition at line 750 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator- ( const AimsVector< T, D > &  v1)
inline

Definition at line 806 of file vector.h.

template<class T , int D>
AimsVector< T, D > operator/ ( const AimsVector< T, D > &  v1,
double  value 
)
inline

Definition at line 786 of file vector.h.

template<class T , int D>
std::ostream & operator<< ( std::ostream &  out,
const AimsVector< T, D > &  thing 
)
inline

Definition at line 861 of file vector.h.

template<int D>
std::ostream& operator<< ( std::ostream &  out,
const AimsVector< char, D > &  thing 
)
inline

Definition at line 873 of file vector.h.

template<int D>
std::ostream& operator<< ( std::ostream &  out,
const AimsVector< byte, D > &  thing 
)
inline

Definition at line 885 of file vector.h.

template<class T , int D>
bool operator== ( const AimsVector< T, D > &  v1,
const AimsVector< T, D > &  v2 
)
inline

Definition at line 714 of file vector.h.

References AimsVector< T, D >::item().

template<class T , int D>
bool operator== ( const AimsVector< T, D > &  v1,
const T &  val 
)
inline

Definition at line 726 of file vector.h.

template<class T , int D>
std::istream & operator>> ( std::istream &  in,
AimsVector< T, D > &  thing 
)
inline

Definition at line 897 of file vector.h.

References AimsVector< T, D >::item().

template<int D>
std::istream& operator>> ( std::istream &  is,
AimsVector< char, D > &  thing 
)
inline

Definition at line 936 of file vector.h.

References AimsVector< T, D >::item().

template<int D>
std::istream& operator>> ( std::istream &  is,
AimsVector< byte, D > &  thing 
)
inline

Definition at line 977 of file vector.h.

References AimsVector< T, D >::item().

template<typename T >
AimsVector<T,3> vectProduct ( const AimsVector< T, 3 > &  v1,
const AimsVector< T, 3 > &  v2 
)
inline

Definition at line 1019 of file vector.h.