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

#include <MatchSet.hh>

Inheritance diagram for protocols::match::HitNeighborFinder:
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::Bin6D 
Bin6D
 
typedef std::list< Hit const * > HitPtrList
 
typedef std::list< std::pair
< core::Size, Hit const * > > 
HitIndexList
 
typedef boost::unordered_map
< boost::uint64_t,
HitIndexList,
numeric::geometry::hashing::bin_index_hasher > 
HitHash
 

Public Member Functions

 HitNeighborFinder ()
 
 ~HitNeighborFinder () override
 
void set_bounding_box (BoundingBox const &bb)
 Use the same bounding box as the HitHasher / OccupiedSpaceHash. More...
 
void set_uniform_xyz_bin_width (Real bin_width)
 Give the same xyz bin witdh given to the HitHasher / OccupiedSpaceHash. More...
 
void set_uniform_euler_angle_bin_width (Real bin_width_degrees)
 Give the same euler-angle bin witdh given to the HitHasher / OccupiedSpaceHash. More...
 
void set_xyz_bin_widths (Vector const &bin_widths)
 Give the same xyz bin witdhs given to the HitHasher / OccupiedSpaceHash. More...
 
void set_euler_bin_widths (Vector const &euler_bin_widths)
 Give the same euler-angle bin witdhs given to the HitHasher / OccupiedSpaceHash. More...
 
void initialize ()
 Call this after the bounding-box and the bin-widths have been set up. Must be called before "add_hits" it called. This initializes the SixDCoordinateBinner. More...
 
void add_hits (std::list< Hit > const &hitlist)
 Add all hits (using hit pointers!) from one list of hits. More...
 
void add_hits (HitPtrList const &hitptrlist)
 Add hit pointers from the input list. More...
 
utility::vector1< HitPtrListconnected_components () const
 Compute the set of connected components for the set of input hits. This search iterates across the 2^6 halfbin neighbors of each hit and creates an adjacency graph to determine the connected components (CCs). The CCs are returned in a vector where each element contains a list of hit pointers to the elements of each connected component. More...
 
HitPtrList neighbor_hits (HitPtrList const &queryhits) const
 Find the neighbors of the given set of query hits. This search iterates across both the upper and the lower neighbors of the query hits (3^6 neighbors). More...
 

Private Member Functions

void hash_hits ()
 Put the hits that have been added to "all_hits" into the hash_. More...
 
core::Size find_next_bin (Real6 orig_point, Real6 offsets, utility::FixedSizeLexicographicalIterator< 6 > const &halfbin_lex, Bin6D &next_bin) const
 Find the neighbor bin for a point by taking a step along a certain offset vector for a subset of the dimensions as given by a lex iterator (the halfbin_lex). Returns 0 if successful, and the index of the euclidean dimension which is out-of-bounds if the step is not successful. More...
 
bool within_reach (Bin6D const &query_halfbin, Bin6D const &nb_halfbin, Bin6D const &nbbin, utility::FixedSizeLexicographicalIterator< 6 > const &halfbin_lex) const
 

Private Attributes

BoundingBox bb_
 
bool initialized_
 
utility::fixedsizearray1< Real, 3 > xyz_bin_widths_
 
utility::fixedsizearray1< Real, 3 > euler_bin_widths_
 
HitIndexList all_hits_
 
numeric::geometry::hashing::SixDCoordinateBinnerOP binner_
 
HitHash hash_
 

Detailed Description

Class for finding hit neighbors in 6D considering all 64 origin definitions (but without forming all 64 hashes).

Member Typedef Documentation

typedef numeric::geometry::hashing::Bin6D protocols::match::HitNeighborFinder::Bin6D
typedef numeric::geometry::BoundingBox< Vector > protocols::match::HitNeighborFinder::BoundingBox
typedef boost::unordered_map< boost::uint64_t, HitIndexList, numeric::geometry::hashing::bin_index_hasher > protocols::match::HitNeighborFinder::HitHash
typedef std::list< std::pair< core::Size, Hit const * > > protocols::match::HitNeighborFinder::HitIndexList

Constructor & Destructor Documentation

protocols::match::HitNeighborFinder::HitNeighborFinder ( )
protocols::match::HitNeighborFinder::~HitNeighborFinder ( )
overridedefault

Member Function Documentation

void protocols::match::HitNeighborFinder::add_hits ( std::list< Hit > const &  hitlist)

Add all hits (using hit pointers!) from one list of hits.

References all_hits_, hash_hits(), and initialized_.

void protocols::match::HitNeighborFinder::add_hits ( HitPtrList const &  hitptrlist)

Add hit pointers from the input list.

utility::vector1< HitNeighborFinder::HitPtrList > protocols::match::HitNeighborFinder::connected_components ( ) const

Compute the set of connected components for the set of input hits. This search iterates across the 2^6 halfbin neighbors of each hit and creates an adjacency graph to determine the connected components (CCs). The CCs are returned in a vector where each element contains a list of hit pointers to the elements of each connected component.

References all_hits_, binner_, find_next_bin(), hash_, protocols::match::Hit::second(), and within_reach().

HitNeighborFinder::Size protocols::match::HitNeighborFinder::find_next_bin ( Real6  orig_point,
Real6  offsets,
utility::FixedSizeLexicographicalIterator< 6 > const &  halfbin_lex,
Bin6D next_bin 
) const
private

Find the neighbor bin for a point by taking a step along a certain offset vector for a subset of the dimensions as given by a lex iterator (the halfbin_lex). Returns 0 if successful, and the index of the euclidean dimension which is out-of-bounds if the step is not successful.

References protocols::match::advance_to_neighbor_bin(), and binner_.

Referenced by connected_components(), and neighbor_hits().

void protocols::match::HitNeighborFinder::hash_hits ( )
private

Put the hits that have been added to "all_hits" into the hash_.

References all_hits_, binner_, and hash_.

Referenced by add_hits().

void protocols::match::HitNeighborFinder::initialize ( )

Call this after the bounding-box and the bin-widths have been set up. Must be called before "add_hits" it called. This initializes the SixDCoordinateBinner.

References bb_, binner_, euler_bin_widths_, initialized_, and xyz_bin_widths_.

HitNeighborFinder::HitPtrList protocols::match::HitNeighborFinder::neighbor_hits ( HitPtrList const &  queryhits) const

Find the neighbors of the given set of query hits. This search iterates across both the upper and the lower neighbors of the query hits (3^6 neighbors).

References binner_, find_next_bin(), hash_, and within_reach().

void protocols::match::HitNeighborFinder::set_bounding_box ( BoundingBox const &  bb)

Use the same bounding box as the HitHasher / OccupiedSpaceHash.

References bb_, and initialized_.

void protocols::match::HitNeighborFinder::set_euler_bin_widths ( Vector const &  euler_bin_widths)

Give the same euler-angle bin witdhs given to the HitHasher / OccupiedSpaceHash.

References euler_bin_widths_, and initialized_.

void protocols::match::HitNeighborFinder::set_uniform_euler_angle_bin_width ( Real  bin_width_degrees)

Give the same euler-angle bin witdh given to the HitHasher / OccupiedSpaceHash.

References euler_bin_widths_, and initialized_.

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

Give the same xyz bin witdh given to the HitHasher / OccupiedSpaceHash.

References initialized_, and xyz_bin_widths_.

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

Give the same xyz bin witdhs given to the HitHasher / OccupiedSpaceHash.

References initialized_, and xyz_bin_widths_.

bool protocols::match::HitNeighborFinder::within_reach ( Bin6D const &  query_halfbin,
Bin6D const &  nb_halfbin,
Bin6D const &  nbbin,
utility::FixedSizeLexicographicalIterator< 6 > const &  halfbin_lex 
) const
private

References binner_.

Referenced by connected_components(), and neighbor_hits().

Member Data Documentation

HitIndexList protocols::match::HitNeighborFinder::all_hits_
private
BoundingBox protocols::match::HitNeighborFinder::bb_
private

Referenced by initialize(), and set_bounding_box().

numeric::geometry::hashing::SixDCoordinateBinnerOP protocols::match::HitNeighborFinder::binner_
private
utility::fixedsizearray1< Real, 3 > protocols::match::HitNeighborFinder::euler_bin_widths_
private
HitHash protocols::match::HitNeighborFinder::hash_
private
bool protocols::match::HitNeighborFinder::initialized_
private
utility::fixedsizearray1< Real, 3 > protocols::match::HitNeighborFinder::xyz_bin_widths_
private

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