CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
VectorDoublet.h File Reference
#include "DataFormats/GeometryVector/interface/PreciseFloatType.h"

Go to the source code of this file.

Classes

class  VectorDoublet< V1, V2 >
 

Functions

template<class V1 , class V2 , class Scalar >
VectorDoublet< V1, V2 > operator* (const VectorDoublet< V1, V2 > &v, const Scalar &s)
 
template<class V1 , class V2 , class Scalar >
VectorDoublet< V1, V2 > operator* (const Scalar &s, const VectorDoublet< V1, V2 > &v)
 
template<class V1 , class V2 >
VectorDoublet< V1, V2 > operator+ (const VectorDoublet< V1, V2 > &a, const VectorDoublet< V1, V2 > &b)
 vector sum and subtraction More...
 
template<class V1 , class V2 >
VectorDoublet< V1, V2 > operator- (const VectorDoublet< V1, V2 > &a, const VectorDoublet< V1, V2 > &b)
 
template<class V1 , class V2 , class Scalar >
VectorDoublet< V1, V2 > operator/ (const VectorDoublet< V1, V2 > &v, const Scalar &s)
 

Function Documentation

template<class V1 , class V2 , class Scalar >
VectorDoublet<V1,V2> operator* ( const VectorDoublet< V1, V2 > &  v,
const Scalar &  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 73 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::first(), asciidump::s, and VectorDoublet< V1, V2 >::second().

73  {
74  return VectorDoublet<V1,V2>( v.first()*s, v.second()*s);
75 }
const V1 & first() const
Definition: VectorDoublet.h:16
const V2 & second() const
Definition: VectorDoublet.h:17
string s
Definition: asciidump.py:422
template<class V1 , class V2 , class Scalar >
VectorDoublet<V1,V2> operator* ( const Scalar &  s,
const VectorDoublet< V1, V2 > &  v 
)
inline

Definition at line 77 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::first(), asciidump::s, and VectorDoublet< V1, V2 >::second().

77  {
78  return VectorDoublet<V1,V2>( v.first()*s, v.second()*s);
79 }
const V1 & first() const
Definition: VectorDoublet.h:16
const V2 & second() const
Definition: VectorDoublet.h:17
string s
Definition: asciidump.py:422
template<class V1 , class V2 >
VectorDoublet<V1,V2> operator+ ( const VectorDoublet< V1, V2 > &  a,
const VectorDoublet< V1, V2 > &  b 
)
inline

vector sum and subtraction

Definition at line 59 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::first(), and VectorDoublet< V1, V2 >::second().

59  {
60  return VectorDoublet<V1,V2>(a.first()+b.first(), a.second()+b.second());
61 }
const V1 & first() const
Definition: VectorDoublet.h:16
const V2 & second() const
Definition: VectorDoublet.h:17
template<class V1 , class V2 >
VectorDoublet<V1,V2> operator- ( const VectorDoublet< V1, V2 > &  a,
const VectorDoublet< V1, V2 > &  b 
)
inline

Definition at line 65 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::first(), and VectorDoublet< V1, V2 >::second().

65  {
66  return VectorDoublet<V1,V2>(a.first()-b.first(), a.second()-b.second());
67 }
const V1 & first() const
Definition: VectorDoublet.h:16
const V2 & second() const
Definition: VectorDoublet.h:17
template<class V1 , class V2 , class Scalar >
VectorDoublet<V1,V2> operator/ ( const VectorDoublet< V1, V2 > &  v,
const Scalar &  s 
)
inline

Definition at line 82 of file VectorDoublet.h.

References VectorDoublet< V1, V2 >::first(), asciidump::s, and VectorDoublet< V1, V2 >::second().

82  {
83  return VectorDoublet<V1,V2>( v.first()/s, v.second()/s);
84 }
const V1 & first() const
Definition: VectorDoublet.h:16
const V2 & second() const
Definition: VectorDoublet.h:17
string s
Definition: asciidump.py:422