15#ifndef __NumericVectorWithOffset_H__
16#define __NumericVectorWithOffset_H__
46template <
class T,
class elemT>
56 using base_type::base_type;
70 swap(
static_cast<base_type&
>(first),
static_cast<base_type&
>(second));
136 template <
typename elemT2>
inline implementations for stir::NumericVectorWithOffset
defines the stir::VectorWithOffset class
NumericVectorWithOffset(const NumericVectorWithOffset &t)
Constructor from an object of this class' base_type.
Definition NumericVectorWithOffset.h:62
NumericVectorWithOffset & operator=(const NumericVectorWithOffset &other)
assignment
Definition NumericVectorWithOffset.inl:46
NumericVectorWithOffset & operator*=(const elemT &v)
multiplying the elements of the current vector with an elemT
NumericVectorWithOffset operator+(const NumericVectorWithOffset &v) const
adding vectors, element by element
Definition NumericVectorWithOffset.inl:55
NumericVectorWithOffset operator-(const elemT &v) const
return a new vector with elements equal to the difference of the elements in the original and the ele...
NumericVectorWithOffset operator/(const NumericVectorWithOffset &v) const
dividing vectors, element by element
Definition NumericVectorWithOffset.inl:85
NumericVectorWithOffset operator*(const elemT &v) const
return a new vector with elements equal to the multiplication of the elements in the original and the...
NumericVectorWithOffset & operator-=(const elemT &v)
subtracting an elemT from the elements of the current vector
void xapyb(const NumericVectorWithOffset &x, const elemT a, const NumericVectorWithOffset &y, const elemT b)
set values of the array to x*a+y*b, where a and b are scalar
NumericVectorWithOffset operator*(const NumericVectorWithOffset &v) const
multiplying vectors, element by element
Definition NumericVectorWithOffset.inl:75
void xapyb(const NumericVectorWithOffset &x, const NumericVectorWithOffset &a, const NumericVectorWithOffset &y, const NumericVectorWithOffset &b)
set the values of the array to x*a+y*b, where a and b are vectors
Definition NumericVectorWithOffset.inl:301
NumericVectorWithOffset & operator+=(const NumericVectorWithOffset &v)
adding elements of v to the current vector
Definition NumericVectorWithOffset.inl:137
NumericVectorWithOffset operator/(const elemT &v) const
return a new vector with elements equal to the division of the elements in the original and the elemT
NumericVectorWithOffset operator-(const NumericVectorWithOffset &v) const
subtracting vectors, element by element
Definition NumericVectorWithOffset.inl:65
NumericVectorWithOffset & operator+=(const elemT &v)
adding an elemT to the elements of the current vector
NumericVectorWithOffset & operator/=(const NumericVectorWithOffset &v)
dividing all elements of the current vector by elements of v
Definition NumericVectorWithOffset.inl:202
void sapyb(const T2 &a, const NumericVectorWithOffset &y, const T2 &b)
set the values of the array to self*a+y*b, where a and b are scalar or vectors
Definition NumericVectorWithOffset.inl:328
NumericVectorWithOffset(const VectorWithOffset< T > &t)
Constructor from an object of this class' base_type.
Definition NumericVectorWithOffset.inl:32
NumericVectorWithOffset & operator/=(const elemT &v)
dividing the elements of the current vector by an elemT
NumericVectorWithOffset(NumericVectorWithOffset &&other) noexcept
move constructor
NumericVectorWithOffset operator+(const elemT &v) const
return a new vector with elements equal to the sum of the elements in the original and the elemT
NumericVectorWithOffset & operator-=(const NumericVectorWithOffset &v)
subtracting elements of v from the current vector
Definition NumericVectorWithOffset.inl:155
friend void swap(NumericVectorWithOffset &first, NumericVectorWithOffset &second)
Swap content/members of 2 objects.
Definition NumericVectorWithOffset.h:68
STIR_DEPRECATED void axpby(const elemT2 a, const NumericVectorWithOffset &x, const elemT2 b, const NumericVectorWithOffset &y)
NumericVectorWithOffset & operator*=(const NumericVectorWithOffset &v)
multiplying elements of the current vector with elements of v
Definition NumericVectorWithOffset.inl:178
VectorWithOffset()
Default constructor: creates a vector of length 0.
Definition VectorWithOffset.inl:253
This file declares a deprecation macro.
#define STIR_DEPRECATED
Deprecation macro.
Definition deprecated.h:21