ML Reference
|
Template class for vector arithmetic with floating point data types. More...
#include <mlFloatingPointVector.h>
Inherited by ml::Tvec10< MLdouble >, ml::Tvec4< MLdouble >, ml::Tvec5< MLdouble >, and ml::Tvec6< MLdouble >.
Public Types | |
enum | { Size = size } |
This enum grants access to the size during compile time, e.g. More... | |
typedef T | ComponentType |
A typedef to "export" the type of components. | |
Public Member Functions | |
T | lengthSquared () const |
Returns the squared length of the vector. | |
T | compSum () const |
Return sum of all components. | |
T | compMul () const |
Return product of all vector components. | |
T | compMaxAbs () const |
Return maximum of absolute component values. | |
void | compMin (FloatingPointVector< T, size, DataContainer > buffer) |
Sets the component wise minimum of *this and buffer in *this. | |
void | compMax (FloatingPointVector< T, size, DataContainer > buffer) |
Sets the component wise maximum of *this and buffer in *this. | |
void | compAbs () |
Kill negative signs from all components. | |
void | compDiv (const FloatingPointVector< T, size, DataContainer > &d) |
Divide each vector component by the corresponding one of d. | |
void | compSqr () |
Calculate and set the square of all components. | |
void | compSqrt () |
Calculate and set square root of all components. | |
void | clampMin (const FloatingPointVector< T, size, DataContainer > &lower) |
Calculate and set all components clamped to lower, i.e. | |
void | clampMax (const FloatingPointVector< T, size, DataContainer > &upper) |
Calculate and set all components clamped to upper, i.e. | |
void | clamp (const FloatingPointVector< T, size, DataContainer > &lower, const FloatingPointVector< T, size, DataContainer > &upper) |
Calculate and set all components of *this so that they are between minimum min and maximum max. | |
void | compRound () |
Round all components of this vector using floor(component + 0.5). | |
void | compFloor () |
Round all components of this vector using floor(component). | |
void | compCeil () |
Round all components of this vector to integer using ceil(component). | |
FloatingPointVector< T, 3, DataContainer > | cross (const FloatingPointVector< T, 3, DataContainer > &b) const |
Cross product for elements, i.e. return vector vertical to *this and b. | |
void | apply (ML_LA_FROM_DOUBLE_TO_DOUBLE f) |
Apply function f to each component starting form index 0 to index size-1. | |
std::ostream & | writeOut (std::ostream &os) const |
Write all components to ostream os starting from index 0 to size-1. | |
std::istream & | readIn (std::istream &is) |
Read all components from istream is starting starting from index 0 to size-1. | |
Constructors and assignment operators. | |
FloatingPointVector (T value=T(0)) | |
Default and value constructor. | |
FloatingPointVector< T, size, DataContainer > & | operator= (T value) |
Assignment of scalar value to all components. | |
Comparison. | |
bool | operator== (const FloatingPointVector< T, size, DataContainer > &buffer) const |
Returns true if *this and buffer are component wise equal, otherwise false. | |
bool | operator!= (const FloatingPointVector< T, size, DataContainer > &buffer) const |
Returns true if any components of *this and buffer are not equal, otherwise false. | |
bool | operator< (const FloatingPointVector< T, size, DataContainer > &buffer) const |
Defines an artificial order for use in sort algorithms (lexicographical order). | |
Value access and indexing operators. | |
const T & | operator[] (const size_t i) const |
Constant indexing operators. | |
T & | operator[] (const size_t i) |
Indexing operators. | |
Other operations. | |
size_t | getSize () const |
Return number of elements of value buffer. | |
T | norm2 () const |
Return euclidean norm (the vector length), i.e. | |
T | norm2 (const FloatingPointVector< T, size, DataContainer > &weight) const |
Return weighted euclidean norm, i.e. | |
T | dot (const FloatingPointVector< T, size, DataContainer > &buffer) const |
Return dot product, i.e. | |
T | normalize () |
Normalizes buffer and returns euclidean length of vector before normalization, i.e.norm2. | |
T | length () const |
Return the length of the vector, i.e. norm2(). | |
T | distance (const FloatingPointVector< T, size, DataContainer > &buffer) const |
Distance of this vector to a given one. | |
T | distanceSquared (const FloatingPointVector< T, size, DataContainer > &buffer) const |
Squared distance of this vector to a given one. | |
Deprecated | |
T | Normalize () |
T | Length () const |
T | Distance (const FloatingPointVector< T, size, DataContainer > &buffer) const |
T | DistanceSquared (const FloatingPointVector< T, size, DataContainer > &buffer) const |
T | Dot (const FloatingPointVector< T, size, DataContainer > &b) const |
T | length2 () const |
T | LengthSquared () const |
FloatingPointVector< T, 3, DataContainer > | Cross (const FloatingPointVector< T, 3, DataContainer > &b) const |
Related Functions | |
(Note that these are not member functions.) | |
Standalone functions for FloatingPointVector. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > & | operator+= (FloatingPointVector< T, size, DataContainer > &op1, const FloatingPointVector< T, size, DataContainer > &buffer) |
Arithmetic assignment: Component wise addition. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > & | operator-= (FloatingPointVector< T, size, DataContainer > &op1, const FloatingPointVector< T, size, DataContainer > &buffer) |
Arithmetic assignment: Component wise subtraction of buffer from *this. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > & | operator*= (FloatingPointVector< T, size, DataContainer > &op1, MLdouble value) |
Arithmetic assignment: Component wise multiplication *this with scalar value. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > & | operator*= (FloatingPointVector< T, size, DataContainer > &op1, const FloatingPointVector< T, size, DataContainer > &op2) |
Arithmetic assignment: Component wise multiplication *this with a vector of the same size. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > & | operator/= (FloatingPointVector< T, size, DataContainer > &op1, MLdouble value) |
Arithmetic assignment: Component wise division of *this by scalar value. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > & | operator/= (FloatingPointVector< T, size, DataContainer > &op1, const FloatingPointVector< T, size, DataContainer > &op2) |
Arithmetic assignment: Component wise division of *this by the values of a vector of the same size. | |
template<class T , size_t size, class DataContainer > | |
bool | operator! (const FloatingPointVector< T, size, DataContainer > &a) |
Returns true if all components are 0, otherwise returns false. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator+ (FloatingPointVector< T, size, DataContainer > lhs, const FloatingPointVector< T, size, DataContainer > &rhs) |
Return value is the component wise addition of lhs and rhs. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator- (FloatingPointVector< T, size, DataContainer > lhs, const FloatingPointVector< T, size, DataContainer > &rhs) |
Return value is the component wise subtraction of rhs from lhs. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator+ (const FloatingPointVector< T, size, DataContainer > &buffer) |
Unary plus, for completeness and for those who really want to use that... | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator- (const FloatingPointVector< T, size, DataContainer > &buffer) |
Unary minus, all components of the vector are multiplied with -1. | |
template<class T , size_t size, class DataContainer > | |
T | operator* (const FloatingPointVector< T, size, DataContainer > &a, const FloatingPointVector< T, size, DataContainer > &b) |
Dot product, returns a.dot(b). | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator* (FloatingPointVector< T, size, DataContainer > lhs, MLdouble rhs) |
Component wise multiplication of lhs with rhs. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator* (MLdouble lhs, FloatingPointVector< T, size, DataContainer > rhs) |
Component wise multiplication of rhs with lhs. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | operator/ (FloatingPointVector< T, size, DataContainer > lhs, MLdouble rhs) |
Component wise division of lhs by specialied rhs of type MLdouble. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | compMin (FloatingPointVector< T, size, DataContainer > buffer1, const FloatingPointVector< T, size, DataContainer > &buffer2) |
Component wise minimum of buffer1 and buffer2. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | compMax (FloatingPointVector< T, size, DataContainer > buffer1, const FloatingPointVector< T, size, DataContainer > &buffer2) |
Component wise maximum of buffer1 and buffer2. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | compAbs (FloatingPointVector< T, size, DataContainer > a) |
Return vector with all components from a without negative sign. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | compSqr (FloatingPointVector< T, size, DataContainer > a) |
Return vector with all components from a squared. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | compSqrt (FloatingPointVector< T, size, DataContainer > a) |
Return vector with all components from a square-rooted. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | compDiv (FloatingPointVector< T, size, DataContainer > a, const FloatingPointVector< T, size, DataContainer > &d) |
Component wise division of a / d. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | clampMin (FloatingPointVector< T, size, DataContainer > a, const FloatingPointVector< T, size, DataContainer > &m) |
Return new vector with all components from a clamped to minimum m. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | clampMax (FloatingPointVector< T, size, DataContainer > a, const FloatingPointVector< T, size, DataContainer > &m) |
Return new vector with all components from a clamped to maximum m. | |
template<class T , size_t size, class DataContainer > | |
FloatingPointVector< T, size, DataContainer > | clamp (FloatingPointVector< T, size, DataContainer > a, const FloatingPointVector< T, size, DataContainer > &lower, const FloatingPointVector< T, size, DataContainer > &upper) |
Return new vector with all components from a clamped to range [lower, upper]. | |
template<class T , size_t size, class DataContainer > | |
T | compMul (const FloatingPointVector< T, size, DataContainer > &a) |
Return product of all components. |
Template class for vector arithmetic with floating point data types.
Notes:
Definition at line 55 of file mlFloatingPointVector.h.
typedef T ml::FloatingPointVector< T, size, DataContainer >::ComponentType |
A typedef to "export" the type of components.
Reimplemented in ml::Tvec10< DT >, ml::Tvec16< DT >, ml::Tvec2< DT >, ml::Tvec3< DT >, ml::Tvec32< DT >, ml::Tvec4< DT >, ml::Tvec5< DT >, ml::Tvec6< DT >, ml::Tvec64< DT >, ml::Tvec7< DT >, ml::Tvec8< DT >, ml::Tvec9< DT >, ml::Tvec10< MLdouble >, ml::Tvec2< MLdouble >, ml::Tvec3< MLdouble >, ml::Tvec4< MLdouble >, ml::Tvec5< MLdouble >, and ml::Tvec6< MLdouble >.
Definition at line 61 of file mlFloatingPointVector.h.
anonymous enum |
This enum grants access to the size during compile time, e.g.
it can be used as a template argument.
Definition at line 65 of file mlFloatingPointVector.h.
ml::FloatingPointVector< T, size, DataContainer >::FloatingPointVector | ( | T | value = T(0) | ) | [inline, explicit] |
Default and value constructor.
Default is the initialization of all components with value whose default is 0.
Definition at line 641 of file mlFloatingPointVector.h.
void ml::FloatingPointVector< T, size, DataContainer >::apply | ( | ML_LA_FROM_DOUBLE_TO_DOUBLE | f | ) | [inline] |
Apply function f to each component starting form index 0 to index size-1.
Definition at line 1008 of file mlFloatingPointVector.h.
void ml::FloatingPointVector< T, size, DataContainer >::clamp | ( | const FloatingPointVector< T, size, DataContainer > & | lower, |
const FloatingPointVector< T, size, DataContainer > & | upper | ||
) | [inline] |
Calculate and set all components of *this so that they are between minimum min and maximum max.
This is done by applying clampMin(lower) first and then clampMax(upper). Note that components can become smaller than lower if a component in upper is smaller than their corresponding one in in lower.
Definition at line 967 of file mlFloatingPointVector.h.
References ml::FloatingPointVector< T, size, DataContainer >::clampMax(), and ml::FloatingPointVector< T, size, DataContainer >::clampMin().
void ml::FloatingPointVector< T, size, DataContainer >::clampMax | ( | const FloatingPointVector< T, size, DataContainer > & | upper | ) | [inline] |
Calculate and set all components clamped to upper, i.e.
if any component is greater than the corresponding one in upper then it is set to the one from upper.
Definition at line 954 of file mlFloatingPointVector.h.
References ml::FloatingPointVector< T, size, DataContainer >::compMin().
Referenced by ml::FloatingPointVector< T, size, DataContainer >::clamp(), ml::clamp(), and ml::clampMax().
void ml::FloatingPointVector< T, size, DataContainer >::clampMin | ( | const FloatingPointVector< T, size, DataContainer > & | lower | ) | [inline] |
Calculate and set all components clamped to lower, i.e.
if any component is smaller than the corresponding one in lower then it is set to the one from lower.
Definition at line 944 of file mlFloatingPointVector.h.
References ml::FloatingPointVector< T, size, DataContainer >::compMax().
Referenced by ml::FloatingPointVector< T, size, DataContainer >::clamp(), ml::clamp(), and ml::clampMin().
void ml::FloatingPointVector< T, size, DataContainer >::compAbs | ( | ) | [inline] |
Kill negative signs from all components.
Definition at line 899 of file mlFloatingPointVector.h.
References MLAbs().
Referenced by ml::compAbs().
void ml::FloatingPointVector< T, size, DataContainer >::compCeil | ( | ) | [inline] |
Round all components of this vector to integer using ceil(component).
Definition at line 999 of file mlFloatingPointVector.h.
void ml::FloatingPointVector< T, size, DataContainer >::compDiv | ( | const FloatingPointVector< T, size, DataContainer > & | d | ) | [inline] |
Divide each vector component by the corresponding one of d.
Divisions by zero are not handled; the caller must avoid them.
Definition at line 909 of file mlFloatingPointVector.h.
Referenced by ml::compDiv().
void ml::FloatingPointVector< T, size, DataContainer >::compFloor | ( | ) | [inline] |
Round all components of this vector using floor(component).
Definition at line 990 of file mlFloatingPointVector.h.
void ml::FloatingPointVector< T, size, DataContainer >::compMax | ( | FloatingPointVector< T, size, DataContainer > | buffer | ) | [inline] |
Sets the component wise maximum of *this and buffer in *this.
Definition at line 888 of file mlFloatingPointVector.h.
Referenced by ml::compMax().
T ml::FloatingPointVector< T, size, DataContainer >::compMaxAbs | ( | ) | const [inline] |
Return maximum of absolute component values.
Definition at line 864 of file mlFloatingPointVector.h.
References MLAbs().
void ml::FloatingPointVector< T, size, DataContainer >::compMin | ( | FloatingPointVector< T, size, DataContainer > | buffer | ) | [inline] |
Sets the component wise minimum of *this and buffer in *this.
Definition at line 877 of file mlFloatingPointVector.h.
Referenced by ml::compMin().
T ml::FloatingPointVector< T, size, DataContainer >::compMul | ( | ) | const [inline] |
Return product of all vector components.
Definition at line 853 of file mlFloatingPointVector.h.
Referenced by ml::compMul().
void ml::FloatingPointVector< T, size, DataContainer >::compRound | ( | ) | [inline] |
Round all components of this vector using floor(component + 0.5).
Definition at line 981 of file mlFloatingPointVector.h.
void ml::FloatingPointVector< T, size, DataContainer >::compSqr | ( | ) | [inline] |
Calculate and set the square of all components.
Definition at line 918 of file mlFloatingPointVector.h.
Referenced by ml::compSqr().
void ml::FloatingPointVector< T, size, DataContainer >::compSqrt | ( | ) | [inline] |
Calculate and set square root of all components.
Negative values have to be avoided by caller.
Definition at line 928 of file mlFloatingPointVector.h.
Referenced by ml::compSqrt().
T ml::FloatingPointVector< T, size, DataContainer >::compSum | ( | ) | const [inline] |
Return sum of all components.
Definition at line 842 of file mlFloatingPointVector.h.
FloatingPointVector<T, 3, DataContainer> ml::FloatingPointVector< T, size, DataContainer >::cross | ( | const FloatingPointVector< T, 3, DataContainer > & | b | ) | const [inline] |
Cross product for elements, i.e. return vector vertical to *this and b.
Definition at line 264 of file mlFloatingPointVector.h.
FloatingPointVector<T, 3, DataContainer> ml::FloatingPointVector< T, size, DataContainer >::Cross | ( | const FloatingPointVector< T, 3, DataContainer > & | b | ) | const [inline] |
For compatibility with SMLVec3f.
Definition at line 197 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::distance | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
Distance of this vector to a given one.
Definition at line 144 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::Distance | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
For compatibility with SML.
Definition at line 170 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::DistanceSquared | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
For compatibility with SML.
Definition at line 176 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::distanceSquared | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
Squared distance of this vector to a given one.
Definition at line 150 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::Dot | ( | const FloatingPointVector< T, size, DataContainer > & | b | ) | const [inline] |
For compatibility with SML.
Definition at line 182 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::dot | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
Return dot product, i.e.
sum of all components multiplied with corresponding components of buffer.
Definition at line 796 of file mlFloatingPointVector.h.
Referenced by ml::operator*().
size_t ml::FloatingPointVector< T, size, DataContainer >::getSize | ( | ) | const [inline] |
Return number of elements of value buffer.
Definition at line 751 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::length | ( | ) | const [inline] |
Return the length of the vector, i.e. norm2().
Definition at line 824 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::Length | ( | ) | const [inline] |
For compatibility with SML.
Definition at line 166 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::length2 | ( | ) | const [inline] |
Definition at line 190 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::LengthSquared | ( | ) | const [inline] |
For compatibility with SML.
Definition at line 193 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::lengthSquared | ( | ) | const [inline] |
Returns the squared length of the vector.
Definition at line 833 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::norm2 | ( | ) | const [inline] |
Return euclidean norm (the vector length), i.e.
square root of sum of squares of all components.
Definition at line 761 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::norm2 | ( | const FloatingPointVector< T, size, DataContainer > & | weight | ) | const [inline] |
Return weighted euclidean norm, i.e.
square root of sum of squares of all components multiplied with corresponding squared component of weight.
Definition at line 777 of file mlFloatingPointVector.h.
T ml::FloatingPointVector< T, size, DataContainer >::normalize | ( | ) | [inline] |
Normalizes buffer and returns euclidean length of vector before normalization, i.e.norm2.
On zero vector length the vector is left unchanged.
Definition at line 808 of file mlFloatingPointVector.h.
References MLValueIs0WOM().
T ml::FloatingPointVector< T, size, DataContainer >::Normalize | ( | ) | [inline] |
For compatibility with SML.
Definition at line 162 of file mlFloatingPointVector.h.
bool ml::FloatingPointVector< T, size, DataContainer >::operator!= | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
Returns true if any components of *this and buffer are not equal, otherwise false.
Definition at line 679 of file mlFloatingPointVector.h.
References MLValuesDifferWOM().
bool ml::FloatingPointVector< T, size, DataContainer >::operator< | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
Defines an artificial order for use in sort algorithms (lexicographical order).
Starting from the first component(i.e. index 0) all components from *this are compared with the corresponding one in buffer: If the components of *this is smaller than the corresponding one in buffer then true is returned, if the comparison is bigger then false is returned and on equality the components for the next index are compared. If all components are equal then false is returned.
Definition at line 700 of file mlFloatingPointVector.h.
References MLValuesDifferWOM().
FloatingPointVector< T, size, DataContainer > & ml::FloatingPointVector< T, size, DataContainer >::operator= | ( | T | value | ) | [inline] |
Assignment of scalar value to all components.
Definition at line 650 of file mlFloatingPointVector.h.
bool ml::FloatingPointVector< T, size, DataContainer >::operator== | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | const [inline] |
Returns true if *this and buffer are component wise equal, otherwise false.
Definition at line 664 of file mlFloatingPointVector.h.
References MLValuesDifferWOM().
T & ml::FloatingPointVector< T, size, DataContainer >::operator[] | ( | const size_t | i | ) | [inline] |
Indexing operators.
The caller must guarantee that is in [0, size-1]. It is legal to consider all elements as a subsequent array in memory for pointer addressing of all elements.
Definition at line 732 of file mlFloatingPointVector.h.
const T & ml::FloatingPointVector< T, size, DataContainer >::operator[] | ( | const size_t | i | ) | const [inline] |
Constant indexing operators.
The caller must guarantee that is in [0, size-1]. It is legal to consider all elements as a subsequent array in memory for pointer addressing of all elements.
Definition at line 721 of file mlFloatingPointVector.h.
std::istream & ml::FloatingPointVector< T, size, DataContainer >::readIn | ( | std::istream & | is | ) | [inline] |
Read all components from istream is starting starting from index 0 to size-1.
Definition at line 1028 of file mlFloatingPointVector.h.
std::ostream & ml::FloatingPointVector< T, size, DataContainer >::writeOut | ( | std::ostream & | os | ) | const [inline] |
Write all components to ostream os starting from index 0 to size-1.
Each buffer elements is followed separated by a space symbols " ".
Definition at line 1018 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > clamp | ( | FloatingPointVector< T, size, DataContainer > | a, |
const FloatingPointVector< T, size, DataContainer > & | lower, | ||
const FloatingPointVector< T, size, DataContainer > & | upper | ||
) | [related] |
Return new vector with all components from a clamped to range [lower, upper].
Not that that does not hold if components in lower are greater than their corresponding ones in upper. See FloatingPointVector<T, size, DataContainer>::clamp().
Definition at line 578 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > clampMax | ( | FloatingPointVector< T, size, DataContainer > | a, |
const FloatingPointVector< T, size, DataContainer > & | m | ||
) | [related] |
Return new vector with all components from a clamped to maximum m.
See FloatingPointVector<T, size, DataContainer>::clampMax().
Definition at line 563 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > clampMin | ( | FloatingPointVector< T, size, DataContainer > | a, |
const FloatingPointVector< T, size, DataContainer > & | m | ||
) | [related] |
Return new vector with all components from a clamped to minimum m.
See FloatingPointVector<T, size, DataContainer>::clampMin().
Definition at line 550 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > compAbs | ( | FloatingPointVector< T, size, DataContainer > | a | ) | [related] |
Return vector with all components from a without negative sign.
Definition at line 502 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > compDiv | ( | FloatingPointVector< T, size, DataContainer > | a, |
const FloatingPointVector< T, size, DataContainer > & | d | ||
) | [related] |
Component wise division of a / d.
Division by zeros are not handled and must be avoided by caller.
Definition at line 537 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > compMax | ( | FloatingPointVector< T, size, DataContainer > | buffer1, |
const FloatingPointVector< T, size, DataContainer > & | buffer2 | ||
) | [related] |
Component wise maximum of buffer1 and buffer2.
Definition at line 490 of file mlFloatingPointVector.h.
Referenced by ml::FloatingPointVector< T, size, DataContainer >::clampMin().
FloatingPointVector< T, size, DataContainer > compMin | ( | FloatingPointVector< T, size, DataContainer > | buffer1, |
const FloatingPointVector< T, size, DataContainer > & | buffer2 | ||
) | [related] |
Component wise minimum of buffer1 and buffer2.
Definition at line 478 of file mlFloatingPointVector.h.
Referenced by ml::FloatingPointVector< T, size, DataContainer >::clampMax().
T compMul | ( | const FloatingPointVector< T, size, DataContainer > & | a | ) | [related] |
Return product of all components.
Definition at line 592 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > compSqr | ( | FloatingPointVector< T, size, DataContainer > | a | ) | [related] |
Return vector with all components from a squared.
Definition at line 513 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > compSqrt | ( | FloatingPointVector< T, size, DataContainer > | a | ) | [related] |
Return vector with all components from a square-rooted.
Definition at line 525 of file mlFloatingPointVector.h.
bool operator! | ( | const FloatingPointVector< T, size, DataContainer > & | a | ) | [related] |
Returns true if all components are 0, otherwise returns false.
Definition at line 381 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator* | ( | FloatingPointVector< T, size, DataContainer > | lhs, |
MLdouble | rhs | ||
) | [related] |
Component wise multiplication of lhs with rhs.
Definition at line 448 of file mlFloatingPointVector.h.
T operator* | ( | const FloatingPointVector< T, size, DataContainer > & | a, |
const FloatingPointVector< T, size, DataContainer > & | b | ||
) | [related] |
Dot product, returns a.dot(b).
Definition at line 438 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator* | ( | MLdouble | lhs, |
FloatingPointVector< T, size, DataContainer > | rhs | ||
) | [related] |
Component wise multiplication of rhs with lhs.
Definition at line 458 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > & operator*= | ( | FloatingPointVector< T, size, DataContainer > & | op1, |
const FloatingPointVector< T, size, DataContainer > & | op2 | ||
) | [related] |
Arithmetic assignment: Component wise multiplication *this with a vector of the same size.
Definition at line 340 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > & operator*= | ( | FloatingPointVector< T, size, DataContainer > & | op1, |
MLdouble | value | ||
) | [related] |
Arithmetic assignment: Component wise multiplication *this with scalar value.
Arithmetic assignment: Component wise multiplication *this with specialized MLdouble scalar value.
Definition at line 329 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator+ | ( | FloatingPointVector< T, size, DataContainer > | lhs, |
const FloatingPointVector< T, size, DataContainer > & | rhs | ||
) | [related] |
Return value is the component wise addition of lhs and rhs.
Definition at line 393 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator+ | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | [related] |
Unary plus, for completeness and for those who really want to use that...
Definition at line 415 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > & operator+= | ( | FloatingPointVector< T, size, DataContainer > & | op1, |
const FloatingPointVector< T, size, DataContainer > & | buffer | ||
) | [related] |
Arithmetic assignment: Component wise addition.
Definition at line 296 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator- | ( | FloatingPointVector< T, size, DataContainer > | lhs, |
const FloatingPointVector< T, size, DataContainer > & | rhs | ||
) | [related] |
Return value is the component wise subtraction of rhs from lhs.
Definition at line 404 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator- | ( | const FloatingPointVector< T, size, DataContainer > & | buffer | ) | [related] |
Unary minus, all components of the vector are multiplied with -1.
Definition at line 426 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > & operator-= | ( | FloatingPointVector< T, size, DataContainer > & | op1, |
const FloatingPointVector< T, size, DataContainer > & | buffer | ||
) | [related] |
Arithmetic assignment: Component wise subtraction of buffer from *this.
Definition at line 307 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > operator/ | ( | FloatingPointVector< T, size, DataContainer > | lhs, |
MLdouble | rhs | ||
) | [related] |
Component wise division of lhs by specialied rhs of type MLdouble.
Definition at line 468 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > & operator/= | ( | FloatingPointVector< T, size, DataContainer > & | op1, |
const FloatingPointVector< T, size, DataContainer > & | op2 | ||
) | [related] |
Arithmetic assignment: Component wise division of *this by the values of a vector of the same size.
Division by zero is not handled and must be avoided by user.
Definition at line 367 of file mlFloatingPointVector.h.
FloatingPointVector< T, size, DataContainer > & operator/= | ( | FloatingPointVector< T, size, DataContainer > & | op1, |
MLdouble | value | ||
) | [related] |
Arithmetic assignment: Component wise division of *this by scalar value.
Division by zero is not handled and must be avoided by user.
Definition at line 352 of file mlFloatingPointVector.h.