soma-io  5.0.5
vector.h File Reference
#include <cartobase/exception/assert.h>
#include <cartobase/type/types.h>
#include <cartobase/type/datatypetraits.h>
#include <cartobase/object/object.h>
#include <soma-io/utilities/asciidatasourcetraits.h>
#include <fstream>
#include <math.h>
#include <vector>
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  carto::DataTypeTraits< 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 >
 
class  soma::AsciiDataSourceTraits< AimsVector< T, D > >
 

Namespaces

 carto
 
 internal
 
 soma
 

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)
 
template<typename T , int D>
DataSource & soma::operator<< (DataSource &ds, const AimsVector< T, D > &x)
 

Typedef Documentation

◆ Point2d

typedef AimsVector<int16_t,2> Point2d

Definition at line 219 of file vector.h.

◆ Point2dd

typedef AimsVector<double,2> Point2dd

Definition at line 247 of file vector.h.

◆ Point2df

typedef AimsVector<float,2> Point2df

Definition at line 244 of file vector.h.

◆ Point2di

typedef AimsVector<int32_t,2> Point2di

Definition at line 229 of file vector.h.

◆ Point2dl

typedef AimsVector<int64_t,2> Point2dl

Definition at line 232 of file vector.h.

◆ Point2ds

typedef AimsVector<int16_t,2> Point2ds

Definition at line 226 of file vector.h.

◆ Point2du

typedef AimsVector<uint32_t,2> Point2du

Definition at line 222 of file vector.h.

◆ Point2dui

typedef AimsVector<uint32_t,2> Point2dui

Definition at line 238 of file vector.h.

◆ Point2dul

typedef AimsVector<uint64_t,2> Point2dul

Definition at line 241 of file vector.h.

◆ Point2dus

typedef AimsVector<uint16_t,2> Point2dus

Definition at line 235 of file vector.h.

◆ Point3d

typedef AimsVector<int16_t,3> Point3d

Definition at line 220 of file vector.h.

◆ Point3dd

typedef AimsVector<double,3> Point3dd

Definition at line 248 of file vector.h.

◆ Point3df

typedef AimsVector<float,3> Point3df

Definition at line 245 of file vector.h.

◆ Point3di

typedef AimsVector<int32_t,3> Point3di

Definition at line 230 of file vector.h.

◆ Point3dl

typedef AimsVector<int64_t,3> Point3dl

Definition at line 233 of file vector.h.

◆ Point3ds

typedef AimsVector<int16_t,3> Point3ds

Definition at line 227 of file vector.h.

◆ Point3du

typedef AimsVector<uint32_t,3> Point3du

Definition at line 223 of file vector.h.

◆ Point3dui

typedef AimsVector<uint32_t,3> Point3dui

Definition at line 239 of file vector.h.

◆ Point3dul

typedef AimsVector<uint64_t,3> Point3dul

Definition at line 242 of file vector.h.

◆ Point3dus

typedef AimsVector<uint16_t,3> Point3dus

Definition at line 236 of file vector.h.

◆ Point4d

typedef AimsVector<int16_t,4> Point4d

Definition at line 221 of file vector.h.

◆ Point4dd

typedef AimsVector<double,4> Point4dd

Definition at line 249 of file vector.h.

◆ Point4df

typedef AimsVector<float,4> Point4df

Definition at line 246 of file vector.h.

◆ Point4di

typedef AimsVector<int32_t,4> Point4di

Definition at line 231 of file vector.h.

◆ Point4dl

typedef AimsVector<int64_t,4> Point4dl

Definition at line 234 of file vector.h.

◆ Point4ds

typedef AimsVector<int16_t,4> Point4ds

Definition at line 228 of file vector.h.

◆ Point4du

typedef AimsVector<uint32_t,4> Point4du

Definition at line 224 of file vector.h.

◆ Point4dui

typedef AimsVector<uint32_t,4> Point4dui

Definition at line 240 of file vector.h.

◆ Point4dul

typedef AimsVector<uint64_t,4> Point4dul

Definition at line 243 of file vector.h.

◆ Point4dus

typedef AimsVector<uint16_t,4> Point4dus

Definition at line 237 of file vector.h.

Function Documentation

◆ crossed()

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

Definition at line 919 of file vector.h.

Referenced by operator!=().

◆ dnorm()

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

Definition at line 947 of file vector.h.

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

Referenced by operator!=().

◆ dnorm2()

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

Definition at line 955 of file vector.h.

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

Referenced by operator!=().

◆ norm()

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

Definition at line 932 of file vector.h.

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

Referenced by operator!=().

◆ norm2()

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

Definition at line 940 of file vector.h.

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

Referenced by operator!=().

◆ operator!=() [1/2]

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 66 of file vector.h.

◆ operator!=() [2/2]

◆ operator*() [1/2]

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

Definition at line 864 of file vector.h.

Referenced by operator!=().

◆ operator*() [2/2]

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

Definition at line 876 of file vector.h.

◆ operator+() [1/2]

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

Definition at line 840 of file vector.h.

Referenced by operator!=().

◆ operator+() [2/2]

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

Definition at line 900 of file vector.h.

◆ operator-() [1/2]

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

Definition at line 852 of file vector.h.

Referenced by operator!=().

◆ operator-() [2/2]

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

Definition at line 908 of file vector.h.

◆ operator/()

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

Definition at line 888 of file vector.h.

Referenced by operator!=().

◆ operator<<() [1/3]

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

Definition at line 963 of file vector.h.

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

Referenced by operator!=().

◆ operator<<() [2/3]

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

Definition at line 975 of file vector.h.

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

◆ operator<<() [3/3]

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

Definition at line 987 of file vector.h.

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

◆ operator==() [1/2]

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

Definition at line 816 of file vector.h.

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

◆ operator==() [2/2]

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

Definition at line 828 of file vector.h.

◆ operator>>() [1/3]

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

Definition at line 999 of file vector.h.

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

Referenced by operator!=().

◆ operator>>() [2/3]

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

Definition at line 1038 of file vector.h.

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

◆ operator>>() [3/3]

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

Definition at line 1079 of file vector.h.

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

◆ vectProduct()

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

Definition at line 1121 of file vector.h.