4#ifndef ROOT_Math_SVector
5#define ROOT_Math_SVector
74template <
class T,
unsigned int D>
106 template<
class InputIterator>
113 template<
class InputIterator>
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;
328 std::ostream&
Print(std::ostream& os)
const;
342template <
class T,
unsigned int D>
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
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.
@ kSize
return vector size
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
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.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.