TBTK
TBTK::VectorNd Class Reference

Public Member Functions

 VectorNd (unsigned int size)
 
 VectorNd (const VectorNd &vectorNd)
 
 VectorNd (VectorNd &&vectorNd)
 
 VectorNd (std::initializer_list< double > components)
 
 VectorNd (const std::vector< double > &components)
 
 ~VectorNd ()
 
VectorNdoperator= (const VectorNd &vectorNd)
 
VectorNdoperator= (VectorNd &&vectorNd)
 
double & operator[] (unsigned int n)
 
const double & operator[] (unsigned int n) const
 
const VectorNd operator+ (const VectorNd &rhs) const
 
const VectorNd operator- (const VectorNd &rhs) const
 
const VectorNd operator- () const
 
const VectorNd operator* (double rhs) const
 
const VectorNd operator/ (double rhs) const
 
const VectorNd unit () const
 
const VectorNd parallel (const VectorNd &v) const
 
double norm () const
 
const std::vector< double > getStdVector () const
 

Static Public Member Functions

static double dotProduct (const VectorNd &lhs, const VectorNd &rhs)
 

Friends

const VectorNd operator* (double lhs, const VectorNd &rhs)
 
std::ostream & operator<< (std::ostream &stream, const VectorNd &v)
 

Constructor & Destructor Documentation

TBTK::VectorNd::VectorNd ( unsigned int  size)

Constructor.

TBTK::VectorNd::VectorNd ( const VectorNd vectorNd)

Copy constructor.

TBTK::VectorNd::VectorNd ( VectorNd &&  vectorNd)

Move constructor.

TBTK::VectorNd::VectorNd ( std::initializer_list< double >  components)

Constructor.

TBTK::VectorNd::VectorNd ( const std::vector< double > &  components)

Constructor.

TBTK::VectorNd::~VectorNd ( )

Destructor.

Member Function Documentation

double TBTK::VectorNd::dotProduct ( const VectorNd lhs,
const VectorNd rhs 
)
inlinestatic

Dot product.

const std::vector< double > TBTK::VectorNd::getStdVector ( ) const
inline

Get a std::vector<double> representation of the vector.

double TBTK::VectorNd::norm ( ) const
inline

Norm.

const VectorNd TBTK::VectorNd::operator* ( double  rhs) const
inline

Multiplication operator (vector*scalar).

const VectorNd TBTK::VectorNd::operator+ ( const VectorNd rhs) const
inline

Addition operator.

const VectorNd TBTK::VectorNd::operator- ( const VectorNd rhs) const
inline

Subtraction operator.

const VectorNd TBTK::VectorNd::operator- ( ) const
inline

Inversion operator.

const VectorNd TBTK::VectorNd::operator/ ( double  rhs) const
inline

Division operator.

VectorNd& TBTK::VectorNd::operator= ( const VectorNd vectorNd)

Assignment operator.

VectorNd& TBTK::VectorNd::operator= ( VectorNd &&  vectorNd)

Move assignment operator.

double & TBTK::VectorNd::operator[] ( unsigned int  n)
inline

Accessor operator.

const double & TBTK::VectorNd::operator[] ( unsigned int  n) const
inline

Accessor operator.

const VectorNd TBTK::VectorNd::parallel ( const VectorNd v) const
inline

Returns a vector that is the component of the vector that is parallel to the argument.

const VectorNd TBTK::VectorNd::unit ( ) const
inline

Returns a unit vector pointing in the same direction as the original vector.

Friends And Related Function Documentation

const VectorNd operator* ( double  lhs,
const VectorNd rhs 
)
friend

Multiplication operator (scalar*vector).

std::ostream& operator<< ( std::ostream &  stream,
const VectorNd v 
)
friend

operator<< for ostream.


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