MDStressLab++
|
#include <SpatialHash.h>
Public Types | |
typedef Select< isConst, const MatrixXd, MatrixXd >::Result | A |
typedef Select< isConst, const Vector3d, Vector3d >::Result | B |
typedef Select< isConst, const std::vector< Vector3d >, std::vector< Vector3d > >::Result | C |
Public Member Functions | |
SpatialHash () | |
SpatialHash (Vector3d origin, Vector3d step, A &coordinates) | |
SpatialHash (Vector3d origin, Vector3d step, C &coordinates) | |
Triplet | hashFunction (const int &i) |
virtual | ~SpatialHash () |
Public Attributes | |
Vector3d | origin |
Vector3d | step |
std::vector< Eigen::Map< B > > | coordinates |
std::map< Triplet, std::vector< int > > | hashTable |
A class to spatially hash a collection of points to a given 3D grid.
isConst | A boolean template parameter to specify whether the coordinates will be altered or not. |
Definition at line 86 of file SpatialHash.h.
typedef Select<isConst, const MatrixXd, MatrixXd>::Result SpatialHash< isConst >::A |
Definition at line 88 of file SpatialHash.h.
typedef Select<isConst, const Vector3d, Vector3d>::Result SpatialHash< isConst >::B |
Definition at line 89 of file SpatialHash.h.
typedef Select<isConst, const std::vector<Vector3d>, std::vector<Vector3d> >::Result SpatialHash< isConst >::C |
Definition at line 90 of file SpatialHash.h.
SpatialHash< isConst >::SpatialHash | ( | ) |
|
inline |
Definition at line 110 of file SpatialHash.h.
|
inline |
Definition at line 122 of file SpatialHash.h.
|
inlinevirtual |
Definition at line 151 of file SpatialHash.h.
|
inline |
hashFunction: A map that maps a particle \(i\) to a bin (Triplet)
Definition at line 139 of file SpatialHash.h.
std::vector<Eigen::Map<B> > SpatialHash< isConst >::coordinates |
Coordinates of the points
Definition at line 103 of file SpatialHash.h.
std::map<Triplet,std::vector<int> > SpatialHash< isConst >::hashTable |
hashTable: A map that maps a bin (Triplet) to an ordered list of particle numbers
Definition at line 107 of file SpatialHash.h.
Vector3d SpatialHash< isConst >::origin |
Origin of the grid used for hashing
Definition at line 95 of file SpatialHash.h.
Vector3d SpatialHash< isConst >::step |
Size of the grid used for hashing
Definition at line 99 of file SpatialHash.h.