CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

CLHEP::Hep2Vector Class Reference

#include <TwoVector.h>

List of all members.

Public Types

 X = 0
 Y = 1
 NUM_COORDINATES = 2
 SIZE = NUM_COORDINATES
 ZMpvToleranceTicks = 100
enum  { X = 0, Y = 1, NUM_COORDINATES = 2, SIZE = NUM_COORDINATES }
enum  { ZMpvToleranceTicks = 100 }

Public Member Functions

 Hep2Vector (double x=0.0, double y=0.0)
 Hep2Vector (const Hep2Vector &p)
 Hep2Vector (const Hep3Vector &)
 ~Hep2Vector ()
double x () const
double y () const
double operator() (int i) const
double operator[] (int i) const
double & operator() (int i)
double & operator[] (int i)
void setX (double x)
void setY (double y)
void set (double x, double y)
double phi () const
double mag2 () const
double mag () const
double r () const
void setPhi (double phi)
void setMag (double r)
void setR (double r)
void setPolar (double r, double phi)
Hep2Vectoroperator= (const Hep2Vector &p)
bool operator== (const Hep2Vector &v) const
bool operator!= (const Hep2Vector &v) const
int compare (const Hep2Vector &v) const
bool operator> (const Hep2Vector &v) const
bool operator< (const Hep2Vector &v) const
bool operator>= (const Hep2Vector &v) const
bool operator<= (const Hep2Vector &v) const
double howNear (const Hep2Vector &p) const
bool isNear (const Hep2Vector &p, double epsilon=tolerance) const
double howParallel (const Hep2Vector &p) const
bool isParallel (const Hep2Vector &p, double epsilon=tolerance) const
double howOrthogonal (const Hep2Vector &p) const
bool isOrthogonal (const Hep2Vector &p, double epsilon=tolerance) const
Hep2Vectoroperator+= (const Hep2Vector &p)
Hep2Vectoroperator-= (const Hep2Vector &p)
Hep2Vector operator- () const
Hep2Vectoroperator *= (double a)
Hep2Vector unit () const
Hep2Vector orthogonal () const
double dot (const Hep2Vector &p) const
double angle (const Hep2Vector &) const
void rotate (double)
 operator Hep3Vector () const

Static Public Member Functions

static double getTolerance ()
static double setTolerance (double tol)

Friends

std::ostream & operator<< (std::ostream &, const Hep2Vector &)
double operator * (const Hep2Vector &a, const Hep2Vector &b)
Hep2Vector operator * (const Hep2Vector &p, double a)
Hep2Vector operator * (double a, const Hep2Vector &p)
Hep2Vector operator/ (const Hep2Vector &p, double a)
Hep2Vector operator+ (const Hep2Vector &a, const Hep2Vector &b)
Hep2Vector operator- (const Hep2Vector &a, const Hep2Vector &b)


Detailed Description

Author:

Definition at line 49 of file TwoVector.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
X 
Y 
NUM_COORDINATES 
SIZE 

Definition at line 53 of file TwoVector.h.

anonymous enum

Enumerator:
ZMpvToleranceTicks 

Definition at line 196 of file TwoVector.h.


Constructor & Destructor Documentation

CLHEP::Hep2Vector::Hep2Vector ( double  x = 0.0,
double  y = 0.0 
) [inline]

CLHEP::Hep2Vector::Hep2Vector ( const Hep2Vector p  )  [inline]

CLHEP::Hep2Vector::Hep2Vector ( const Hep3Vector  )  [explicit]

CLHEP::Hep2Vector::~Hep2Vector (  )  [inline]


Member Function Documentation

double CLHEP::Hep2Vector::angle ( const Hep2Vector  )  const [inline]

int CLHEP::Hep2Vector::compare ( const Hep2Vector v  )  const

Definition at line 89 of file TwoVector.cc.

References dx, and dy.

Referenced by operator<(), operator<=(), operator>(), and operator>=().

double CLHEP::Hep2Vector::dot ( const Hep2Vector p  )  const [inline]

Referenced by howNear(), howOrthogonal(), howParallel(), isNear(), isOrthogonal(), and isParallel().

static double CLHEP::Hep2Vector::getTolerance (  )  [inline, static]

double CLHEP::Hep2Vector::howNear ( const Hep2Vector p  )  const

Definition at line 122 of file TwoVector.cc.

References dot(), and mag2().

double CLHEP::Hep2Vector::howOrthogonal ( const Hep2Vector p  )  const

Definition at line 163 of file TwoVector.cc.

References dot(), x(), and y().

double CLHEP::Hep2Vector::howParallel ( const Hep2Vector p  )  const

Definition at line 134 of file TwoVector.cc.

References dot(), mag2(), x(), and y().

bool CLHEP::Hep2Vector::isNear ( const Hep2Vector p,
double  epsilon = tolerance 
) const

Definition at line 117 of file TwoVector.cc.

References dot(), and mag2().

bool CLHEP::Hep2Vector::isOrthogonal ( const Hep2Vector p,
double  epsilon = tolerance 
) const

Definition at line 178 of file TwoVector.cc.

References dot(), x(), and y().

bool CLHEP::Hep2Vector::isParallel ( const Hep2Vector p,
double  epsilon = tolerance 
) const

Definition at line 150 of file TwoVector.cc.

References dot(), mag2(), x(), and y().

double CLHEP::Hep2Vector::mag (  )  const [inline]

double CLHEP::Hep2Vector::mag2 (  )  const [inline]

Referenced by howNear(), howParallel(), isNear(), and isParallel().

Hep2Vector& CLHEP::Hep2Vector::operator *= ( double  a  )  [inline]

CLHEP::Hep2Vector::operator Hep3Vector (  )  const

Definition at line 85 of file TwoVector.cc.

bool CLHEP::Hep2Vector::operator!= ( const Hep2Vector v  )  const [inline]

double & CLHEP::Hep2Vector::operator() ( int  i  ) 

Definition at line 41 of file TwoVector.cc.

References ZMthrowA.

double CLHEP::Hep2Vector::operator() ( int  i  )  const

Definition at line 29 of file TwoVector.cc.

References x(), y(), and ZMthrowA.

Hep2Vector& CLHEP::Hep2Vector::operator+= ( const Hep2Vector p  )  [inline]

Hep2Vector CLHEP::Hep2Vector::operator- (  )  const [inline]

Hep2Vector& CLHEP::Hep2Vector::operator-= ( const Hep2Vector p  )  [inline]

bool CLHEP::Hep2Vector::operator< ( const Hep2Vector v  )  const

Definition at line 107 of file TwoVector.cc.

References compare().

bool CLHEP::Hep2Vector::operator<= ( const Hep2Vector v  )  const

Definition at line 113 of file TwoVector.cc.

References compare().

Hep2Vector& CLHEP::Hep2Vector::operator= ( const Hep2Vector p  )  [inline]

bool CLHEP::Hep2Vector::operator== ( const Hep2Vector v  )  const [inline]

bool CLHEP::Hep2Vector::operator> ( const Hep2Vector v  )  const

Definition at line 104 of file TwoVector.cc.

References compare().

bool CLHEP::Hep2Vector::operator>= ( const Hep2Vector v  )  const

Definition at line 110 of file TwoVector.cc.

References compare().

double& CLHEP::Hep2Vector::operator[] ( int  i  )  [inline]

double CLHEP::Hep2Vector::operator[] ( int  i  )  const [inline]

Hep2Vector CLHEP::Hep2Vector::orthogonal (  )  const [inline]

double CLHEP::Hep2Vector::phi (  )  const [inline]

double CLHEP::Hep2Vector::r (  )  const [inline]

void CLHEP::Hep2Vector::rotate ( double   ) 

Definition at line 55 of file TwoVector.cc.

void CLHEP::Hep2Vector::set ( double  x,
double  y 
) [inline]

Referenced by CLHEP::operator>>().

void CLHEP::Hep2Vector::setMag ( double  r  )  [inline]

void CLHEP::Hep2Vector::setPhi ( double  phi  )  [inline]

void CLHEP::Hep2Vector::setPolar ( double  r,
double  phi 
) [inline]

void CLHEP::Hep2Vector::setR ( double  r  )  [inline]

double CLHEP::Hep2Vector::setTolerance ( double  tol  )  [static]

Definition at line 22 of file TwoVector.cc.

void CLHEP::Hep2Vector::setX ( double  x  )  [inline]

void CLHEP::Hep2Vector::setY ( double  y  )  [inline]

Hep2Vector CLHEP::Hep2Vector::unit (  )  const [inline]

double CLHEP::Hep2Vector::x (  )  const [inline]

Referenced by howOrthogonal(), howParallel(), isOrthogonal(), isParallel(), operator()(), CLHEP::operator/(), CLHEP::operator<<(), and test2().

double CLHEP::Hep2Vector::y (  )  const [inline]

Referenced by howOrthogonal(), howParallel(), isOrthogonal(), isParallel(), operator()(), CLHEP::operator/(), CLHEP::operator<<(), and test2().


Friends And Related Function Documentation

Hep2Vector operator * ( double  a,
const Hep2Vector p 
) [friend]

Hep2Vector operator * ( const Hep2Vector p,
double  a 
) [friend]

double operator * ( const Hep2Vector a,
const Hep2Vector b 
) [friend]

Hep2Vector operator+ ( const Hep2Vector a,
const Hep2Vector b 
) [friend]

Hep2Vector operator- ( const Hep2Vector a,
const Hep2Vector b 
) [friend]

Hep2Vector operator/ ( const Hep2Vector p,
double  a 
) [friend]

Definition at line 63 of file TwoVector.cc.

std::ostream& operator<< ( std::ostream &  os,
const Hep2Vector q 
) [friend]

Definition at line 70 of file TwoVector.cc.


The documentation for this class was generated from the following files:
Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7