CMS 3D CMS Logo

Classes | Functions

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TrackPropagation/RungeKutta/interface/RKSmallVector.h File Reference

#include "DataFormats/GeometryVector/interface/PreciseFloatType.h"
#include <iostream>

Go to the source code of this file.

Classes

class  RKSmallVector< T, N >

Functions

template<class T , class Scal , int N>
RKSmallVector< T, N > operator* (const RKSmallVector< T, N > &v, const Scal &s)
template<class T , class Scal , int N>
RKSmallVector< T, N > operator* (const Scal &s, const RKSmallVector< T, N > &v)
template<class T , class U , int N>
RKSmallVector< typename
PreciseFloatType< T, U >::Type,
N > 
operator+ (const RKSmallVector< T, N > &a, const RKSmallVector< U, N > &b)
 vector sum and subtraction of vectors of possibly different precision
template<class T , class U , int N>
RKSmallVector< typename
PreciseFloatType< T, U >::Type,
N > 
operator- (const RKSmallVector< T, N > &a, const RKSmallVector< U, N > &b)
template<class T , class Scal , int N>
RKSmallVector< T, N > operator/ (const RKSmallVector< T, N > &v, const Scal &s)
template<class T , int N>
std::ostream & operator<< (std::ostream &s, const RKSmallVector< T, N > &v)
 simple text output to standard streams

Function Documentation

template<class T , class Scal , int N>
RKSmallVector<T,N> operator* ( const RKSmallVector< T, N > &  v,
const Scal &  s 
) [inline]

Multiplication by scalar, does not change the precision of the vector. The return type is the same as the type of the vector argument.

Definition at line 118 of file RKSmallVector.h.

References i, MultiGaussianStateTransform::N, csvReporter::r, asciidump::s, and matplotRender::t.

                                                                                 {
  T t = static_cast<T>(s);
  RKSmallVector<T,N> r;
  for (int i=0; i<N; ++i) r[i] = t*v[i];
  return r;
}
template<class T , class Scal , int N>
RKSmallVector<T,N> operator* ( const Scal &  s,
const RKSmallVector< T, N > &  v 
) [inline]

Definition at line 125 of file RKSmallVector.h.

References i, MultiGaussianStateTransform::N, csvReporter::r, asciidump::s, and matplotRender::t.

                                                                                 {
  T t = static_cast<T>(s);
  RKSmallVector<T,N> r;
  for (int i=0; i<N; ++i) r[i] = t*v[i];
  return r;
}
template<class T , class U , int N>
RKSmallVector<typename PreciseFloatType<T,U>::Type, N> operator+ ( const RKSmallVector< T, N > &  a,
const RKSmallVector< U, N > &  b 
) [inline]

vector sum and subtraction of vectors of possibly different precision

Definition at line 99 of file RKSmallVector.h.

References i, MultiGaussianStateTransform::N, and csvReporter::r.

                                                                       {
  typedef RKSmallVector<typename PreciseFloatType<T,U>::Type, N> RT;
  RT r;
  for (int i=0; i<N; ++i) r[i] = a[i]+b[i];
  return r;
}
template<class T , class U , int N>
RKSmallVector<typename PreciseFloatType<T,U>::Type, N> operator- ( const RKSmallVector< T, N > &  a,
const RKSmallVector< U, N > &  b 
) [inline]

Definition at line 107 of file RKSmallVector.h.

References i, MultiGaussianStateTransform::N, and csvReporter::r.

                                                                       {
  typedef RKSmallVector<typename PreciseFloatType<T,U>::Type, N> RT;
  RT r;
  for (int i=0; i<N; ++i) r[i] = a[i]-b[i];
  return r;
}
template<class T , class Scal , int N>
RKSmallVector<T,N> operator/ ( const RKSmallVector< T, N > &  v,
const Scal &  s 
) [inline]

Division by scalar, does not change the precision of the vector. The return type is the same as the type of the vector argument.

Definition at line 136 of file RKSmallVector.h.

References i, MultiGaussianStateTransform::N, csvReporter::r, asciidump::s, and matplotRender::t.

                                                                                 {
  T t = static_cast<T>(s);
  RKSmallVector<T,N> r;
  for (int i=0; i<N; ++i) r[i] = v[i]/t;
  return r;
}
template<class T , int N>
std::ostream& operator<< ( std::ostream &  s,
const RKSmallVector< T, N > &  v 
) [inline]

simple text output to standard streams

Definition at line 90 of file RKSmallVector.h.

References i, MultiGaussianStateTransform::N, asciidump::s, and v.

                                                                            {
  s << std::endl;
  for (int i=0; i<N; ++i) s << "v[" << i << "] = " << v[i] << std::endl;
  return s;
}