soma-io  5.1.2
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  carto::DataTypeCode< AimsVector< T, D > >
 
class  carto::DataTypeTraits< AimsVector< T, D > >
 
class  internal::null_value< T >
 
class  internal::null_value< T * >
 
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
 

Functions

template<class T , int D>
bool operator!= (const AimsVector< T, D > &v1, const AimsVector< T, D > &v2)
 should be defined implicitly, 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 implicitly, but fails with some compilers (Intel) More...
 
template<typename T , int D>
DataSource & soma::operator<< (DataSource &ds, const AimsVector< T, D > &x)
 

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
 
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>
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

◆ Point2d

typedef AimsVector<int16_t,2> Point2d

Definition at line 221 of file vector.h.

◆ Point2dd

typedef AimsVector<double,2> Point2dd

Definition at line 249 of file vector.h.

◆ Point2df

typedef AimsVector<float,2> Point2df

Definition at line 246 of file vector.h.

◆ Point2di

typedef AimsVector<int32_t,2> Point2di

Definition at line 231 of file vector.h.

◆ Point2dl

typedef AimsVector<int64_t,2> Point2dl

Definition at line 234 of file vector.h.

◆ Point2ds

typedef AimsVector<int16_t,2> Point2ds

Definition at line 228 of file vector.h.

◆ Point2du

typedef AimsVector<uint32_t,2> Point2du

Definition at line 224 of file vector.h.

◆ Point2dui

typedef AimsVector<uint32_t,2> Point2dui

Definition at line 240 of file vector.h.

◆ Point2dul

typedef AimsVector<uint64_t,2> Point2dul

Definition at line 243 of file vector.h.

◆ Point2dus

typedef AimsVector<uint16_t,2> Point2dus

Definition at line 237 of file vector.h.

◆ Point3d

typedef AimsVector<int16_t,3> Point3d

Definition at line 222 of file vector.h.

◆ Point3dd

typedef AimsVector<double,3> Point3dd

Definition at line 250 of file vector.h.

◆ Point3df

typedef AimsVector<float,3> Point3df

Definition at line 247 of file vector.h.

◆ Point3di

typedef AimsVector<int32_t,3> Point3di

Definition at line 232 of file vector.h.

◆ Point3dl

typedef AimsVector<int64_t,3> Point3dl

Definition at line 235 of file vector.h.

◆ Point3ds

typedef AimsVector<int16_t,3> Point3ds

Definition at line 229 of file vector.h.

◆ Point3du

typedef AimsVector<uint32_t,3> Point3du

Definition at line 225 of file vector.h.

◆ Point3dui

typedef AimsVector<uint32_t,3> Point3dui

Definition at line 241 of file vector.h.

◆ Point3dul

typedef AimsVector<uint64_t,3> Point3dul

Definition at line 244 of file vector.h.

◆ Point3dus

typedef AimsVector<uint16_t,3> Point3dus

Definition at line 238 of file vector.h.

◆ Point4d

typedef AimsVector<int16_t,4> Point4d

Definition at line 223 of file vector.h.

◆ Point4dd

typedef AimsVector<double,4> Point4dd

Definition at line 251 of file vector.h.

◆ Point4df

typedef AimsVector<float,4> Point4df

Definition at line 248 of file vector.h.

◆ Point4di

typedef AimsVector<int32_t,4> Point4di

Definition at line 233 of file vector.h.

◆ Point4dl

typedef AimsVector<int64_t,4> Point4dl

Definition at line 236 of file vector.h.

◆ Point4ds

typedef AimsVector<int16_t,4> Point4ds

Definition at line 230 of file vector.h.

◆ Point4du

typedef AimsVector<uint32_t,4> Point4du

Definition at line 226 of file vector.h.

◆ Point4dui

typedef AimsVector<uint32_t,4> Point4dui

Definition at line 242 of file vector.h.

◆ Point4dul

typedef AimsVector<uint64_t,4> Point4dul

Definition at line 245 of file vector.h.

◆ Point4dus

typedef AimsVector<uint16_t,4> Point4dus

Definition at line 239 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 954 of file vector.h.

◆ dnorm()

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

Definition at line 982 of file vector.h.

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

◆ dnorm2()

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

Definition at line 990 of file vector.h.

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

◆ norm()

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

Definition at line 967 of file vector.h.

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

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

◆ norm2()

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

Definition at line 975 of file vector.h.

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

◆ operator!=() [1/2]

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

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

Definition at line 66 of file vector.h.

◆ operator!=() [2/2]

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

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

Definition at line 74 of file vector.h.

◆ operator*() [1/2]

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

Definition at line 899 of file vector.h.

◆ operator*() [2/2]

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

Definition at line 911 of file vector.h.

◆ operator+() [1/2]

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

Definition at line 935 of file vector.h.

◆ operator+() [2/2]

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

Definition at line 875 of file vector.h.

◆ operator-() [1/2]

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

Definition at line 943 of file vector.h.

◆ operator-() [2/2]

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

Definition at line 887 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 923 of file vector.h.

◆ operator<<() [1/3]

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

Definition at line 1010 of file vector.h.

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

◆ operator<<() [2/3]

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

Definition at line 998 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 1022 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 851 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 863 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 1034 of file vector.h.

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

◆ operator>>() [2/3]

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

Definition at line 1073 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 1114 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 1156 of file vector.h.