IMP logo

VectorD.h File Reference

Simple D vector class. More...

Include dependency graph for VectorD.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Data Structures

class  IMP::algebra::VectorD< D >
 A Cartesian vector in D-dimensions. More...

Namespaces

namespace  IMP
 The IMP kernel provides base classes and key shared functionality.
namespace  IMP::algebra
 This module contains general purpose algebraic and geometric methods.

Typedefs

typedef VectorD< 2 > IMP::algebra::Vector2D
typedef std::vector< VectorD< 2 > > IMP::algebra::Vector2Ds
typedef VectorD< 3 > IMP::algebra::Vector3D
typedef std::vector< VectorD< 3 > > IMP::algebra::Vector3Ds
typedef VectorD< 4 > IMP::algebra::Vector4D
typedef std::vector< VectorD< 4 > > IMP::algebra::Vector4Ds

Functions

template<unsigned int D>
int IMP::algebra::compare (const VectorD< D > &a, const VectorD< D > &b)
 lexicographic comparison of two vectors
template<unsigned int D>
VectorD< D > IMP::algebra::get_basis_vector_d (unsigned int coordinate)
 Return the basis vector for the given coordinate.
template<unsigned int D>
double IMP::algebra::get_distance (const VectorD< D > &v1, const VectorD< D > &v2)
 compute the distance between two vectors
template<unsigned int D>
VectorD< D > IMP::algebra::get_ones_vector_d (double v=1)
 Return a vector of ones (or another constant).
template<unsigned int D>
double IMP::algebra::get_squared_distance (const VectorD< D > &v1, const VectorD< D > &v2)
 compute the squared distance between two vectors
template<unsigned int D>
VectorD< D > IMP::algebra::get_zero_vector_d ()
 Return a vector of zeros.
template<unsigned int D>
VectorD< D > IMP::algebra::operator* (double s, const VectorD< D > &o)
Norms
We define a number of standard, $L^p$, norms on VectorD.
  • $L^1$ is the Manhattan distance, the sum of the components
  • $L^2$ is the standard Euclidean length
  • $L^{\inf}$ is the maximum of the components


template<unsigned int D>
double IMP::algebra::get_l1_norm (const VectorD< D > &v)
template<unsigned int D>
double IMP::algebra::get_l2_norm (const VectorD< D > &v)
template<unsigned int D>
double IMP::algebra::get_linf_norm (const VectorD< D > &v)

Detailed Description

Simple D vector class.

Copyright 2007-2010 IMP Inventors. All rights reserved.


Generated on Mon Mar 8 23:08:21 2010 for IMP by doxygen 1.5.8