IMP  2.2.1
The Integrative Modeling Platform
VectorD.h File Reference

Simple D vector class. More...

#include <IMP/algebra/algebra_config.h>
#include "VectorBaseD.h"
#include <IMP/base/types.h>
#include <IMP/base/check_macros.h>
#include <IMP/base/exception.h>
#include <IMP/base/utility.h>
#include <IMP/base/InputAdaptor.h>
#include <IMP/base/random.h>
#include "algebra_macros.h"
#include <boost/random/variate_generator.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/range.hpp>
#include "internal/vector.h"
#include <limits>
#include <cmath>
#include <boost/static_assert.hpp>
+ 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.

Classes

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

Namespaces

 IMP
 All IMP::kernel code is brought into the IMP namespace.
 
 IMP::algebra
 See IMP.algebra for more information.
 

Macros

#define IMP_ALGEBRA_VECTOR_CHECK   check_vector()
 
#define IMP_ALGEBRA_VECTOR_CHECK_COMPATIBLE(o)
 
#define IMP_ALGEBRA_VECTOR_CHECK_INDEX(i)   check_index(i)
 

Typedefs

typedef VectorD< 1 > IMP::algebra::Vector1D
 
typedef base::Vector< VectorD< 1 > > IMP::algebra::Vector1Ds
 
typedef VectorD< 2 > IMP::algebra::Vector2D
 
typedef base::Vector< VectorD< 2 > > IMP::algebra::Vector2Ds
 
typedef VectorD< 3 > IMP::algebra::Vector3D
 
typedef base::Vector< VectorD< 3 > > IMP::algebra::Vector3Ds
 
typedef VectorD< 4 > IMP::algebra::Vector4D
 
typedef base::Vector< VectorD< 4 > > IMP::algebra::Vector4Ds
 
typedef VectorD< 5 > IMP::algebra::Vector5D
 
typedef base::Vector< VectorD< 5 > > IMP::algebra::Vector5Ds
 
typedef VectorD< 6 > IMP::algebra::Vector6D
 
typedef base::Vector< VectorD< 6 > > IMP::algebra::Vector6Ds
 
typedef VectorD<-1 > IMP::algebra::VectorKD
 
typedef base::Vector< VectorD<-1 > > IMP::algebra::VectorKDs
 

Functions

template<int D>
int IMP::algebra::compare (const VectorD< D > &a, const VectorD< D > &b)
 lexicographic comparison of two vectors More...
 
template<int D>
VectorD< D > IMP::algebra::get_basis_vector_d (unsigned int coordinate)
 Return the basis vector for the given coordinate. More...
 
VectorD<-1 > IMP::algebra::get_basis_vector_kd (int D, unsigned int coordinate)
 Return a dynamically sized basis vector.
 
template<int D>
double IMP::algebra::get_distance (const VectorD< D > &v1, const VectorD< D > &v2)
 compute the distance between two vectors More...
 
template<int D>
VectorD< D > IMP::algebra::get_elementwise_product (const algebra::VectorD< D > &a, const algebra::VectorD< D > &b)
 
template<int D>
VectorD< D > IMP::algebra::get_elementwise_product (const Ints &a, const algebra::VectorD< D > &b)
 
template<int D>
VectorD< D > IMP::algebra::get_ones_vector_d (double v=1)
 Return a vector of ones (or another constant)
 
template<int D>
VectorD< D > IMP::algebra::get_ones_vector_kd (unsigned int Di, double v=1)
 Return a vector of ones (or another constant) More...
 
template<int D>
double IMP::algebra::get_squared_distance (const VectorD< D > &v1, const VectorD< D > &v2)
 compute the squared distance between two vectors More...
 
template<class C >
const VectorD< C::DIMENSION > & IMP::algebra::get_vector_geometry (const C &g)
 
template<int D>
VectorD< D > IMP::algebra::get_zero_vector_d ()
 Return a vector of zeros.
 
template<int D>
VectorD< D > IMP::algebra::get_zero_vector_kd (int Di)
 Return a dynamically sized vector of zeros.
 
template<int D>
VectorD< D > IMP::algebra::operator* (double s, VectorD< D > o)
 
template<class C , class E >
void IMP::algebra::set_vector_geometry (C &g, const E &v)
 

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<int D>
double IMP::algebra::get_l2_norm (const VectorD< D > &v)
 
template<int D>
double IMP::algebra::get_l1_norm (const VectorD< D > &v)
 
template<int D>
double IMP::algebra::get_linf_norm (const VectorD< D > &v)
 

Detailed Description

Copyright 2007-2014 IMP Inventors. All rights reserved.

Definition in file VectorD.h.

Macro Definition Documentation

#define IMP_ALGEBRA_VECTOR_CHECK_COMPATIBLE (   o)
Value:
check_compatible_vector(o); \
o.check_vector()

Definition at line 33 of file VectorD.h.