Developer Documentation
Loading...
Searching...
No Matches
OpenVolumeMesh::Geometry::VectorT< Scalar, DIM > Class Template Reference

Public Types

typedef Scalar value_type
 the type of the scalar used in this template
 
typedef VectorT< Scalar, DIM > vector_type
 type of this vector
 

Public Member Functions

constexpr VectorT ()
 default constructor creates uninitialized values.
 
 VectorT (const Scalar &v)
 
template<typename ... T, typename = typename std::enable_if<sizeof...(T) == DIM>::type, typename = typename std::enable_if< are_convertible_to<Scalar, T...>::value>::type>
constexpr VectorT (T... vs)
 
 VectorT (const VectorT &rhs)=default
 
 VectorT (VectorT &&rhs)=default
 
VectorToperator= (const VectorT &rhs)=default
 
VectorToperator= (VectorT &&rhs)=default
 
template<typename S = Scalar, int D = DIM>
auto homogenized () const -> typename std::enable_if< D==4, VectorT< decltype(std::declval< S >()/std::declval< S >()), DIM > >::type
 
template<typename Iterator , typename = decltype( *std::declval<Iterator&>(), void(), ++std::declval<Iterator&>(), void())>
 VectorT (Iterator it)
 construct from a value array or any other iterator
 
template<typename otherScalarType , typename = typename std::enable_if< std::is_convertible<otherScalarType, Scalar>::value>>
 VectorT (const VectorT< otherScalarType, DIM > &_rhs)
 copy & cast constructor (explicit)
 
template<typename OtherScalar , typename = typename std::enable_if< std::is_convertible<OtherScalar, Scalar>::value>>
vector_typeoperator= (const VectorT< OtherScalar, DIM > &_rhs)
 cast from vector with a different scalar type
 
Scalar * data ()
 access to Scalar array
 
const Scalar * data () const
 access to const Scalar array
 
Scalar & operator[] (size_t _i)
 get i'th element read-write
 
const Scalar & operator[] (size_t _i) const
 get i'th element read-only
 
bool operator== (const vector_type &_rhs) const
 component-wise comparison
 
bool operator!= (const vector_type &_rhs) const
 component-wise comparison
 
template<typename OtherScalar >
auto operator*= (const OtherScalar &_s) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0] *_s), Scalar >::value, VectorT< Scalar, DIM > & >::type
 component-wise self-multiplication with scalar
 
template<typename OtherScalar >
auto operator/= (const OtherScalar &_s) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0]/_s), Scalar >::value, VectorT< Scalar, DIM > & >::type
 component-wise self-division by scalar
 
VectorT< Scalar, DIM > ::type operator* (const OtherScalar &_s) const
 
VectorT< Scalar, DIM > ::type operator/ (const OtherScalar &_s) const
 
template<typename OtherScalar >
auto operator*= (const VectorT< OtherScalar, DIM > &_rhs) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0] **_rhs.data()), Scalar >::value, vector_type & >::type
 component-wise self-multiplication
 
template<typename OtherScalar >
auto operator/= (const VectorT< OtherScalar, DIM > &_rhs) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0]/*_rhs.data()), Scalar >::value, vector_type & >::type
 component-wise self-division
 
template<typename OtherScalar >
auto operator-= (const VectorT< OtherScalar, DIM > &_rhs) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0] - *_rhs.data()), Scalar >::value, vector_type & >::type
 vector difference from this
 
template<typename OtherScalar >
auto operator+= (const VectorT< OtherScalar, DIM > &_rhs) -> typename std::enable_if< std::is_convertible< decltype(this->values_[0]+ *_rhs.data()), Scalar >::value, vector_type & >::type
 vector self-addition
 
template<typename OtherScalar >
auto operator* (const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< std::is_convertible< decltype(this->values_[0] **_rhs.data()), Scalar >::value, vector_type >::type
 component-wise vector multiplication
 
template<typename OtherScalar >
auto operator/ (const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< std::is_convertible< decltype(this->values_[0]/*_rhs.data()), Scalar >::value, vector_type >::type
 component-wise vector division
 
template<typename OtherScalar >
auto operator+ (const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< std::is_convertible< decltype(this->values_[0]+ *_rhs.data()), Scalar >::value, vector_type >::type
 component-wise vector addition
 
template<typename OtherScalar >
auto operator- (const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< std::is_convertible< decltype(this->values_[0] - *_rhs.data()), Scalar >::value, vector_type >::type
 component-wise vector difference
 
vector_type operator- (void) const
 unary minus
 
template<typename OtherScalar >
auto operator% (const VectorT< OtherScalar, DIM > &_rhs) const -> typename std::enable_if< DIM==3, VectorT< decltype(this->values_[0] *_rhs[0] - this->values_[0] *_rhs[0]), DIM > >::type
 
template<typename OtherScalar >
auto cross (const VectorT< OtherScalar, DIM > &_rhs) const -> decltype(*this % _rhs)
 
template<typename OtherScalar >
auto operator| (const VectorT< OtherScalar, DIM > &_rhs) const -> decltype(*this->data() **_rhs.data())
 
template<typename OtherScalar >
auto dot (const VectorT< OtherScalar, DIM > &_rhs) const -> decltype(*this|_rhs)
 
Euclidean norm calculations
template<typename S = Scalar>
decltype(std::declval< S >() *std::declval< S >()) sqrnorm () const
 compute squared euclidean norm
 
template<typename S = Scalar>
auto norm () const -> decltype(std::sqrt(std::declval< VectorT< S, DIM > >().sqrnorm()))
 compute euclidean norm
 
template<typename S = Scalar>
auto length () const -> decltype(std::declval< VectorT< S, DIM > >().norm())
 compute squared euclidean norm
 
template<typename S = Scalar>
auto normalize () -> decltype(*this/=std::declval< VectorT< S, DIM > >().norm())
 
template<typename S = Scalar>
auto normalized () const -> decltype(*this/std::declval< VectorT< S, DIM > >().norm())
 
vector_type &::type normalize_cond ()
 compute squared euclidean norm
 
Non-Euclidean norm calculations
Scalar l1_norm () const
 compute L1 (Manhattan) norm
 
Scalar l8_norm () const
 compute l8_norm
 

Static Public Member Functions

static constexpr int dim ()
 returns dimension of the vector (deprecated)
 
static constexpr size_t size ()
 returns dimension of the vector
 

Static Public Attributes

static constexpr const size_t size_ = DIM
 

Private Types

using container = std::array< Scalar, DIM >
 

Private Attributes

container values_
 

Component iterators

using iterator = typename container::iterator
 
using const_iterator = typename container::const_iterator
 
using reverse_iterator = typename container::reverse_iterator
 
using const_reverse_iterator = typename container::const_reverse_iterator
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
reverse_iterator rbegin () noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
reverse_iterator rend () noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crend () const noexcept
 

Minimum maximum and mean

static vector_type vectorized (const Scalar &_s)
 store the same value in each component
 
Scalar max () const
 return the maximal component
 
Scalar max_abs () const
 return the maximal absolute component
 
Scalar min () const
 return the minimal component
 
Scalar min_abs () const
 return the minimal absolute component
 
Scalar mean () const
 return arithmetic mean
 
Scalar mean_abs () const
 return absolute arithmetic mean
 
vector_typeminimize (const vector_type &_rhs)
 minimize values: same as *this = min(*this, _rhs), but faster
 
bool minimized (const vector_type &_rhs)
 minimize values and signalize coordinate minimization
 
vector_typemaximize (const vector_type &_rhs)
 maximize values: same as *this = max(*this, _rhs), but faster
 
bool maximized (const vector_type &_rhs)
 maximize values and signalize coordinate maximization
 
vector_type min (const vector_type &_rhs) const
 component-wise min
 
vector_type max (const vector_type &_rhs) const
 component-wise max
 
template<typename Functor >
vector_type apply (const Functor &_func) const
 component-wise apply function object with Scalar operator()(Scalar).
 
vector_typevectorize (const Scalar &_s)
 store the same value in each component (e.g. to clear all entries)
 
bool operator< (const vector_type &_rhs) const
 lexicographical comparison
 
void swap (VectorT &_other) noexcept(noexcept(std::swap(values_, _other.values_)))
 swap with another vector
 

Detailed Description

template<typename Scalar, int DIM>
class OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >

Definition at line 78 of file Vector11T.hh.

Member Typedef Documentation

◆ const_iterator

template<typename Scalar , int DIM>
using OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::const_iterator = typename container::const_iterator

Definition at line 660 of file Vector11T.hh.

◆ const_reverse_iterator

template<typename Scalar , int DIM>
using OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::const_reverse_iterator = typename container::const_reverse_iterator

Definition at line 662 of file Vector11T.hh.

◆ container

template<typename Scalar , int DIM>
using OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::container = std::array<Scalar, DIM>
private

Definition at line 84 of file Vector11T.hh.

◆ iterator

template<typename Scalar , int DIM>
using OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::iterator = typename container::iterator

Definition at line 659 of file Vector11T.hh.

◆ reverse_iterator

template<typename Scalar , int DIM>
using OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::reverse_iterator = typename container::reverse_iterator

Definition at line 661 of file Vector11T.hh.

◆ value_type

template<typename Scalar , int DIM>
typedef Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::value_type

the type of the scalar used in this template

Definition at line 92 of file Vector11T.hh.

◆ vector_type

template<typename Scalar , int DIM>
typedef VectorT<Scalar, DIM> OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::vector_type

type of this vector

Definition at line 95 of file Vector11T.hh.

Constructor & Destructor Documentation

◆ VectorT() [1/5]

template<typename Scalar , int DIM>
constexpr OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::VectorT ( )
inlineconstexpr

default constructor creates uninitialized values.

Definition at line 112 of file Vector11T.hh.

◆ VectorT() [2/5]

template<typename Scalar , int DIM>
OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::VectorT ( const Scalar &  v)
inlineexplicit

Creates a vector with all components set to v.

Definition at line 117 of file Vector11T.hh.

◆ VectorT() [3/5]

template<typename Scalar , int DIM>
template<typename ... T, typename = typename std::enable_if<sizeof...(T) == DIM>::type, typename = typename std::enable_if< are_convertible_to<Scalar, T...>::value>::type>
constexpr OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::VectorT ( T...  vs)
inlineconstexpr

Definition at line 126 of file Vector11T.hh.

◆ VectorT() [4/5]

template<typename Scalar , int DIM>
template<typename Iterator , typename = decltype( *std::declval<Iterator&>(), void(), ++std::declval<Iterator&>(), void())>
OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::VectorT ( Iterator  it)
inlineexplicit

construct from a value array or any other iterator

Definition at line 164 of file Vector11T.hh.

◆ VectorT() [5/5]

template<typename Scalar , int DIM>
template<typename otherScalarType , typename = typename std::enable_if< std::is_convertible<otherScalarType, Scalar>::value>>
OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::VectorT ( const VectorT< otherScalarType, DIM > &  _rhs)
inlineexplicit

copy & cast constructor (explicit)

Definition at line 172 of file Vector11T.hh.

Member Function Documentation

◆ apply()

template<typename Scalar , int DIM>
template<typename Functor >
vector_type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::apply ( const Functor &  _func) const
inline

component-wise apply function object with Scalar operator()(Scalar).

Definition at line 623 of file Vector11T.hh.

◆ begin() [1/2]

template<typename Scalar , int DIM>
const_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::begin ( ) const
inlinenoexcept

Definition at line 665 of file Vector11T.hh.

◆ begin() [2/2]

template<typename Scalar , int DIM>
iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::begin ( )
inlinenoexcept

Definition at line 664 of file Vector11T.hh.

◆ cbegin()

template<typename Scalar , int DIM>
const_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::cbegin ( ) const
inlinenoexcept

Definition at line 666 of file Vector11T.hh.

◆ cend()

template<typename Scalar , int DIM>
const_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::cend ( ) const
inlinenoexcept

Definition at line 670 of file Vector11T.hh.

◆ crbegin()

template<typename Scalar , int DIM>
const_reverse_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::crbegin ( ) const
inlinenoexcept

Definition at line 674 of file Vector11T.hh.

◆ crend()

template<typename Scalar , int DIM>
const_reverse_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::crend ( ) const
inlinenoexcept

Definition at line 678 of file Vector11T.hh.

◆ cross()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::cross ( const VectorT< OtherScalar, DIM > &  _rhs) const -> decltype(*this % _rhs)
inline

cross product: only defined for Vec3* as specialization

See also
OpenVolumeMesh::cross and .cross()

Definition at line 382 of file Vector11T.hh.

◆ data() [1/2]

template<typename Scalar , int DIM>
Scalar * OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::data ( )
inline

access to Scalar array

Definition at line 193 of file Vector11T.hh.

◆ data() [2/2]

template<typename Scalar , int DIM>
const Scalar * OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::data ( ) const
inline

access to const Scalar array

Definition at line 196 of file Vector11T.hh.

◆ dim()

template<typename Scalar , int DIM>
static constexpr int OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::dim ( )
inlinestaticconstexpr

returns dimension of the vector (deprecated)

Definition at line 98 of file Vector11T.hh.

◆ dot()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::dot ( const VectorT< OtherScalar, DIM > &  _rhs) const -> decltype(*this | _rhs)
inline

compute scalar product

See also
OpenVolumeMesh::dot and .operator|

Definition at line 401 of file Vector11T.hh.

◆ end() [1/2]

template<typename Scalar , int DIM>
const_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::end ( ) const
inlinenoexcept

Definition at line 669 of file Vector11T.hh.

◆ end() [2/2]

template<typename Scalar , int DIM>
iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::end ( )
inlinenoexcept

Definition at line 668 of file Vector11T.hh.

◆ homogenized()

template<typename Scalar , int DIM>
template<typename S = Scalar, int D = DIM>
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::homogenized ( ) const -> typename std::enable_if<D == 4, VectorT<decltype(std::declval<S>()/std::declval<S>()), DIM>>::type
inline

Only for 4-component vectors with division operator on their Scalar: Dehomogenization.

Definition at line 144 of file Vector11T.hh.

◆ l1_norm()

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::l1_norm ( ) const
inline

compute L1 (Manhattan) norm

Definition at line 492 of file Vector11T.hh.

◆ l8_norm()

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::l8_norm ( ) const
inline

compute l8_norm

Definition at line 498 of file Vector11T.hh.

◆ length()

template<typename Scalar , int DIM>
template<typename S = Scalar>
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::length ( ) const -> decltype(std::declval<VectorT<S, DIM>>().norm())
inline

compute squared euclidean norm

Definition at line 435 of file Vector11T.hh.

◆ max() [1/2]

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::max ( ) const
inline

return the maximal component

Definition at line 510 of file Vector11T.hh.

◆ max() [2/2]

template<typename Scalar , int DIM>
vector_type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::max ( const vector_type _rhs) const
inline

component-wise max

Definition at line 613 of file Vector11T.hh.

◆ max_abs()

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::max_abs ( ) const
inline

return the maximal absolute component

Definition at line 515 of file Vector11T.hh.

◆ maximize()

template<typename Scalar , int DIM>
vector_type & OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::maximize ( const vector_type _rhs)
inline

maximize values: same as *this = max(*this, _rhs), but faster

Definition at line 580 of file Vector11T.hh.

◆ maximized()

template<typename Scalar , int DIM>
bool OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::maximized ( const vector_type _rhs)
inline

maximize values and signalize coordinate maximization

Definition at line 591 of file Vector11T.hh.

◆ mean()

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::mean ( ) const
inline

return arithmetic mean

Definition at line 538 of file Vector11T.hh.

◆ mean_abs()

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::mean_abs ( ) const
inline

return absolute arithmetic mean

Definition at line 543 of file Vector11T.hh.

◆ min() [1/2]

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::min ( ) const
inline

return the minimal component

Definition at line 524 of file Vector11T.hh.

◆ min() [2/2]

template<typename Scalar , int DIM>
vector_type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::min ( const vector_type _rhs) const
inline

component-wise min

Definition at line 608 of file Vector11T.hh.

◆ min_abs()

template<typename Scalar , int DIM>
Scalar OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::min_abs ( ) const
inline

return the minimal absolute component

Definition at line 529 of file Vector11T.hh.

◆ minimize()

template<typename Scalar , int DIM>
vector_type & OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::minimize ( const vector_type _rhs)
inline

minimize values: same as *this = min(*this, _rhs), but faster

Definition at line 552 of file Vector11T.hh.

◆ minimized()

template<typename Scalar , int DIM>
bool OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::minimized ( const vector_type _rhs)
inline

minimize values and signalize coordinate minimization

Definition at line 563 of file Vector11T.hh.

◆ norm()

template<typename Scalar , int DIM>
template<typename S = Scalar>
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::norm ( ) const -> decltype(std::sqrt(std::declval<VectorT<S, DIM>>().sqrnorm()))
inline

compute euclidean norm

Definition at line 426 of file Vector11T.hh.

◆ normalize()

template<typename Scalar , int DIM>
template<typename S = Scalar>
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::normalize ( ) -> decltype(*this /= std::declval<VectorT<S, DIM>>().norm())
inline

normalize vector, return normalized vector

Definition at line 446 of file Vector11T.hh.

◆ normalize_cond()

template<typename Scalar , int DIM>
vector_type &::type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::normalize_cond ( )
inline

compute squared euclidean norm

Definition at line 473 of file Vector11T.hh.

◆ normalized()

template<typename Scalar , int DIM>
template<typename S = Scalar>
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::normalized ( ) const -> decltype(*this / std::declval<VectorT<S, DIM>>().norm())
inline

return normalized vector

Definition at line 457 of file Vector11T.hh.

◆ operator!=()

template<typename Scalar , int DIM>
bool OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator!= ( const vector_type _rhs) const
inline

component-wise comparison

Definition at line 220 of file Vector11T.hh.

◆ operator%()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator% ( const VectorT< OtherScalar, DIM > &  _rhs) const -> typename std::enable_if<DIM == 3, VectorT<decltype(this->values_[0] * _rhs[0] - this->values_[0] * _rhs[0]), DIM>>::type
inline

cross product: only defined for Vec3* as specialization

See also
OpenVolumeMesh::cross

Definition at line 367 of file Vector11T.hh.

◆ operator*() [1/2]

template<typename Scalar , int DIM>
VectorT< Scalar, DIM > ::type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator* ( const OtherScalar &  _s) const
inline

Definition at line 256 of file Vector11T.hh.

◆ operator*() [2/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator* ( const VectorT< OtherScalar, DIM > &  _rhs) const -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] * *_rhs.data()), Scalar>::value, vector_type>::type
inline

component-wise vector multiplication

Definition at line 322 of file Vector11T.hh.

◆ operator*=() [1/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator*= ( const OtherScalar &  _s) -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] * _s), Scalar>::value, VectorT<Scalar, DIM>&>::type
inline

component-wise self-multiplication with scalar

Definition at line 228 of file Vector11T.hh.

◆ operator*=() [2/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator*= ( const VectorT< OtherScalar, DIM > &  _rhs) -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] * *_rhs.data()), Scalar>::value, vector_type&>::type
inline

component-wise self-multiplication

Definition at line 274 of file Vector11T.hh.

◆ operator+()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator+ ( const VectorT< OtherScalar, DIM > &  _rhs) const -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] + *_rhs.data()), Scalar>::value, vector_type>::type
inline

component-wise vector addition

Definition at line 340 of file Vector11T.hh.

◆ operator+=()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator+= ( const VectorT< OtherScalar, DIM > &  _rhs) -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] + *_rhs.data()), Scalar>::value, vector_type&>::type
inline

vector self-addition

Definition at line 310 of file Vector11T.hh.

◆ operator-() [1/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator- ( const VectorT< OtherScalar, DIM > &  _rhs) const -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] - *_rhs.data()), Scalar>::value, vector_type>::type
inline

component-wise vector difference

Definition at line 349 of file Vector11T.hh.

◆ operator-() [2/2]

template<typename Scalar , int DIM>
vector_type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator- ( void  ) const
inline

unary minus

Definition at line 357 of file Vector11T.hh.

◆ operator-=()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator-= ( const VectorT< OtherScalar, DIM > &  _rhs) -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] - *_rhs.data()), Scalar>::value, vector_type&>::type
inline

vector difference from this

Definition at line 298 of file Vector11T.hh.

◆ operator/() [1/2]

template<typename Scalar , int DIM>
VectorT< Scalar, DIM > ::type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator/ ( const OtherScalar &  _s) const
inline

Definition at line 266 of file Vector11T.hh.

◆ operator/() [2/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator/ ( const VectorT< OtherScalar, DIM > &  _rhs) const -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] / *_rhs.data()), Scalar>::value, vector_type>::type
inline

component-wise vector division

Definition at line 331 of file Vector11T.hh.

◆ operator/=() [1/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator/= ( const OtherScalar &  _s) -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] / _s), Scalar>::value, VectorT<Scalar, DIM>&>::type
inline

component-wise self-division by scalar

Definition at line 240 of file Vector11T.hh.

◆ operator/=() [2/2]

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator/= ( const VectorT< OtherScalar, DIM > &  _rhs) -> typename std::enable_if<std::is_convertible< decltype(this->values_[0] / *_rhs.data()), Scalar>::value, vector_type&>::type
inline

component-wise self-division

Definition at line 286 of file Vector11T.hh.

◆ operator<()

template<typename Scalar , int DIM>
bool OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator< ( const vector_type _rhs) const
inline

lexicographical comparison

Definition at line 642 of file Vector11T.hh.

◆ operator=()

template<typename Scalar , int DIM>
template<typename OtherScalar , typename = typename std::enable_if< std::is_convertible<OtherScalar, Scalar>::value>>
vector_type & OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator= ( const VectorT< OtherScalar, DIM > &  _rhs)
inline

cast from vector with a different scalar type

Definition at line 183 of file Vector11T.hh.

◆ operator==()

template<typename Scalar , int DIM>
bool OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator== ( const vector_type _rhs) const
inline

component-wise comparison

Definition at line 215 of file Vector11T.hh.

◆ operator[]() [1/2]

template<typename Scalar , int DIM>
Scalar & OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator[] ( size_t  _i)
inline

get i'th element read-write

Definition at line 201 of file Vector11T.hh.

◆ operator[]() [2/2]

template<typename Scalar , int DIM>
const Scalar & OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator[] ( size_t  _i) const
inline

get i'th element read-only

Definition at line 207 of file Vector11T.hh.

◆ operator|()

template<typename Scalar , int DIM>
template<typename OtherScalar >
auto OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::operator| ( const VectorT< OtherScalar, DIM > &  _rhs) const -> decltype(*this->data() * *_rhs.data())
inline

compute scalar product

See also
OpenVolumeMesh::dot and .dot()

Definition at line 391 of file Vector11T.hh.

◆ rbegin() [1/2]

template<typename Scalar , int DIM>
const_reverse_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::rbegin ( ) const
inlinenoexcept

Definition at line 673 of file Vector11T.hh.

◆ rbegin() [2/2]

template<typename Scalar , int DIM>
reverse_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::rbegin ( )
inlinenoexcept

Definition at line 672 of file Vector11T.hh.

◆ rend() [1/2]

template<typename Scalar , int DIM>
const_reverse_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::rend ( ) const
inlinenoexcept

Definition at line 677 of file Vector11T.hh.

◆ rend() [2/2]

template<typename Scalar , int DIM>
reverse_iterator OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::rend ( )
inlinenoexcept

Definition at line 676 of file Vector11T.hh.

◆ size()

template<typename Scalar , int DIM>
static constexpr size_t OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::size ( )
inlinestaticconstexpr

returns dimension of the vector

Definition at line 103 of file Vector11T.hh.

◆ sqrnorm()

template<typename Scalar , int DIM>
template<typename S = Scalar>
decltype(std::declval< S >() *std::declval< S >()) OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::sqrnorm ( ) const
inline

compute squared euclidean norm

Definition at line 414 of file Vector11T.hh.

◆ swap()

template<typename Scalar , int DIM>
void OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::swap ( VectorT< Scalar, DIM > &  _other)
inlinenoexcept

swap with another vector

Definition at line 649 of file Vector11T.hh.

◆ vectorize()

template<typename Scalar , int DIM>
vector_type & OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::vectorize ( const Scalar &  _s)
inline

store the same value in each component (e.g. to clear all entries)

Definition at line 631 of file Vector11T.hh.

◆ vectorized()

template<typename Scalar , int DIM>
static vector_type OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::vectorized ( const Scalar &  _s)
inlinestatic

store the same value in each component

Definition at line 637 of file Vector11T.hh.

Member Data Documentation

◆ size_

template<typename Scalar , int DIM>
constexpr const size_t OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::size_ = DIM
staticconstexpr

Definition at line 107 of file Vector11T.hh.

◆ values_

template<typename Scalar , int DIM>
container OpenVolumeMesh::Geometry::VectorT< Scalar, DIM >::values_
private

Definition at line 85 of file Vector11T.hh.


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