Class translotator::Vector¶
template <size_t N, typename Type>
ClassList > translotator > Vector
#include <Vector.hpp>
Inherits the following classes: translotator::MatrixBase
Public Types inherited from translotator::MatrixBase¶
| Type | Name | 
|---|---|
| typedef Type | DATATYPE   | 
Public Static Attributes¶
| Type | Name | 
|---|---|
| constexpr static ObjectType | OBJECT_TYPE   = = ObjectType::VECTOR | 
Public Static Attributes inherited from translotator::MatrixBase¶
| Type | Name | 
|---|---|
| constexpr static size_t | COLS   = = M | 
| constexpr static bool | MATRIX_BASE   = = true | 
| constexpr static size_t | ROWS   = = N | 
Public Functions¶
| Type | Name | 
|---|---|
| Vector< 3, Type > | cross (const Vector< 3, Type > & other) const cross product operation  | 
| Type | dot (const Vector< N, Type > & other) const in-place normalize  | 
| Type | norm () const | 
| Type | normSquared () const return norm of vector  | 
| void | normalize ()  | 
| Vector< N, Type > | normalized () const return squared norm of vector  | 
| Type & | operator[] (size_t i)  | 
| const Type & | operator[] (size_t i) const | 
| SquareMatrix< 3, Type > | toCrossMatrix () const convert to cross matrix  | 
| SquareMatrix< N, Type > | toDiagMatrix () const convert to diagonal matrix  | 
Public Functions inherited from translotator::MatrixBase¶
| Type | Name | 
|---|---|
| MatrixBase () = default Returns the number of columns.  | 
|
| MatrixBase (const MatrixBase & other) = default | 
|
| MatrixBase (const Type data)  | 
|
| MatrixBase (const Type data)  | 
|
| MatrixBase (const initializer_list< N *M, Type > & list)  Initializer list constructor.  | 
|
| auto | T () const Transpose.  | 
| Matrix< P, Q, Type > | block (size_t i, size_t j) const Returns a block of the matrix.  | 
| Matrix< P, Q, Type > | block () const Returns a block of the matrix.  | 
| ComplexNum< Type > | cast2ComplexNum () const Casts the object to a complex number by copying.  | 
| ComplexNum< Type > & | cast2ComplexNumRef ()  Casts the object to a complex number reference without copying.  | 
| DualNumber< Type > | cast2DualNumber () const Casts the object to a dual number by copying.  | 
| DualNumber< Type > & | cast2DualNumberRef ()  Casts the object to a dual number reference without copying.  | 
| DualQuaternion< Type > | cast2DualQuaternion () const Casts the object to a dual quaternion by copying.  | 
| DualQuaternion< Type > & | cast2DualQuaternionRef ()  Casts the object to a dual quaternion reference without copying.  | 
| Matrix< N, M, Type > | cast2Matrix () const Casts the object to a different matrix type by copying.  | 
| Matrix< N, M, Type > & | cast2MatrixRef ()  Casts the object to a matrix reference without copying.  | 
| Quaternion< Type > | cast2Quaternion () const Casts the object to a quaternion by copying.  | 
| Quaternion< Type > & | cast2QuaternionRef ()  Casts the object to a quaternion reference without copying.  | 
| SOGroup< N, Type > | cast2SOGroup () const Casts the object to a special orthogonal group by copying.  | 
| SOGroup< N, Type > & | cast2SOGroupRef ()  Casts the object to a special orthogonal group reference without copying.  | 
| SquareMatrix< N, Type > | cast2SquareMatrix () const Casts the object to a square matrix by copying.  | 
| SquareMatrix< N, Type > & | cast2SquareMatrixRef ()  Casts the object to a square matrix reference without copying.  | 
| UnitComplexNum< Type > | cast2UnitComplexNum () const Casts the object to a unit complex number by copying.  | 
| UnitComplexNum< Type > & | cast2UnitComplexNumRef ()  Casts the object to a unit complex number reference without copying.  | 
| UnitDualQuaternion< Type > | cast2UnitDualQuaternion () const Casts the object to a unit dual quaternion by copying.  | 
| UnitDualQuaternion< Type > & | cast2UnitDualQuaternionRef ()  Casts the object to a unit dual quaternion reference without copying.  | 
| UnitQuaternion< Type > | cast2UnitQuaternion () const Casts the object to a unit quaternion by copying.  | 
| UnitQuaternion< Type > & | cast2UnitQuaternionRef ()  Casts the object to a unit quaternion reference without copying.  | 
| Vector< N, Type > | cast2Vector () const Casts the object to a vector by copying.  | 
| Vector< N, Type > & | cast2VectorRef ()  Casts the object to a vector reference without copying.  | 
| NewContainer | castContainer () const Casts the matrix to a different container type by copying.  | 
| NewContainer & | castContainerRef ()  Casts the object to a different container reference without copying.  | 
| NewDerived & | castContainerRef ()  | 
| auto | castDataType () const Returns the Frobenius norm.  | 
| Matrix< N, 1, Type > | col (size_t j) const Returns the j-th column.  | 
| void | copyTo (Type * data) const Returns the raw data pointer.  | 
| void | fill (const Type & v)  Fills the matrix with a value.  | 
| Type | frobeniusNorm () const | 
| Type | frobeniusNormSquared () const Returns the squared Frobenius norm.  | 
| Type * | getData () const | 
| const Type & | operator() (size_t i, size_t j) const Accesses the element at (i, j)  | 
| Type & | operator() (size_t i, size_t j)  Accesses the element at (i, j)  | 
| auto | operator* (const OtherDerived & other) const Matrix multiplication.  | 
| Derived | operator* (const Type & v) const Matrix multiplication by scalar.  | 
| void | operator*= (const OtherDerived & other)  Matrix multiplication by scalar.  | 
| Derived | operator+ (const OtherDerived & other) const Multiplication by scalar.  | 
| void | operator+= (const OtherDerived & other)  Matrix division by scalar.  | 
| Derived | operator- (const OtherDerived & other) const Matrix subtraction.  | 
| Derived | operator- () const Matrix multiplication by scalar.  | 
| void | operator-= (const OtherDerived & other)  Matrix subtraction by scalar.  | 
| Derived | operator/ (Type v) const Division by scalar.  | 
| void | operator/= (Type v)  Division by scalar.  | 
| Derived & | operator= (const Derived & other)  Copies the data to the given pointer.  | 
| void | print () const Prints the matrix.  | 
| Matrix< 1, M, Type > | row (size_t i) const Returns the i-th row.  | 
| Derived & | setBlock (size_t i, size_t j, const OtherDerived & block)  Sets the element at (i, j)  | 
| Derived & | setBlock (const OtherDerived & block)  Sets the i-th row.  | 
| Derived & | setCol (size_t j, const OtherDerived & col)  Sets the j-th column.  | 
| Derived & | setCol (const OtherDerived & col)  Sets the j-th column.  | 
| Derived & | setRow (size_t i, const OtherDerived & row)  Sets the i-th row.  | 
| Derived & | setRow (const OtherDerived & row)  Sets the i-th row.  | 
| void | swapCols (size_t j1, size_t j2)  Swaps two columns.  | 
| void | swapRows (size_t i1, size_t i2)  Swaps two rows.  | 
| Type | toScalar () const Casts the matrix to a scalar if it is a 1x1 matrix.  | 
Public Static Functions inherited from translotator::MatrixBase¶
| Type | Name | 
|---|---|
| Derived | NaN ()  Returns a matrix filled with NaN.  | 
| constexpr static size_t | colSize ()  Returns the number of rows.  | 
| Derived | eye ()  Returns an identity matrix.  | 
| Derived | ones ()  Returns a matrix filled with ones.  | 
| constexpr static size_t | rowSize ()  | 
| Derived | zeros ()  Returns a matrix filled with zeros.  | 
Protected Attributes inherited from translotator::MatrixBase¶
| Type | Name | 
|---|---|
| Type | data_   | 
Detailed Description¶
Template parameters:
Nvector sizeTypefloating point type
Vector class is a class that represents a vector.
Public Static Attributes Documentation¶
variable OBJECT_TYPE¶
constexpr static ObjectType translotator::Vector< N, Type >::OBJECT_TYPE;
Public Functions Documentation¶
function cross¶
cross product operation
template<size_t Dim, typename>
inline Vector < 3, Type > translotator::Vector::cross (
    const Vector < 3, Type > & other
) const
Note:
only for 3D vector
function dot¶
in-place normalize
inline Type translotator::Vector::dot (
    const Vector < N, Type > & other
) const
Vector utils dot product
function norm¶
inline Type translotator::Vector::norm () const
function normSquared¶
inline Type translotator::Vector::normSquared () const
function normalize¶
inline void translotator::Vector::normalize () 
function normalized¶
return squared norm of vector
inline Vector < N, Type > translotator::Vector::normalized () const
return normalized vector
function operator[]¶
inline Type & translotator::Vector::operator[] (
    size_t i
) 
Vector Specialized Accessors
function operator[]¶
inline const Type & translotator::Vector::operator[] (
    size_t i
) const
function toCrossMatrix¶
convert to cross matrix
template<size_t Dim, typename>
inline SquareMatrix < 3, Type > translotator::Vector::toCrossMatrix () const
Note:
only for 3D vector
function toDiagMatrix¶
inline SquareMatrix < N, Type > translotator::Vector::toDiagMatrix () const
The documentation for this class was generated from the following file include/translotator/objects/Vector.hpp