IMP  2.0.0
The Integrative Modeling Platform
VectorD.h File Reference

Simple D vector class. More...

#include <IMP/algebra/algebra_config.h>
#include "GeometricPrimitiveD.h"
#include <IMP/base/types.h>
#include <IMP/base/base_macros.h>
#include <IMP/base/exception.h>
#include <IMP/base/utility.h>
#include <IMP/base/InputAdaptor.h>
#include <IMP/base/random.h>
#include "internal/vector.h"
#include <limits>
#include <cmath>
#include <boost/random/normal_distribution.hpp>
#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...
 
class  IMP::algebra::VectorInputD< D >
 
class  IMP::algebra::VectorInputD< 1 >
 

Namespaces

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

Macros

#define IMP_VECTOR_CHECK   check_vector()
 
#define IMP_VECTOR_CHECK_COMPATIBLE(o)   check_compatible_vector(o); o.check_vector()
 
#define IMP_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 VectorInputD< 1 > IMP::algebra::VectorInput1D
 
typedef base::Vector
< VectorInputD< 1 > > 
IMP::algebra::VectorInput1Ds
 
typedef VectorInputD< 2 > IMP::algebra::VectorInput2D
 
typedef base::Vector
< VectorInputD< 2 > > 
IMP::algebra::VectorInput2Ds
 
typedef VectorInputD< 3 > IMP::algebra::VectorInput3D
 
typedef base::Vector
< VectorInputD< 3 > > 
IMP::algebra::VectorInput3Ds
 
typedef VectorInputD< 4 > IMP::algebra::VectorInput4D
 
typedef base::Vector
< VectorInputD< 4 > > 
IMP::algebra::VectorInput4Ds
 
typedef VectorInputD< 5 > IMP::algebra::VectorInput5D
 
typedef base::Vector
< VectorInputD< 5 > > 
IMP::algebra::VectorInput5Ds
 
typedef VectorInputD< 6 > IMP::algebra::VectorInput6D
 
typedef base::Vector
< VectorInputD< 6 > > 
IMP::algebra::VectorInput6Ds
 
typedef VectorInputD<-1 > IMP::algebra::VectorInputKD
 
typedef base::Vector
< VectorInputD<-1 > > 
IMP::algebra::VectorInputKDs
 
typedef VectorD<-1 > IMP::algebra::VectorKD
 
typedef base::Vector< VectorD<-1 > > IMP::algebra::VectorKDs
 

Functions

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>
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)
 
VectorD<-1 > IMP::algebra::get_ones_vector_kd (unsigned int D, double v=1)
 Return a vector of ones (or another constant)
 
template<int D>
VectorD< D > IMP::algebra::get_zero_vector_d ()
 Return a vector of zeros.
 
VectorD<-1 > IMP::algebra::get_zero_vector_kd (int D)
 Return a dynamically sized vector of zeros.
 

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-2013 IMP Inventors. All rights reserved.

Definition in file VectorD.h.