IMP  2.2.1
The Integrative Modeling Platform
IMP::algebra::VectorBaseD< D > Class Template Reference

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

#include <IMP/algebra/VectorBaseD.h>

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

Public Types

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
 

Public Member Functions

template<class Range >
 VectorBaseD (const Range &r)
 
 VectorBaseD ()
 Default constructor.
 
iterator begin ()
 
const_iterator begin () const
 
iterator coordinates_begin ()
 
const_iterator coordinates_begin () const
 
iterator coordinates_end ()
 
const_iterator coordinates_end () const
 
iterator end ()
 
const_iterator end () const
 
Floats get_coordinates () const
 
const double * get_data () const
 
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
 
double & operator[] (unsigned int i)
 

Static Public Attributes

static const int DIMENSION = D
 

Detailed Description

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

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 50 of file VectorBaseD.h.

Constructor & Destructor Documentation

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

Will accept a list of floats from python.

Definition at line 74 of file VectorBaseD.h.

Member Function Documentation

template<int D>
iterator IMP::algebra::VectorBaseD< D >::coordinates_begin ( )
Deprecated:
As of IMP release 2.2. See the IMP Deprecation Policy for more information about deprecation in IMP. Use begin().

Definition at line 193 of file VectorBaseD.h.

template<int D>
const_iterator IMP::algebra::VectorBaseD< D >::coordinates_begin ( ) const
Deprecated:
As of IMP release 2.2. See the IMP Deprecation Policy for more information about deprecation in IMP. Use begin().

Definition at line 197 of file VectorBaseD.h.

template<int D>
const double* IMP::algebra::VectorBaseD< D >::get_data ( ) const

Return a pointer to the data stored.

Useful for conversion to other types.

Definition at line 226 of file VectorBaseD.h.

template<int D>
double IMP::algebra::VectorBaseD< D >::operator[] ( unsigned int  i) const

Return the ith Cartesian coordinate. In 3D use [0] to get the x coordinate etc.

Definition at line 104 of file VectorBaseD.h.

template<int D>
double& IMP::algebra::VectorBaseD< D >::operator[] ( unsigned int  i)

Return the ith Cartesian coordinate. In 3D use [0] to get the x coordinate etc.

Definition at line 111 of file VectorBaseD.h.


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