golib  0.5
goPoint< T > Class Template Reference

Deprecate this, do not use! More...

#include <gopoint.h>

Public Member Functions

 goPoint (T xf=T(0.0), T yf=T(0.0), T zf=T(0.0), T wf=T(0.0), goDouble v=0.0)
 Constructor. More...
 
template<class To >
 goPoint (const goPoint< To > &other)
 
template<class To >
 goPoint (const go4Vector< To > &other)
 
template<class To >
 goPoint (const goMath::Vector< To > &other)
 
bool operator< (const goPoint< T > &other) const
 
bool operator> (const goPoint< T > &other) const
 
bool operator== (const goPoint< T > &other) const
 Comparison of the coordinates. More...
 
bool operator!= (const goPoint< T > &other) const
 
template<class To >
goPoint< T > & operator= (const goPoint< To > &other)
 
template<class To >
goPoint< T > & operator= (const goMath::Vector< To > &other)
 
- Public Member Functions inherited from go4Vector< T >
 go4Vector (T x_=(T) 0, T y_=(T) 0, T z_=(T) 0, T t_=(T) 0)
 
template<class To >
 go4Vector (const go4Vector< To > &other)
 
template<class To >
 go4Vector (const goMath::Vector< To > &other)
 
T & x ()
 
T & y ()
 
T & z ()
 
T & t ()
 
T & w ()
 
const T & x () const
 
const T & y () const
 
const T & z () const
 
const T & t () const
 
const T & w () const
 
GO4VECTOR_FUNCTION_PREFIX void cross (const go4Vector< T > &other)
 Cross-product. Uses only the first three elements.
 
GO4VECTOR_FUNCTION_PREFIX void div ()
 
- Public Member Functions inherited from goMath::Vector< T >
 Vector (goSize_t s, goSize_t reserve=0, goSize_t resize_overhead=0)
 
 Vector (T *ptr, goSize_t size, goIndex_t stride=1)
 
 Vector (const goFixedArray< T > &o)
 
Vector< T > & operator= (const goFixedArray< T > &other)
 
void print (const char *formatstring="%f\n") const
 
Vector< T > operator* (const goMath::Matrix< T > &M) const
 Quite inefficient vector-matrix multiplication. More...
 
Vector< T > cross (const Vector< T > &other) const
 
bool cross (const Vector< T > &other, Vector< T > &ret) const
 
operator* (const Vector< T > &other) const
 Inner product. More...
 
Vector< T > & operator*= (T scalar)
 
Vector< T > & operator/= (T scalar)
 
Vector< T > & operator-= (T s)
 
Vector< T > & operator+= (T s)
 
Vector< T > & operator+= (const Vector< T > &other)
 
Vector< T > & operator-= (const Vector< T > &other)
 
Vector< T > operator- (const Vector< T > &other) const
 
Vector< T > operator+ (const Vector< T > &other) const
 
Vector< T > operator* (T scalar) const
 
Vector< T > operator/ (T scalar) const
 
template<class To >
Vector< T > & operator*= (const Vector< To > &other)
 
template<class To >
Vector< T > & operator/= (const Vector< To > &other)
 
Vector< T > & operator*= (const goMath::Matrix< T > &m)
 this = m * this More...
 
void outerProduct (const Vector< T > &other, goMath::Matrix< T > &ret) const
 Outer product. More...
 
template<class To >
bool copy (Vector< To > &target, goIndex_t startIndex=0, goIndex_t skip=0, goIndex_t lastIndex=-1) const
 
template<class To >
bool copy (To *target, goIndex_t startIndex=0, goIndex_t skip=0, goIndex_t lastIndex=-1) const
 
template<class To , class To2 >
bool cat (const Vector< To > &other, Vector< To2 > &target) const
 
square () const
 
conjInnerProduct (const Vector< T > &) const
 
abs () const
 Deprecated. Calls norm2() for scalar real types, special implementation for goComplex types. More...
 
norm2 () const
 2-Norm of this vector. More...
 
norm1 () const
 1-Norm of this vector: The sum of absolute values. More...
 
sum (goIndex_t start=0, goIndex_t end=-1) const
 
min () const
 
max () const
 
void fillRange (const T &start, const T &step, const T &end)
 
bool readASCII (const char *filename)
 
bool readASCII (FILE *file)
 
bool writeASCII (const char *filename) const
 
bool writeASCII (FILE *file) const
 
template<>
goComplexf conjInnerProduct (const Vector< goComplexf > &v) const
 
template<>
goMath::Vector< goFloat > & operator= (const goFixedArray< goFloat > &other)
 
template<>
goMath::Vector< goDouble > & operator= (const goFixedArray< goDouble > &other)
 
template<>
void print (const char *formatstring) const
 
template<>
void print (const char *formatstring) const
 
template<>
goFloat operator* (const goMath::Vector< goFloat > &other) const
 
template<>
goDouble operator* (const goMath::Vector< goDouble > &other) const
 
template<>
goMath::Vector< goComplexf > & operator*= (const goMath::Matrix< goComplexf > &)
 
template<>
goComplexf square () const
 Calculates conj(this) * this. More...
 
template<>
goComplexf abs () const
 
template<>
goComplexd abs () const
 
template<>
goFloat norm2 () const
 
template<>
goDouble norm2 () const
 
template<>
goFloat norm1 () const
 
template<>
goDouble norm1 () const
 
template<>
goComplexf norm2 () const
 
template<>
goComplexd norm2 () const
 
template<>
goComplexf norm1 () const
 
template<>
goComplexd norm1 () const
 
template<>
bool writeASCII (FILE *) const
 
template<>
bool readASCII (FILE *)
 
template<>
goComplexf min () const
 
template<>
goComplexf max () const
 
template<>
goMath::Vector< goFloat > & operator*= (goFloat n)
 
template<>
goMath::Vector< goDouble > & operator*= (goDouble n)
 
template<>
goMath::Vector< goFloat > & operator-= (const goMath::Vector< goFloat > &other)
 
template<>
goMath::Vector< goDouble > & operator-= (const goMath::Vector< goDouble > &other)
 
template<>
goMath::Vector< goFloat > & operator+= (const goMath::Vector< goFloat > &other)
 
template<>
goMath::Vector< goDouble > & operator+= (const goMath::Vector< goDouble > &other)
 
template<>
goMath::Vector< goFloat > operator- (const goMath::Vector< goFloat > &other) const
 
template<>
goMath::Vector< goDouble > operator- (const goMath::Vector< goDouble > &other) const
 
template<>
goMath::Vector< goFloat > operator+ (const goMath::Vector< goFloat > &other) const
 
template<>
goMath::Vector< goDouble > operator+ (const goMath::Vector< goDouble > &other) const
 
- Public Member Functions inherited from goFixedArray< T >
 goFixedArray (goSize_t size=1, goSize_t reserve=0, goSize_t resize_overhead=0)
 Constructor. More...
 
 goFixedArray (const goFixedArray< T > &other)
 
 goFixedArray (T *ptr, goSize_t size, goIndex_t stride)
 
goFixedArray< T > & operator= (const goFixedArray< T > &other)
 
void setData (T *ptr, goSize_t size, goIndex_t stride)
 
void setPtr (T *ptr)
 
void ref (goFixedArray< T > &target, goSize_t startIndex=0, goSize_t size=0)
 
T & operator() (goIndex_t i)
 
T & operator[] (goIndex_t i)
 
const T & operator() (goIndex_t i) const
 
const T & operator[] (goIndex_t i) const
 
goSize_t getSize () const
 Get the size of the array in number of elements. More...
 
goSize_t size () const
 Same as getSize().
 
goSize_t getReserved () const
 Get the number of actually allocated elements. More...
 
goSize_t getResizeOverhead () const
 Get the number of resize overhead elements. More...
 
goIndex_t getStride () const
 
void setResizeOverhead (goSize_t ro)
 Set the resize overhead in number of elements. More...
 
void setSize (goSize_t newSize, goSize_t reserve=0, goSize_t resize_overhead=0)
 Set the size of the array, deleting old content. More...
 
bool resize (goSize_t newSize)
 Proper resize with copying. More...
 
bool operator== (const goFixedArray< T > &other) const
 
bool operator!= (const goFixedArray< T > &other) const
 
T * getPtr ()
 Get the pointer to the data. More...
 
const T * getPtr () const
 Get the pointer to the data. More...
 
void fill (const T &value)
 Fill the array with value. More...
 
void flip ()
 Flip the direction of the data. More...
 

Public Attributes

goDouble value
 

Additional Inherited Members

- Public Types inherited from goMath::Vector< T >
typedef T value_type
 

Detailed Description

template<class T>
class goPoint< T >

Deprecate this, do not use!

Deprecated:

Constructor & Destructor Documentation

◆ goPoint()

template<class T >
goPoint< T >::goPoint ( xf = T(0.0),
yf = T(0.0),
zf = T(0.0),
wf = T(0.0),
goDouble  v = 0.0 
)

Constructor.

Note
Note that the 4th entry in a new vector is initialised to 1. This is to support work with homogeneous coordinates, which is the main reason for the existence of this class.
Parameters
xfx coordinate. Default 0.0.
yfy coordinate. Default 0.0.
zfz coordinate. Default 0.0.
wfw or t coordinate. Default 0.0.
vValue (misc.) for this point. This is not used for calculations with matrices, i.e. it is not interpreted as coordinate value. Default 0.0.

Member Function Documentation

◆ operator==()

template<class T >
bool goPoint< T >::operator== ( const goPoint< T > &  other) const

Comparison of the coordinates.

Parameters
othergoPoint of the same type
Note
Only the coordinates are compared, NOT the value.
Returns
True if the coordinates of this point are equal to those of other.

The documentation for this class was generated from the following files: