IMP  2.3.0
The Integrative Modeling Platform
IMP::algebra::VectorD< D > Class Template Reference

A Cartesian vector in D-dimensions. More...

#include <IMP/algebra/VectorD.h>

+ Inheritance diagram for IMP::algebra::VectorD< D >:

Detailed Description

template<int D>
class IMP::algebra::VectorD< D >

A Cartesian vector in D-dimensions.

Store a vector of Cartesian coordinates. It supports all expected mathematical operators, including using * for the dot product.

See Also
Vector3D
Vector2D

See geometric primitives for more information.

Definition at line 52 of file VectorD.h.

Public Member Functions

template<class Range >
 VectorD (const Range &r)
 Will accept a list of floats from Python. More...
 
template<int OD>
 VectorD (const VectorD< OD > &o)
 
template<class It >
 VectorD (It b, It e)
 
VectorD get_unit_vector () const
 
double operator* (const VectorD &o) const
 
VectorD operator* (double s) const
 
VectorDoperator*= (double f)
 
VectorD operator+ (VectorD ret) const
 
VectorDoperator+= (const VectorD &o)
 
VectorD operator- () const
 
VectorD operator- (const VectorD &o) const
 
VectorDoperator-= (const VectorD &o)
 
VectorD operator/ (double s) const
 
VectorDoperator/= (double f)
 
template<class R >
VectorDoperator= (const R &o)
 
- Public Member Functions inherited from IMP::algebra::VectorBaseD< D >
template<class Range >
 VectorBaseD (const Range &r)
 
 VectorBaseD ()
 Default constructor. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
Floats get_coordinates () const
 
const double * get_data () const
 Return a pointer to the data stored. More...
 
unsigned int get_dimension () const
 
double get_magnitude () const
 
double get_scalar_product (const VectorBaseD< D > &o) const
 
double get_squared_magnitude () const
 
template<class R >
VectorBaseD< D > & operator= (const R &r)
 
double operator[] (unsigned int i) const
 Return the ith Cartesian coordinate. More...
 
double & operator[] (unsigned int i)
 Return the ith Cartesian coordinate. More...
 

Additional Inherited Members

- Public Types inherited from IMP::algebra::VectorBaseD< D >
typedef const double * const_iterator
 
typedef const double & const_reference
 
typedef std::ptrdiff_t difference_type
 
typedef double * iterator
 
typedef
std::random_access_iterator_tag 
iterator_category
 
typedef double * pointer
 
typedef double & reference
 
typedef double value_type
 
- Static Public Attributes inherited from IMP::algebra::VectorBaseD< D >
static const int DIMENSION = D
 

Constructor & Destructor Documentation

template<int D>
template<class Range >
IMP::algebra::VectorD< D >::VectorD ( const Range &  r)
explicit

Will accept a list of floats from Python.

Definition at line 55 of file VectorD.h.

template<int D>
template<class It >
IMP::algebra::VectorD< D >::VectorD ( It  b,
It  e 
)

The distance between b and e must be equal to D . \

Definition at line 55 of file VectorD.h.


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