ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
larcfm::Vect4 Class Reference

#include <Vect4.h>

Public Member Functions

 Vect4 (const double xx=0, const double yy=0, const double zz=0, const double tt=0)
 
 Vect4 (const Vect3 &v, double t)
 
bool isZero () const
 
bool almostEquals (const Vect4 &v) const
 
bool almostEquals (const Vect4 &v, INT64FM maxUlps) const
 
Vect4 operator+ (const Vect4 &v) const
 
Vect4 operator- (const Vect4 &v) const
 
Vect4 operator- () const
 
Vect4 operator* (const double k) const
 
double operator* (const Vect4 &v) const
 
bool operator== (const Vect4 &v) const
 
bool operator!= (const Vect4 &v) const
 
Vect3 vect3 () const
 
Vect2 vect2 () const
 
Vect4 Add (const Vect4 &v) const
 
Vect4 Sub (const Vect4 &v) const
 
Vect4 Neg () const
 
Vect4 Scal (double k) const
 
Vect4 ScalAdd (const double k, const Vect4 &v) const
 
int breakSymmetry () const
 
double dot (const double x, const double y, const double z, const double t) const
 
double sqv () const
 
double norm () const
 
double lat () const
 
double lon () const
 
std::string toString () const
 

Static Public Member Functions

static const Vect4ZERO ()
 

Public Attributes

double x
 
double y
 
double z
 
double t
 

Detailed Description

A four dimensional mathematical vector

Constructor & Destructor Documentation

◆ Vect4() [1/2]

larcfm::Vect4::Vect4 ( const double  xx = 0,
const double  yy = 0,
const double  zz = 0,
const double  tt = 0 
)

Construct a Vect4

◆ Vect4() [2/2]

larcfm::Vect4::Vect4 ( const Vect3 v,
double  t 
)

Construct a Vect4

Parameters
vvector
ttime (4th dimension of vector)

Member Function Documentation

◆ Add()

Vect4 larcfm::Vect4::Add ( const Vect4 v) const

Return a new vector that is the addition of this vector and the parameter

Parameters
vvector
Returns
vector sum

◆ almostEquals() [1/2]

bool larcfm::Vect4::almostEquals ( const Vect4 v) const

Checks if vectors are almost equal.

Parameters
vVector
Returns
true, if this vector is almost equal to v.

◆ almostEquals() [2/2]

bool larcfm::Vect4::almostEquals ( const Vect4 v,
INT64FM  maxUlps 
) const

Checks if vectors are almost equal.

Parameters
vVector
maxUlpsunit of least precision
Returns
true, if this vector is almost equal to v.

◆ breakSymmetry()

int larcfm::Vect4::breakSymmetry ( ) const

A symmetry calculation

◆ dot()

double larcfm::Vect4::dot ( const double  x,
const double  y,
const double  z,
const double  t 
) const

The dot product of this vector and the parameter

◆ isZero()

bool larcfm::Vect4::isZero ( ) const

Is this vector zero?

◆ lat()

double larcfm::Vect4::lat ( ) const

The latitude component of this vector

Returns
latitude

◆ lon()

double larcfm::Vect4::lon ( ) const

The longitude component of this vector

Returns
longitude

◆ Neg()

Vect4 larcfm::Vect4::Neg ( ) const

Return a new vector that is the negation of this vector

Returns
negation vector

◆ norm()

double larcfm::Vect4::norm ( ) const

The vector norm of this vector, i.e., the Euclidean distance

Returns
norm

◆ operator!=()

bool larcfm::Vect4::operator!= ( const Vect4 v) const

Are these two vectors unequal?

◆ operator*() [1/2]

Vect4 larcfm::Vect4::operator* ( const double  k) const

Return a new vector that is the scale of this vector by k

◆ operator*() [2/2]

double larcfm::Vect4::operator* ( const Vect4 v) const

The dot product of this vector and the parameter

◆ operator+()

Vect4 larcfm::Vect4::operator+ ( const Vect4 v) const

Return a new vector that is the addition of this vector and the parameter

◆ operator-() [1/2]

Vect4 larcfm::Vect4::operator- ( ) const

Return a new vector that is the negation of this vector

◆ operator-() [2/2]

Vect4 larcfm::Vect4::operator- ( const Vect4 v) const

Return a new vector that is the subtract of this vector and the parameter

◆ operator==()

bool larcfm::Vect4::operator== ( const Vect4 v) const

Are these two vectors equal?

◆ Scal()

Vect4 larcfm::Vect4::Scal ( double  k) const

Return a new vector that is the scale of this vector by k

Parameters
kscale factor
Returns
scaled vector

◆ ScalAdd()

Vect4 larcfm::Vect4::ScalAdd ( const double  k,
const Vect4 v 
) const

Return a new vector that is this*k+v

Parameters
kvector scale factor
vvector
Returns
result of this*k+v

◆ sqv()

double larcfm::Vect4::sqv ( ) const

The sum of the square of each component

Returns
sum of squares

◆ Sub()

Vect4 larcfm::Vect4::Sub ( const Vect4 v) const

Return a new vector that is the subtract of this vector and the parameter

Parameters
vvector
Returns
vector subtraction

◆ toString()

std::string larcfm::Vect4::toString ( ) const

A string representation of this vector

◆ vect2()

Vect2 larcfm::Vect4::vect2 ( ) const

Return the x and y components of this vector

Returns
2D vector

◆ vect3()

Vect3 larcfm::Vect4::vect3 ( ) const

Return the x,y, and z components of this vector

Returns
3D vector

◆ ZERO()

const Vect4 & larcfm::Vect4::ZERO ( )
static

Return a zero vector

Member Data Documentation

◆ t

double larcfm::Vect4::t

t component

◆ x

double larcfm::Vect4::x

x component

◆ y

double larcfm::Vect4::y

y component

◆ z

double larcfm::Vect4::z

z component


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