Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
JTOOLS::JArray< N, T > Class Template Reference

One dimensional array of template objects with fixed length. More...

#include <JArray.hh>

Inheritance diagram for JTOOLS::JArray< N, T >:
JMATH::JMath< JArray< N, T > > JLANG::JEquals< JArray< N, T > >

Public Types

typedef const Tconst_pointer
 
typedef Tpointer
 
typedef const Tconst_iterator
 
typedef Titerator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef Treference
 
typedef const Tconst_reference
 
typedef unsigned int size_type
 
typedef JLANG::JClass< T >
::argument_type 
argument_type
 

Public Member Functions

 JArray ()
 Default constructor. More...
 
template<unsigned int M>
 JArray (const JArray< M, T > &array)
 Copy constructor. More...
 
template<unsigned int M>
 JArray (const JArray< M, const T > &array)
 Copy constructor. More...
 
 JArray (const T *p)
 Copy constructor. More...
 
 JArray (const JMultiKey< N, T > &key)
 Copy constructor. More...
 
 JArray (const JMultiKey< N, const T > &key)
 Copy constructor. More...
 
 JArray (const JArray< N-1, T > &array, argument_type value)
 Append constructor. More...
 
 JArray (const JArray< N-1, const T > &array, argument_type value)
 Append constructor. More...
 
 JArray (const JMultiKey< N-1, T > &key, argument_type value)
 Append constructor. More...
 
 JArray (const JMultiKey< N-1, const T > &key, argument_type value)
 Append constructor. More...
 
template<class... Args>
 JArray (const Args &...args)
 Initialise constructor. More...
 
template<class... Args>
JArrayset (const Args &...args)
 Set array. More...
 
const_iterator begin () const
 get iterator to begin of data More...
 
const_iterator end () const
 get iterator to end of data More...
 
iterator begin ()
 get iterator to begin of data More...
 
iterator end ()
 get iterator to end of data More...
 
const_reverse_iterator rbegin () const
 get reverse iterator to begin of data More...
 
const_reverse_iterator rend () const
 get reverse iterator to begin of data More...
 
reverse_iterator rbegin ()
 get reverse iterator to begin of data More...
 
reverse_iterator rend ()
 get reverse iterator to end of data More...
 
const_reference operator[] (int index) const
 Get element at given index. More...
 
reference operator[] (int index)
 Get element at given index. More...
 
const_reference at (int index) const
 Get element at given index. More...
 
reference at (int index)
 Get element at given index. More...
 
const_pointer data () const
 Get pointer to data. More...
 
pointer data ()
 Get pointer to data. More...
 
JArray< N-1, Tpop_front () const
 Make a copy in which the first element is removed. More...
 
JArray< N-1, Tpop_back () const
 Make a copy in which the last element is removed. More...
 
JArraynegate ()
 Negate array. More...
 
JArrayadd (const JArray &array)
 Add array. More...
 
JArraysub (const JArray &array)
 Subtract array. More...
 
JArraymul (const double factor)
 Scale array. More...
 
JArraydiv (const double factor)
 Scale array. More...
 
bool equals (const JArray< N, T > &array) const
 Check equality. More...
 
JArray< N, T > & mul (const JNullType &object)
 Multiply with object. More...
 

Static Public Member Functions

static size_type size ()
 Get size of data. More...
 

Protected Member Functions

template<class... Args>
void __set__ (const int i, const argument_type x, const Args &...args)
 Recursive method for setting array. More...
 
void __set__ (const int i) const
 Termination method for setting array. More...
 
template<unsigned int M>
void assign (const JMultiKey< M, T > &key)
 Recursive method for setting array. More...
 
template<unsigned int M>
void assign (const JMultiKey< M, const T > &key)
 Recursive method for setting array. More...
 
void assign (const JMultiKey< 1, T > &key)
 Termination method for setting array. More...
 
void assign (const JMultiKey< 1, const T > &key)
 Termination method for setting array. More...
 
template<unsigned int M>
void assign (const JMultiKey< M, T > &key, argument_type value)
 Recursive method for setting array. More...
 
template<unsigned int M>
void assign (const JMultiKey< M, const T > &key, argument_type value)
 Recursive method for setting array. More...
 
void assign (const JMultiKey< 1, T > &key, argument_type value)
 Termination method for setting array. More...
 
void assign (const JMultiKey< 1, const T > &key, argument_type value)
 Termination method for setting array. More...
 

Protected Attributes

T buffer [N]
 

Friends

JReaderoperator>> (JReader &in, JArray &buffer)
 Read array from input. More...
 
JWriteroperator<< (JWriter &out, const JArray &buffer)
 Write array to output. More...
 

Detailed Description

template<unsigned int N, class T>
class JTOOLS::JArray< N, T >

One dimensional array of template objects with fixed length.


The internal data structure consists of a standard C-array.

Definition at line 35 of file JArray.hh.

Member Typedef Documentation

template<unsigned int N, class T>
typedef const T* JTOOLS::JArray< N, T >::const_pointer

Definition at line 41 of file JArray.hh.

template<unsigned int N, class T>
typedef T* JTOOLS::JArray< N, T >::pointer

Definition at line 42 of file JArray.hh.

template<unsigned int N, class T>
typedef const T* JTOOLS::JArray< N, T >::const_iterator

Definition at line 43 of file JArray.hh.

template<unsigned int N, class T>
typedef T* JTOOLS::JArray< N, T >::iterator

Definition at line 44 of file JArray.hh.

template<unsigned int N, class T>
typedef std::reverse_iterator<const_iterator> JTOOLS::JArray< N, T >::const_reverse_iterator

Definition at line 45 of file JArray.hh.

template<unsigned int N, class T>
typedef std::reverse_iterator<iterator> JTOOLS::JArray< N, T >::reverse_iterator

Definition at line 46 of file JArray.hh.

template<unsigned int N, class T>
typedef T& JTOOLS::JArray< N, T >::reference

Definition at line 47 of file JArray.hh.

template<unsigned int N, class T>
typedef const T& JTOOLS::JArray< N, T >::const_reference

Definition at line 48 of file JArray.hh.

template<unsigned int N, class T>
typedef unsigned int JTOOLS::JArray< N, T >::size_type

Definition at line 49 of file JArray.hh.

template<unsigned int N, class T>
typedef JLANG::JClass<T>::argument_type JTOOLS::JArray< N, T >::argument_type

Definition at line 50 of file JArray.hh.

Constructor & Destructor Documentation

template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( )
inline

Default constructor.

Definition at line 56 of file JArray.hh.

57  {}
template<unsigned int N, class T>
template<unsigned int M>
JTOOLS::JArray< N, T >::JArray ( const JArray< M, T > &  array)
inline

Copy constructor.

Parameters
arrayarray

Definition at line 66 of file JArray.hh.

67  {
68  STATIC_CHECK(M >= N);
69 
70  std::copy_n(array.data(), N, this->data());
71  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
#define STATIC_CHECK(expr)
Definition: JAssert.hh:29
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
const_pointer data() const
Get pointer to data.
Definition: JArray.hh:276
template<unsigned int N, class T>
template<unsigned int M>
JTOOLS::JArray< N, T >::JArray ( const JArray< M, const T > &  array)
inline

Copy constructor.

Parameters
arrayarray

Definition at line 80 of file JArray.hh.

81  {
82  STATIC_CHECK(M >= N);
83 
84  std::copy_n(array.data(), N, this->data());
85  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
#define STATIC_CHECK(expr)
Definition: JAssert.hh:29
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
const_pointer data() const
Get pointer to data.
Definition: JArray.hh:276
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const T p)
inline

Copy constructor.

Parameters
ppointer to data

Definition at line 93 of file JArray.hh.

94  {
95  std::copy_n(p, N, this->data());
96  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
const_pointer data() const
Get pointer to data.
Definition: JArray.hh:276
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const JMultiKey< N, T > &  key)
inline

Copy constructor.

Parameters
keymulti-dimensional key

Definition at line 104 of file JArray.hh.

105  {
106  assign(key);
107  }
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const JMultiKey< N, const T > &  key)
inline

Copy constructor.

Parameters
keymulti-dimensional key

Definition at line 115 of file JArray.hh.

116  {
117  assign(key);
118  }
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const JArray< N-1, T > &  array,
argument_type  value 
)
inline

Append constructor.

Parameters
arrayarray
valuevalue

Definition at line 127 of file JArray.hh.

128  {
129  std::copy_n(array.data(), N-1, this->data());
130 
131  this->buffer[N-1] = value;
132  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
const_pointer data() const
Get pointer to data.
Definition: JArray.hh:276
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const JArray< N-1, const T > &  array,
argument_type  value 
)
inline

Append constructor.

Parameters
arrayarray
valuevalue

Definition at line 141 of file JArray.hh.

142  {
143  std::copy_n(array.data(), N-1, this->data());
144 
145  this->buffer[N-1] = value;
146  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
const_pointer data() const
Get pointer to data.
Definition: JArray.hh:276
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const JMultiKey< N-1, T > &  key,
argument_type  value 
)
inline

Append constructor.

Parameters
keymulti-dimensional key
valuevalue

Definition at line 155 of file JArray.hh.

156  {
157  assign(key, value);
158  }
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
template<unsigned int N, class T>
JTOOLS::JArray< N, T >::JArray ( const JMultiKey< N-1, const T > &  key,
argument_type  value 
)
inline

Append constructor.

Parameters
keymulti-dimensional key
valuevalue

Definition at line 167 of file JArray.hh.

168  {
169  assign(key, value);
170  }
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
template<unsigned int N, class T>
template<class... Args>
JTOOLS::JArray< N, T >::JArray ( const Args &...  args)
inline

Initialise constructor.

Parameters
argsvalues

Definition at line 179 of file JArray.hh.

180  {
181  set(args...);
182  }
JArray & set(const Args &...args)
Set array.
Definition: JArray.hh:191

Member Function Documentation

template<unsigned int N, class T>
template<class... Args>
JArray& JTOOLS::JArray< N, T >::set ( const Args &...  args)
inline

Set array.

Parameters
argsvalues

Definition at line 191 of file JArray.hh.

192  {
193  STATIC_CHECK(N == sizeof...(Args));
194 
195  __set__(0, args...);
196 
197  return *this;
198  }
void __set__(const int i, const argument_type x, const Args &...args)
Recursive method for setting array.
Definition: JArray.hh:469
#define STATIC_CHECK(expr)
Definition: JAssert.hh:29
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
const_iterator JTOOLS::JArray< N, T >::begin ( ) const
inline

get iterator to begin of data

Definition at line 201 of file JArray.hh.

template<unsigned int N, class T>
const_iterator JTOOLS::JArray< N, T >::end ( ) const
inline

get iterator to end of data

Definition at line 202 of file JArray.hh.

template<unsigned int N, class T>
iterator JTOOLS::JArray< N, T >::begin ( )
inline

get iterator to begin of data

Definition at line 205 of file JArray.hh.

template<unsigned int N, class T>
iterator JTOOLS::JArray< N, T >::end ( )
inline

get iterator to end of data

Definition at line 206 of file JArray.hh.

template<unsigned int N, class T>
const_reverse_iterator JTOOLS::JArray< N, T >::rbegin ( ) const
inline

get reverse iterator to begin of data

Definition at line 209 of file JArray.hh.

template<unsigned int N, class T>
const_reverse_iterator JTOOLS::JArray< N, T >::rend ( ) const
inline

get reverse iterator to begin of data

Definition at line 210 of file JArray.hh.

template<unsigned int N, class T>
reverse_iterator JTOOLS::JArray< N, T >::rbegin ( )
inline

get reverse iterator to begin of data

Definition at line 213 of file JArray.hh.

template<unsigned int N, class T>
reverse_iterator JTOOLS::JArray< N, T >::rend ( )
inline

get reverse iterator to end of data

Definition at line 214 of file JArray.hh.

template<unsigned int N, class T>
const_reference JTOOLS::JArray< N, T >::operator[] ( int  index) const
inline

Get element at given index.

Parameters
indexindex
Returns
element

Definition at line 223 of file JArray.hh.

224  {
225  return buffer[index];
226  }
template<unsigned int N, class T>
reference JTOOLS::JArray< N, T >::operator[] ( int  index)
inline

Get element at given index.

Parameters
indexindex
Returns
element

Definition at line 235 of file JArray.hh.

236  {
237  return buffer[index];
238  }
template<unsigned int N, class T>
const_reference JTOOLS::JArray< N, T >::at ( int  index) const
inline

Get element at given index.

Parameters
indexindex
Returns
element at index

Definition at line 247 of file JArray.hh.

248  {
249  if (index >= 0 && index < N)
250  return buffer[index];
251  else
252  throw JIndexOutOfRange("JArray<>::at()");
253  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
reference JTOOLS::JArray< N, T >::at ( int  index)
inline

Get element at given index.

Parameters
indexindex
Returns
element at index

Definition at line 262 of file JArray.hh.

263  {
264  if (index >= 0 && index < N)
265  return buffer[index];
266  else
267  throw JIndexOutOfRange("JArray<>::at()");
268  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
const_pointer JTOOLS::JArray< N, T >::data ( ) const
inline

Get pointer to data.

Returns
pointer to data

Definition at line 276 of file JArray.hh.

277  {
278  return buffer;
279  }
template<unsigned int N, class T>
pointer JTOOLS::JArray< N, T >::data ( )
inline

Get pointer to data.

Returns
pointer to data

Definition at line 287 of file JArray.hh.

288  {
289  return buffer;
290  }
template<unsigned int N, class T>
static size_type JTOOLS::JArray< N, T >::size ( )
inlinestatic

Get size of data.

Returns
size of data

Definition at line 298 of file JArray.hh.

299  {
300  return N;
301  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray<N-1, T> JTOOLS::JArray< N, T >::pop_front ( ) const
inline

Make a copy in which the first element is removed.

Returns
array

Definition at line 309 of file JArray.hh.

310  {
311  return JArray<N-1, T>(&buffer[1]);
312  }
do set_variable OUTPUT_DIRECTORY $WORKDIR T
One dimensional array of template objects with fixed length.
Definition: JArray.hh:35
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray<N-1, T> JTOOLS::JArray< N, T >::pop_back ( ) const
inline

Make a copy in which the last element is removed.

Returns
array

Definition at line 320 of file JArray.hh.

321  {
322  return JArray<N-1, T>(buffer);
323  }
do set_variable OUTPUT_DIRECTORY $WORKDIR T
One dimensional array of template objects with fixed length.
Definition: JArray.hh:35
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray& JTOOLS::JArray< N, T >::negate ( )
inline

Negate array.

Returns
this array

Definition at line 331 of file JArray.hh.

332  {
333  for (int i = 0; i != N; ++i) {
334  buffer[i] = -buffer[i];
335  }
336 
337  return *this;
338  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray& JTOOLS::JArray< N, T >::add ( const JArray< N, T > &  array)
inline

Add array.

Parameters
arrayarray
Returns
this array

Definition at line 347 of file JArray.hh.

348  {
349  for (int i = 0; i != N; ++i) {
350  buffer[i] += array[i];
351  }
352 
353  return *this;
354  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray& JTOOLS::JArray< N, T >::sub ( const JArray< N, T > &  array)
inline

Subtract array.

Parameters
arrayarray
Returns
this array

Definition at line 363 of file JArray.hh.

364  {
365  for (int i = 0; i != N; ++i) {
366  buffer[i] -= array[i];
367  }
368 
369  return *this;
370  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray& JTOOLS::JArray< N, T >::mul ( const double  factor)
inline

Scale array.

Parameters
factormultiplication factor
Returns
this array

Definition at line 379 of file JArray.hh.

380  {
381  for (int i = 0; i != N; ++i) {
382  buffer[i] *= factor;
383  }
384 
385  return *this;
386  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
JArray& JTOOLS::JArray< N, T >::div ( const double  factor)
inline

Scale array.

Parameters
factordivision factor
Returns
this array

Definition at line 395 of file JArray.hh.

396  {
397  for (int i = 0; i != N; ++i) {
398  buffer[i] /= factor;
399  }
400 
401  return *this;
402  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
bool JTOOLS::JArray< N, T >::equals ( const JArray< N, T > &  array) const
inline

Check equality.

Parameters
arrayarray
Returns
true if arrays are equal; else false

Definition at line 411 of file JArray.hh.

412  {
413  for (int i = 0; i != N; ++i) {
414  if (buffer[i] != array[i]) {
415  return false;
416  }
417  }
418 
419  return true;
420  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
template<class... Args>
void JTOOLS::JArray< N, T >::__set__ ( const int  i,
const argument_type  x,
const Args &...  args 
)
inlineprotected

Recursive method for setting array.

Parameters
iindex
xvalue at given index
argsremaining values

Definition at line 469 of file JArray.hh.

470  {
471  this->buffer[i] = x;
472 
473  __set__(i + 1, args...);
474  }
void __set__(const int i, const argument_type x, const Args &...args)
Recursive method for setting array.
Definition: JArray.hh:469
template<unsigned int N, class T>
void JTOOLS::JArray< N, T >::__set__ ( const int  i) const
inlineprotected

Termination method for setting array.

Parameters
iindex

Definition at line 482 of file JArray.hh.

483  {}
template<unsigned int N, class T>
template<unsigned int M>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< M, T > &  key)
inlineprotected

Recursive method for setting array.

Parameters
keymulti-dimensional key

Definition at line 492 of file JArray.hh.

493  {
494  buffer[N-M] = key.first;
495 
496  assign(key.second);
497  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
template<unsigned int M>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< M, const T > &  key)
inlineprotected

Recursive method for setting array.

Parameters
keymulti-dimensional key

Definition at line 506 of file JArray.hh.

507  {
508  buffer[N-M] = key.first;
509 
510  assign(key.second);
511  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< 1, T > &  key)
inlineprotected

Termination method for setting array.

Parameters
keyone-dimensional key

Definition at line 519 of file JArray.hh.

520  {
521  buffer[N-1] = key.first;
522  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< 1, const T > &  key)
inlineprotected

Termination method for setting array.

Parameters
keyone-dimensional key

Definition at line 530 of file JArray.hh.

531  {
532  buffer[N-1] = key.first;
533  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
template<unsigned int M>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< M, T > &  key,
argument_type  value 
)
inlineprotected

Recursive method for setting array.

Parameters
keymulti-dimensional key
valuevalue

Definition at line 543 of file JArray.hh.

544  {
545  buffer[N-M-1] = key.first;
546 
547  assign(key.second, value);
548  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
template<unsigned int M>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< M, const T > &  key,
argument_type  value 
)
inlineprotected

Recursive method for setting array.

Parameters
keymulti-dimensional key
valuevalue

Definition at line 558 of file JArray.hh.

559  {
560  buffer[N-M-1] = key.first;
561 
562  assign(key.second, value);
563  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
void assign(const JMultiKey< M, T > &key)
Recursive method for setting array.
Definition: JArray.hh:492
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< 1, T > &  key,
argument_type  value 
)
inlineprotected

Termination method for setting array.

Parameters
keyone-dimensional key
valuevalue

Definition at line 572 of file JArray.hh.

573  {
574  buffer[N-2] = key.first;
575  buffer[N-1] = value;
576  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<unsigned int N, class T>
void JTOOLS::JArray< N, T >::assign ( const JMultiKey< 1, const T > &  key,
argument_type  value 
)
inlineprotected

Termination method for setting array.

Parameters
keyone-dimensional key
valuevalue

Definition at line 585 of file JArray.hh.

586  {
587  buffer[N-2] = key.first;
588  buffer[N-1] = value;
589  }
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
JArray< N, T > & JMATH::JMath< JArray< N, T > , JNullType >::mul ( const JNullType object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 273 of file JMath.hh.

274  {
275  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
276  }
Auxiliary class for arithmetic operations on objects.
Definition: JCalculator.hh:18

Friends And Related Function Documentation

template<unsigned int N, class T>
JReader& operator>> ( JReader in,
JArray< N, T > &  buffer 
)
friend

Read array from input.

Parameters
inreader
bufferarray
Returns
reader

Definition at line 430 of file JArray.hh.

431  {
432  for (iterator i = buffer.begin(); i != buffer.end(); ++i) {
433  in >> *i;
434  }
435 
436  return in;
437  }
const_iterator begin() const
get iterator to begin of data
Definition: JArray.hh:201
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
const_iterator end() const
get iterator to end of data
Definition: JArray.hh:202
T * iterator
Definition: JArray.hh:44
template<unsigned int N, class T>
JWriter& operator<< ( JWriter out,
const JArray< N, T > &  buffer 
)
friend

Write array to output.

Parameters
outwriter
bufferarray
Returns
writer

Definition at line 447 of file JArray.hh.

448  {
449  for (const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
450  out << *i;
451  }
452 
453  return out;
454  }
const_iterator begin() const
get iterator to begin of data
Definition: JArray.hh:201
const_iterator end() const
get iterator to end of data
Definition: JArray.hh:202
const T * const_iterator
Definition: JArray.hh:43

Member Data Documentation

template<unsigned int N, class T>
T JTOOLS::JArray< N, T >::buffer[N]
protected

Definition at line 458 of file JArray.hh.


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