Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
protocols::match::HitHasher Class Reference

This object hashes hits into 6D voxels. This hash can then be traversed to retrieve the hits that hash to the same voxel (matches!). There are 64 hashes representing the 2^6 ways to perturb the bins in 6D by 1/2 of their bin width. More...

#include <MatchSet.hh>

Inheritance diagram for protocols::match::HitHasher:
Inheritance graph
[legend]

Public Types

typedef core::Real Real
 
typedef core::Size Size
 
typedef core::Vector Vector
 
typedef
numeric::geometry::BoundingBox
< Vector
BoundingBox
 
typedef
numeric::geometry::hashing::Real3 
Real3
 
typedef utility::vector1
< std::list< Hit const * > > 
MatchSet
 
typedef boost::unordered_map
< boost::uint64_t, MatchSet,
numeric::geometry::hashing::bin_index_hasher > 
HitHash
 

Public Member Functions

 HitHasher ()
 
 ~HitHasher () override
 
void set_bounding_box (BoundingBox const &bb)
 
void set_uniform_xyz_bin_width (Real bin_width)
 
void set_uniform_euler_angle_bin_width (Real bin_width_degrees)
 
void set_xyz_bin_widths (Vector const &bin_widths)
 
void set_euler_bin_widths (Vector const &euler_bin_widths)
 
void set_nhits_per_match (core::Size num_geometric_constraints)
 
void initialize ()
 
void insert_hit (core::Size geometric_constraint_id, Hit const *hit)
 Insert a hits into all 64 hash maps. More...
 
void insert_hit (core::Size which_hash_map, core::Size geometric_constraint_id, Hit const *hit)
 Insert a hits into a particular hash maps. More...
 
void clear_hash_map (core::Size which_hash_map)
 
HitHash::const_iterator hit_hash_begin (core::Size which_hash_map) const
 
HitHash::const_iterator hit_hash_end (core::Size which_hash_map) const
 
numeric::geometry::hashing::SixDCoordinateBinner
const & 
binner (core::Size which_hash_map) const
 

Private Attributes

BoundingBox bb_
 
bool initialized_
 
utility::fixedsizearray1< Real, 3 > xyz_bin_widths_
 
utility::fixedsizearray1< Real, 3 > euler_bin_widths_
 
core::Size n_geometric_constraints_per_match_
 
utility::vector1< std::pair
< numeric::geometry::hashing::SixDCoordinateBinnerOP,
HitHash > > 
hit_hashes_
 

Static Private Attributes

static core::Size const N_HASH_MAPS = 64
 

Detailed Description

This object hashes hits into 6D voxels. This hash can then be traversed to retrieve the hits that hash to the same voxel (matches!). There are 64 hashes representing the 2^6 ways to perturb the bins in 6D by 1/2 of their bin width.

The hit hasher expects someone else to own the hits. It takes as input constant pointers to the hits that exist and uses their addresses to hash upon. The hit hasher should only be used if you can guarantee that the hits it points to will outlive the hasher.

Member Typedef Documentation

typedef numeric::geometry::BoundingBox< Vector > protocols::match::HitHasher::BoundingBox
typedef boost::unordered_map< boost::uint64_t, MatchSet, numeric::geometry::hashing::bin_index_hasher > protocols::match::HitHasher::HitHash
typedef utility::vector1< std::list< Hit const * > > protocols::match::HitHasher::MatchSet
typedef numeric::geometry::hashing::Real3 protocols::match::HitHasher::Real3

Constructor & Destructor Documentation

protocols::match::HitHasher::HitHasher ( )
protocols::match::HitHasher::~HitHasher ( )
overridedefault

Member Function Documentation

numeric::geometry::hashing::SixDCoordinateBinner const& protocols::match::HitHasher::binner ( core::Size  which_hash_map) const
inline
void protocols::match::HitHasher::clear_hash_map ( core::Size  which_hash_map)
HitHasher::HitHash::const_iterator protocols::match::HitHasher::hit_hash_begin ( core::Size  which_hash_map) const
HitHasher::HitHash::const_iterator protocols::match::HitHasher::hit_hash_end ( core::Size  which_hash_map) const
void protocols::match::HitHasher::initialize ( )
void protocols::match::HitHasher::insert_hit ( core::Size  geometric_constraint_id,
Hit const *  hit 
)
void protocols::match::HitHasher::insert_hit ( core::Size  which_hash_map,
core::Size  geometric_constraint_id,
Hit const *  hit 
)

Insert a hits into a particular hash maps.

References bb_, hit_hashes_, initialized_, n_geometric_constraints_per_match_, and protocols::match::Hit::second().

void protocols::match::HitHasher::set_bounding_box ( BoundingBox const &  bb)
void protocols::match::HitHasher::set_euler_bin_widths ( Vector const &  euler_bin_widths)
void protocols::match::HitHasher::set_nhits_per_match ( core::Size  num_geometric_constraints)
void protocols::match::HitHasher::set_uniform_euler_angle_bin_width ( Real  bin_width_degrees)

References euler_bin_widths_, and initialized_.

void protocols::match::HitHasher::set_uniform_xyz_bin_width ( Real  bin_width)

References initialized_, and xyz_bin_widths_.

void protocols::match::HitHasher::set_xyz_bin_widths ( Vector const &  bin_widths)

Member Data Documentation

BoundingBox protocols::match::HitHasher::bb_
private
utility::fixedsizearray1< Real, 3 > protocols::match::HitHasher::euler_bin_widths_
private
utility::vector1< std::pair< numeric::geometry::hashing::SixDCoordinateBinnerOP, HitHash > > protocols::match::HitHasher::hit_hashes_
private
bool protocols::match::HitHasher::initialized_
private
core::Size protocols::match::HitHasher::n_geometric_constraints_per_match_
private

Referenced by insert_hit(), and set_nhits_per_match().

core::Size const protocols::match::HitHasher::N_HASH_MAPS = 64
staticprivate

Referenced by initialize(), and insert_hit().

utility::fixedsizearray1< Real, 3 > protocols::match::HitHasher::xyz_bin_widths_
private

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