IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::algebra::DefaultEmbeddingD< D > Class Template Reference

Embed a grid as an evenly spaced axis aligned grid. More...

#include <IMP/algebra/grid_embeddings.h>

Inheritance diagram for IMP::algebra::DefaultEmbeddingD< D >:

Detailed Description

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

Embed a grid as an evenly spaced axis aligned grid.

Definition at line 30 of file grid_embeddings.h.

Public Member Functions

 DefaultEmbeddingD (const VectorD< D > &origin, const VectorD< D > &cell)
unsigned int get_dimension () const
ExtendedGridIndexD< D > get_extended_index (const VectorD< D > &o) const
 Return the index that would contain the voxel if the grid extended there.
GridIndexD< D > get_index (const VectorD< D > &o) const
const VectorD< D > get_origin () const
const VectorD< D > & get_unit_cell () const
 Return the unit cell, relative to the origin.
void set_origin (const VectorD< D > &o)
void set_unit_cell (const VectorD< D > &o)
void show (std::ostream &out=std::cout) const

Center

Return the coordinates of the center of the voxel.

VectorD< D > get_center (const ExtendedGridIndexD< D > &ei) const
VectorD< D > get_center (const GridIndexD< D > &ei) const

Bounding box

Return the bounding box of the voxel.

BoundingBoxD< D > get_bounding_box (const ExtendedGridIndexD< D > &ei) const
BoundingBoxD< D > get_bounding_box (const GridIndexD< D > &ei) const

Constructor & Destructor Documentation

◆ DefaultEmbeddingD() [1/2]

template<int D>
IMP::algebra::DefaultEmbeddingD< D >::DefaultEmbeddingD ( const VectorD< D > & origin,
const VectorD< D > & cell )

Definition at line 74 of file grid_embeddings.h.

◆ DefaultEmbeddingD() [2/2]

template<int D>
IMP::algebra::DefaultEmbeddingD< D >::DefaultEmbeddingD ( )

Definition at line 78 of file grid_embeddings.h.

Member Function Documentation

◆ get_bounding_box() [1/2]

template<int D>
BoundingBoxD< D > IMP::algebra::DefaultEmbeddingD< D >::get_bounding_box ( const ExtendedGridIndexD< D > & ei) const

Definition at line 144 of file grid_embeddings.h.

◆ get_bounding_box() [2/2]

template<int D>
BoundingBoxD< D > IMP::algebra::DefaultEmbeddingD< D >::get_bounding_box ( const GridIndexD< D > & ei) const

Definition at line 150 of file grid_embeddings.h.

◆ get_center() [1/2]

template<int D>
VectorD< D > IMP::algebra::DefaultEmbeddingD< D >::get_center ( const ExtendedGridIndexD< D > & ei) const

Definition at line 130 of file grid_embeddings.h.

◆ get_center() [2/2]

template<int D>
VectorD< D > IMP::algebra::DefaultEmbeddingD< D >::get_center ( const GridIndexD< D > & ei) const

Definition at line 134 of file grid_embeddings.h.

◆ get_dimension()

template<int D>
unsigned int IMP::algebra::DefaultEmbeddingD< D >::get_dimension ( ) const

Definition at line 81 of file grid_embeddings.h.

◆ get_extended_index()

template<int D>
ExtendedGridIndexD< D > IMP::algebra::DefaultEmbeddingD< D >::get_extended_index ( const VectorD< D > & o) const

Return the index that would contain the voxel if the grid extended there.

For example vectors below the "lower left" corner of the grid have indexes with all negative components. This operation will always succeed.

Definition at line 106 of file grid_embeddings.h.

◆ get_index()

template<int D>
GridIndexD< D > IMP::algebra::DefaultEmbeddingD< D >::get_index ( const VectorD< D > & o) const

Definition at line 116 of file grid_embeddings.h.

◆ get_origin()

template<int D>
const VectorD< D > IMP::algebra::DefaultEmbeddingD< D >::get_origin ( ) const

Definition at line 80 of file grid_embeddings.h.

◆ get_unit_cell()

template<int D>
const VectorD< D > & IMP::algebra::DefaultEmbeddingD< D >::get_unit_cell ( ) const

Return the unit cell, relative to the origin.

That is, the unit cell is

BoundingBoxD<D>(get_zeros_vector_d<D>(),get_unit_cell());
BoundingBoxD()
Create an empty bounding box.
const VectorD< D > & get_unit_cell() const
Return the unit cell, relative to the origin.

Definition at line 100 of file grid_embeddings.h.

◆ set_origin()

template<int D>
void IMP::algebra::DefaultEmbeddingD< D >::set_origin ( const VectorD< D > & o)

Definition at line 79 of file grid_embeddings.h.

◆ set_unit_cell()

template<int D>
void IMP::algebra::DefaultEmbeddingD< D >::set_unit_cell ( const VectorD< D > & o)

Definition at line 82 of file grid_embeddings.h.


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