Rosetta
Public Types | Public Member Functions | Private Attributes | List of all members
protocols::match::MatchCounter Class Reference

Class for counting the number of matches given a particular discretization level. More...

#include <MatchSet.hh>

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

Public Types

typedef core::Real Real
 
typedef core::Size Size
 
typedef core::Vector Vector
 
typedef numeric::geometry::BoundingBox< VectorBoundingBox
 
typedef numeric::geometry::hashing::Bin6D Bin6D
 
typedef utility::vector1< core::SizeHitCounts
 
typedef boost::unordered_map< boost::uint64_t, HitCounts, numeric::geometry::hashing::bin_index_hasher > HitHash
 

Public Member Functions

 MatchCounter ()
 
 ~MatchCounter () override
 
void set_bounding_box (BoundingBox const &bb)
 Use the same bounding box as the HitHasher / OccupiedSpaceHash. More...
 
void set_n_geometric_constraints (core::Size ngeomcsts)
 
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 (core::Size geomcst_id, std::list< Hit > const &hitlist)
 Add hits from a list of hits for a particular geometric constraint. More...
 
void add_hits (core::Size geomcst_id, std::list< Hit const * > const &hitptrlist)
 Add hit from the input list of hits for a particular geometric constraint. More...
 
core::Size count_n_matches () const
 Possibly slow method to predict the total number of matches given a set of hits and a particular grid resolution. (The main function that this class provides). More...
 

Private Attributes

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

Detailed Description

Class for counting the number of matches given a particular discretization level.

Member Typedef Documentation

◆ Bin6D

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

◆ BoundingBox

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

◆ HitCounts

◆ HitHash

typedef boost::unordered_map< boost::uint64_t, HitCounts, numeric::geometry::hashing::bin_index_hasher > protocols::match::MatchCounter::HitHash

◆ Real

◆ Size

◆ Vector

Constructor & Destructor Documentation

◆ MatchCounter()

protocols::match::MatchCounter::MatchCounter ( )

◆ ~MatchCounter()

protocols::match::MatchCounter::~MatchCounter ( )
overridedefault

Member Function Documentation

◆ add_hits() [1/2]

void protocols::match::MatchCounter::add_hits ( core::Size  geomcst_id,
std::list< Hit > const &  hitlist 
)

Add hits from a list of hits for a particular geometric constraint.

References binner_, hash_, initialized_, and n_geom_csts_.

Referenced by protocols::match::Matcher::estimate_n_matches_for_hit_subsets().

◆ add_hits() [2/2]

void protocols::match::MatchCounter::add_hits ( core::Size  geomcst_id,
std::list< Hit const * > const &  hitptrlist 
)

Add hit from the input list of hits for a particular geometric constraint.

References binner_, hash_, initialized_, and n_geom_csts_.

◆ count_n_matches()

MatchCounter::Size protocols::match::MatchCounter::count_n_matches ( ) const

Possibly slow method to predict the total number of matches given a set of hits and a particular grid resolution. (The main function that this class provides).

This function computes a lower bound on the number of matches. It will miss matches that are neighboring grid cells – matches that the match enumeration step later will find. This function, though, needs to be fast more than it needs to be perfectly accurate. A previous implementation performed a perfect, non-redundant counting of all the matches, but at considerable computational expense: at each decrease in the grid spacing, the number of non-empty cells in the hash table increases. The result was that the dynamic-grid refinement step would slow more and more as finer grid spacings were considered: exactly opposite of the purpose of the dynamic grid refinment.

References hash_, initialized_, and protocols::analysis::total.

Referenced by protocols::match::Matcher::estimate_n_matches_for_hit_subsets().

◆ initialize()

void protocols::match::MatchCounter::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.

Construct the hash table based on the parameters set previously

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

Referenced by protocols::match::Matcher::estimate_n_matches_for_hit_subsets().

◆ set_bounding_box()

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

Use the same bounding box as the HitHasher / OccupiedSpaceHash.

References bb_, and initialized_.

Referenced by protocols::match::Matcher::estimate_n_matches_for_hit_subsets().

◆ set_euler_bin_widths()

void protocols::match::MatchCounter::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_.

Referenced by protocols::match::Matcher::estimate_n_matches_for_hit_subsets().

◆ set_n_geometric_constraints()

void protocols::match::MatchCounter::set_n_geometric_constraints ( core::Size  ngeomcsts)

◆ set_uniform_euler_angle_bin_width()

void protocols::match::MatchCounter::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_.

◆ set_uniform_xyz_bin_width()

void protocols::match::MatchCounter::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_.

◆ set_xyz_bin_widths()

void protocols::match::MatchCounter::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_.

Referenced by protocols::match::Matcher::estimate_n_matches_for_hit_subsets().

Member Data Documentation

◆ bb_

BoundingBox protocols::match::MatchCounter::bb_
private

Referenced by initialize(), and set_bounding_box().

◆ binner_

numeric::geometry::hashing::SixDCoordinateBinnerOP protocols::match::MatchCounter::binner_
private

Referenced by add_hits(), and initialize().

◆ euler_bin_widths_

utility::fixedsizearray1< Real, 3 > protocols::match::MatchCounter::euler_bin_widths_
private

◆ hash_

HitHash protocols::match::MatchCounter::hash_
private

Referenced by add_hits(), and count_n_matches().

◆ initialized_

bool protocols::match::MatchCounter::initialized_
private

◆ n_geom_csts_

core::Size protocols::match::MatchCounter::n_geom_csts_
private

◆ xyz_bin_widths_

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

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