4 #ifndef ROOT_Math_SVector 5 #define ROOT_Math_SVector 38 #ifndef ROOT_Math_MnConfig 46 #ifndef ROOT_Math_Expression 78 template <
class T,
unsigned int D>
110 template<
class InputIterator>
117 template<
class InputIterator>
118 explicit SVector(InputIterator
begin,
unsigned int size);
137 SVector(
const T& a1,
const T& a2,
const T& a3);
139 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4);
141 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
144 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
145 const T& a5,
const T& a6);
147 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
148 const T& a5,
const T& a6,
const T& a7);
150 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
151 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,
157 SVector(
const T& a1,
const T& a2,
const T& a3,
const T& a4,
158 const T& a5,
const T& a6,
const T& a7,
const T& a8,
159 const T& a9,
const T& a10);
181 inline static unsigned int Dim() {
return D; }
183 T apply(
unsigned int i)
const;
199 const_iterator
begin()
const;
202 const_iterator
end()
const;
206 template<
class InputIterator>
207 void SetElements(InputIterator begin, InputIterator end);
211 template<
class InputIterator>
212 void SetElements(InputIterator begin,
unsigned int size);
239 bool operator<(const SVector<T,D>& rhs)
const;
245 bool operator<(const VecExpr<A,T,D>& rhs)
const;
252 const T&
At(
unsigned int i)
const;
258 T&
At(
unsigned int i);
303 template <
unsigned int D2>
306 template <
class A,
unsigned int D2>
314 template <
class SubVector >
315 SubVector
Sub(
unsigned int row)
const;
330 std::ostream&
Print(std::ostream& os)
const;
344 template <
class T,
unsigned int D>
345 std::ostream& operator<<(std::ostream& os, const ROOT::Math::SVector<T,D>& rhs);
358 #ifndef ROOT_Math_SVector_icc 363 #ifndef ROOT_Math_UnaryOperators 366 #ifndef ROOT_Math_BinaryOperators 369 #ifndef ROOT_Math_MatrixFunctions
const T & operator[](unsigned int i) const
read-only access of vector elements. Index starts from 0.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
const T * Array() const
return read-only pointer to internal array
SVector< T, D > & operator-=(const T &rhs)
self subtraction with a scalar
static unsigned int Dim()
return dimension $D$
std::ostream & Print(std::ostream &os) const
used by operator<<()
const T & At(unsigned int i) const
read-only access of vector elements with check on index. Index starts from 0.
T * iterator
STL iterator interface.
SVector< T, D > & operator/=(const T &rhs)
self division with a scalar
iterator begin()
STL iterator interface.
SVector< T, D > & operator=(const T &a1)
assignment from a scalar (only for size 1 vector)
const T * const_iterator
STL const_iterator interface.
void SetElements(InputIterator begin, InputIterator end)
set vector elements copying the values iterator size must match vector size
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...
T apply(unsigned int i) const
access the parse tree. Index starts from zero
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
Namespace for new Math classes and functions.
Expression wrapper class for Vector objects.
bool operator==(const T &rhs) const
element wise comparison
bool operator<(const T &rhs) const
element wise comparison
SVector< T, D > & Unit()
transform vector into a vector of length 1
bool operator!=(const T &rhs) const
element wise comparison
iterator end()
STL iterator interface.
SVector< T, D > & operator+=(const T &rhs)
self addition 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 ...
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 multiplication with a scalar
T value_type
contained scalar type
SVector()
Default constructor: vector filled with zero values.
SVector: a generic fixed size Vector class.