rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.2
Rivet::Vector< N > Class Template Reference

A minimal base class for \( N \)-dimensional vectors. More...

#include <VectorN.hh>

Public Types

using EVector = RivetEigen::Matrix< double, N, 1 >
 Vector.
 

Public Member Functions

const double & get (const size_t index) const
 
double & get (const size_t index)
 
const double & operator[] (const size_t index) const
 Direct access to vector elements by index.
 
double & operator[] (const size_t index)
 Direct access to vector elements by index.
 
Vector< N > & set (const size_t index, const double value)
 Set indexed value.
 
constexpr size_t size () const
 Vector dimensionality.
 
bool isZero (double tolerance=1E-5) const
 Check for nullness, allowing for numerical precision.
 
double mod2 () const
 Calculate the modulus-squared of a vector. \( \sum_{i=1}^N x_i^2 \).
 
double mod () const
 Calculate the modulus of a vector. \( \sqrt{\sum_{i=1}^N x_i^2} \).
 
Vector< N > operator- () const
 Invert the vector.
 
bool operator== (const Vector< N > &a) const
 
bool operator!= (const Vector< N > &a) const
 

Friends

template<size_t M>
Vector< M > multiply (const Matrix< M > &a, const Vector< M > &b)
 

Detailed Description

template<size_t N>
class Rivet::Vector< N >

A minimal base class for \( N \)-dimensional vectors.


The documentation for this class was generated from the following file:
  • /Users/chrisg/software/rivet/include/Rivet/Math/VectorN.hh