Rosetta 3.5
 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]
Collaboration diagram for protocols::match::HitNeighborFinder:
Collaboration 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 ()
 
virtual ~HitNeighborFinder ()
 
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...
 
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).

Definition at line 133 of file MatchSet.hh.

Member Typedef Documentation

typedef numeric::geometry::hashing::Bin6D protocols::match::HitNeighborFinder::Bin6D

Definition at line 140 of file MatchSet.hh.

typedef numeric::geometry::BoundingBox< Vector > protocols::match::HitNeighborFinder::BoundingBox

Definition at line 139 of file MatchSet.hh.

typedef boost::unordered_map< boost::uint64_t, HitIndexList, numeric::geometry::hashing::bin_index_hasher > protocols::match::HitNeighborFinder::HitHash

Definition at line 144 of file MatchSet.hh.

typedef std::list< std::pair< core::Size, Hit const * > > protocols::match::HitNeighborFinder::HitIndexList

Definition at line 143 of file MatchSet.hh.

Definition at line 142 of file MatchSet.hh.

Definition at line 136 of file MatchSet.hh.

Definition at line 137 of file MatchSet.hh.

Definition at line 138 of file MatchSet.hh.

Constructor & Destructor Documentation

protocols::match::HitNeighborFinder::HitNeighborFinder ( )

Definition at line 244 of file MatchSet.cc.

protocols::match::HitNeighborFinder::~HitNeighborFinder ( )
virtual

Definition at line 245 of file MatchSet.cc.

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.

Definition at line 293 of file MatchSet.cc.

References all_hits_, hash_hits(), and initialized_.

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

Add hit pointers from the input list.

Definition at line 306 of file MatchSet.cc.

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.

Definition at line 330 of file MatchSet.cc.

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.

Definition at line 585 of file MatchSet.cc.

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_.

Definition at line 563 of file MatchSet.cc.

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.

Definition at line 311 of file MatchSet.cc.

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).

Definition at line 489 of file MatchSet.cc.

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

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

Use the same bounding box as the HitHasher / OccupiedSpaceHash.

Definition at line 248 of file MatchSet.cc.

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.

Definition at line 284 of file MatchSet.cc.

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.

Definition at line 265 of file MatchSet.cc.

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.

Definition at line 257 of file MatchSet.cc.

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.

Definition at line 273 of file MatchSet.cc.

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

Definition at line 602 of file MatchSet.cc.

References binner_.

Referenced by connected_components(), and neighbor_hits().

Member Data Documentation

HitIndexList protocols::match::HitNeighborFinder::all_hits_
private

Definition at line 229 of file MatchSet.hh.

Referenced by add_hits(), connected_components(), and hash_hits().

BoundingBox protocols::match::HitNeighborFinder::bb_
private

Definition at line 222 of file MatchSet.hh.

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

Definition at line 232 of file MatchSet.hh.

Referenced by connected_components(), hash_hits(), and neighbor_hits().

bool protocols::match::HitNeighborFinder::initialized_
private
utility::fixedsizearray1< Real, 3 > protocols::match::HitNeighborFinder::xyz_bin_widths_
private

Definition at line 226 of file MatchSet.hh.

Referenced by initialize(), set_uniform_xyz_bin_width(), and set_xyz_bin_widths().


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