Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
protocols::frag_picker::quota::QuotaPool Class Referenceabstract

represents a single pool used by quota selector More...

#include <QuotaPool.hh>

Inheritance diagram for protocols::frag_picker::quota::QuotaPool:
Inheritance graph
[legend]

Public Member Functions

 QuotaPool (std::string const &pool_name, core::Real quota_fraction)
 Creates a pool of a given size and name. More...
 
 ~QuotaPool () override
 
virtual bool could_be_accepted (ScoredCandidate) const =0
 
virtual core::Size total_size () const =0
 Says how many fragments (in total) may fit into this pool. More...
 
virtual core::Size current_size () const =0
 Says how many fragments are currently in this pool. More...
 
virtual core::Size size_left () const =0
 Says how many fragments can still be inserted into this pool. More...
 
void clear () override=0
 Makes the pool empty by removing all candidates. More...
 
virtual void push (ScoredCandidate)=0
 Push a fragment candidate into the pool container. More...
 
core::Size count_candidates () const override=0
 Check how many candidates have been already collected for a given position. More...
 
std::string const & get_pool_name () const
 returns the name assigned to this quota pool More...
 
virtual void show_availability (std::ostream &where) const
 prints information on which fragments can be accepted by this pool and how many of them More...
 
core::Real get_fraction () const
 returns the fraction of this quota pool in the entire population of fragments More...
 
virtual void set_fraction (core::Real new_fraction)
 Sets the fraction of this quota pool in the entire population of fragments. More...
 
virtual core::Real quota_score (ScoredCandidate candidate) const
 provides the score for a candidate that was used to sort a quota pool More...
 
- Public Member Functions inherited from protocols::frag_picker::CandidatesCollector
virtual bool add (ScoredCandidate)=0
 Insert a fragment candidate to the container. More...
 
virtual void insert (core::Size, CandidatesCollectorOP)=0
 inserts candidates from another collector Candidates may or may not get inserted depending on the candidate and type of storage More...
 
virtual core::Size count_candidates (core::Size) const =0
 Check how many candidates have been already collected for a given position. More...
 
virtual core::Size query_length () const =0
 Check the size of query sequence that this object knows. This is mainly to be ale to check if it is the same as in the other parts of fragment picking machinery. More...
 
virtual ScoredCandidatesVector1get_candidates (core::Size position_in_query)=0
 
virtual void print_report (std::ostream &output, scores::FragmentScoreManagerOP scoring) const =0
 Describes what has been collected. More...
 

Private Attributes

std::string pool_name_
 
core::Real quota_fraction_
 

Detailed Description

represents a single pool used by quota selector

Constructor & Destructor Documentation

protocols::frag_picker::quota::QuotaPool::QuotaPool ( std::string const &  pool_name,
core::Real  quota_fraction 
)
inline

Creates a pool of a given size and name.

Parameters
name- name assigned to this pool. This in general may be any string that later allows one control pool's behavior from a flag file
protocols::frag_picker::quota::QuotaPool::~QuotaPool ( )
inlineoverride

Member Function Documentation

void protocols::frag_picker::quota::QuotaPool::clear ( )
overridepure virtual
virtual bool protocols::frag_picker::quota::QuotaPool::could_be_accepted ( ScoredCandidate  ) const
pure virtual
core::Size protocols::frag_picker::quota::QuotaPool::count_candidates ( ) const
overridepure virtual

Check how many candidates have been already collected for a given position.

This is a very special case - collector will be used only for a given position. Thus it returns the total number of inserted candidates, as count_candidates() does

Implements protocols::frag_picker::CandidatesCollector.

Implemented in protocols::frag_picker::quota::ABEGO_SS_Pool, and protocols::frag_picker::quota::SecondaryStructurePool.

virtual core::Size protocols::frag_picker::quota::QuotaPool::current_size ( ) const
pure virtual

Says how many fragments are currently in this pool.

Implemented in protocols::frag_picker::quota::ABEGO_SS_Pool, and protocols::frag_picker::quota::SecondaryStructurePool.

core::Real protocols::frag_picker::quota::QuotaPool::get_fraction ( ) const
inline

returns the fraction of this quota pool in the entire population of fragments

References quota_fraction_.

std::string const& protocols::frag_picker::quota::QuotaPool::get_pool_name ( ) const
inline
virtual void protocols::frag_picker::quota::QuotaPool::push ( ScoredCandidate  )
pure virtual

Push a fragment candidate into the pool container.

Implemented in protocols::frag_picker::quota::ABEGO_SS_Pool, and protocols::frag_picker::quota::SecondaryStructurePool.

virtual core::Real protocols::frag_picker::quota::QuotaPool::quota_score ( ScoredCandidate  candidate) const
inlinevirtual

provides the score for a candidate that was used to sort a quota pool

This base class returns the most recent total score for a fragment

Reimplemented in protocols::frag_picker::quota::ABEGO_SS_Pool, and protocols::frag_picker::quota::SecondaryStructurePool.

virtual void protocols::frag_picker::quota::QuotaPool::set_fraction ( core::Real  new_fraction)
inlinevirtual
virtual void protocols::frag_picker::quota::QuotaPool::show_availability ( std::ostream &  where) const
inlinevirtual

prints information on which fragments can be accepted by this pool and how many of them

base class' impementation says the capacity that has left

References pool_name_, and size_left().

virtual core::Size protocols::frag_picker::quota::QuotaPool::size_left ( ) const
pure virtual

Says how many fragments can still be inserted into this pool.

Implemented in protocols::frag_picker::quota::ABEGO_SS_Pool, and protocols::frag_picker::quota::SecondaryStructurePool.

Referenced by show_availability().

virtual core::Size protocols::frag_picker::quota::QuotaPool::total_size ( ) const
pure virtual

Says how many fragments (in total) may fit into this pool.

Implemented in protocols::frag_picker::quota::ABEGO_SS_Pool, and protocols::frag_picker::quota::SecondaryStructurePool.

Member Data Documentation

std::string protocols::frag_picker::quota::QuotaPool::pool_name_
private

Referenced by get_pool_name(), and show_availability().

core::Real protocols::frag_picker::quota::QuotaPool::quota_fraction_
private

Referenced by get_fraction(), and set_fraction().


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