4#ifndef ROOT_Math_SVector
5#define ROOT_Math_SVector
74template <
class T,
unsigned int D>
106 template<
class InputIterator>
113 template<
class InputIterator>
114 explicit SVector(InputIterator
begin,
unsigned int size);
120 SVector(
const T *
a,
unsigned int len);
131 SVector(
const T& a1,
const T& a2);
133 SVector(
const T& a1,
const T& a2,
const T& a3);
135 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4);
137 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
140 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
141 const T& a5,
const T& a6);
143 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
144 const T& a5,
const T& a6,
const T& a7);
146 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
147 const T& a5,
const T& a6,
const T& a7,
const T& a8);
149 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
150 const T& a5,
const T& a6,
const T& a7,
const T& a8,
153 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
154 const T& a5,
const T& a6,
const T& a7,
const T& a8,
155 const T& a9,
const T& a10);
179 inline static unsigned int Dim() {
return D; }
181 T
apply(
unsigned int i)
const;
183 const T*
Array()
const;
204 template<
class InputIterator>
209 template<
class InputIterator>
250 const T&
At(
unsigned int i)
const;
256 T&
At(
unsigned int i);
301 template <
unsigned int D2>
304 template <
class A,
unsigned int D2>
312 template <
class SubVector >
313 SubVector
Sub(
unsigned int row)
const;
324 bool IsInUse(
const T* p)
const;
328 std::ostream&
Print(std::ostream& os)
const;
342template <
class T,
unsigned int D>
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
SVector: a generic fixed size Vector class.
const T * const_iterator
STL const_iterator interface.
SVector< T, D > & operator=(const T &a1)
assignment from a scalar (only for size 1 vector)
T * iterator
STL iterator interface.
bool operator>(const T &rhs) const
element wise comparison
SVector< T, D > & Place_at(const SVector< T, D2 > &rhs, unsigned int row)
place a sub-vector starting from the given position
iterator begin()
STL iterator interface.
static unsigned int Dim()
return dimension
SVector< T, D > & operator*=(const T &rhs)
self multiplication with a scalar
SVector< T, D > & Unit()
transform vector into a vector of length 1
SubVector Sub(unsigned int row) const
return a subvector of size N starting at the value row where N is the size of the returned vector (Su...
const T * Array() const
return read-only pointer to internal array
T apply(unsigned int i) const
access the parse tree. Index starts from zero
T value_type
contained scalar type
const T & At(unsigned int i) const
read-only access of vector elements with check on index. Index starts from 0.
bool operator!=(const T &rhs) const
element wise comparison
SVector()
Default constructor: vector filled with zero values.
const T & operator()(unsigned int i) const
read-only access of vector elements. Index starts from 0.
SVector< T, D > & operator-=(const T &rhs)
self subtraction with a scalar
bool IsInUse(const T *p) const
Function to check if a vector is sharing same memory location of the passed pointer This function is ...
bool operator<(const T &rhs) const
element wise comparison
const T & operator[](unsigned int i) const
read-only access of vector elements. Index starts from 0.
SVector< T, D > & operator+=(const T &rhs)
self addition with a scalar
bool operator==(const T &rhs) const
element wise comparison
SVector< T, D > & operator/=(const T &rhs)
self division with a scalar
@ kSize
return vector size
std::ostream & Print(std::ostream &os) const
used by operator<<()
iterator end()
STL iterator interface.
void SetElements(InputIterator begin, InputIterator end)
set vector elements copying the values iterator size must match vector size
Expression wrapper class for Vector objects.
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...