Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Library Class Reference

#include <Library.h>

List of all members.

Public Methods

 Library (void)
virtual ~Library ()
void initialize (void)
void addFragment (const Fragment &p_fragment, int p_position=Library::LAST_POSITION)
void deleteFragmentByIndex (const int p_position)
void pruneBasedOnOccurence (float p_fraction_to_keep)
void pruneZeroOccurence (void)
void pruneWithGoodnessFraction (const float p_threshold_fraction)
void pruneNWorstFragment (const int p_number)
void resetFragmentList (void)
void buildSubLibrary (const int p_nbr_division, const int p_index, Library *p_library) const
void shuffle (void)
double calculateSumScoreUpTo (float p_fraction)
const std::string & getLibraryName (void) const
void setLibraryName (const std::string &p_Name)
FragmentgetFragmentByIndex (const int p_index) const
const std::vector< Fragment * > & getFragmentList (void) const
const std::vector< Fragment * > & getRejectedFragmentList (void) const
int getNumberOfFragment (void) const
int getNumberOfRejectedFragment (void) const
int getNumberOfInitialFragment (void) const
void setIsKeptConstant (const bool p_is_kept_constant)
bool getIsKeptConstant (void) const
int getPotentialGoodnessCount (void) const
void setPotentialGoodnessCount (int p_potential)


Detailed Description

This class is a dimension in a combinatorial library. It contains a list of Fragment object part of this library of reagents.


Constructor & Destructor Documentation

Library::Library void    [inline]
 

Default constructor.

virtual Library::~Library   [virtual]
 

Default destructor


Member Function Documentation

void Library::addFragment const Fragment   p_fragment,
int    p_position = Library::LAST_POSITION
 

Add a fragment to the Library.

Parameters:
p_fragment  Is the Fragment object to add to the list.
p_position  Is the position where the Fragment is inserted/added. If this argument is omitted, the Fragment is added at the end of the Fragment list.

void Library::buildSubLibrary const int    p_nbr_division,
const int    p_index,
Library *    p_library
const
 

Subdivide the main Fragment list in equally sized smaller libraries, build one of these and return it.

Parameters:
p_nbr_division  Number of division considered.
p_index  Index of the subdivision to build. The values should be between 0 and p_nbr_division.
p_library  A valid pointer on a Library where the sublibrary will be stored.

double Library::calculateSumScoreUpTo float    p_fraction
 

Sum up the occurence count of the Fragment from first to last. The Fragment list is not sorted before.

Parameters:
p_fraction  Fraction of Fragment in main list to consider. A value of 0.3 means that the first 30% of Fragments will be considered in the list.

void Library::deleteFragmentByIndex const int    p_position
 

Remove the Fragment in the list at the specified position.

Parameters:
p_position  Index of the Fragment to be removed from the Fragment list. This must be [0, fragment list size[ .

Fragment* Library::getFragmentByIndex const int    p_index const [inline]
 

Return a pointer on a Fragment at a specified position.

Parameters:
p_index  Position of the Fragment to be returned [0,nbr_fragment_in_list[.

const std::vector<Fragment*>& Library::getFragmentList void    const [inline]
 

Return the main list of Fragment.

bool Library::getIsKeptConstant void    const [inline]
 

Returns 'true' if the Library is kept constant (not responding to removal methods). Return 'false' otherwise.

const std::string& Library::getLibraryName void    const [inline]
 

Getter of the Library's name.

int Library::getNumberOfFragment void    const [inline]
 

Return the number of Fragment in main list (kept, not rejected).

int Library::getNumberOfInitialFragment void    const [inline]
 

Return the number of Fragment initially read (size of main list and rejected list added).

int Library::getNumberOfRejectedFragment void    const [inline]
 

Return the number of Fragment in rejected list.

int Library::getPotentialGoodnessCount void    const [inline]
 

Return the maximum occurence count that this library can possibly get. This has to be initially set with the method setPotentialGoodnessCount().

const std::vector<Fragment*>& Library::getRejectedFragmentList void    const [inline]
 

Return the rejected list of Fragments.

void Library::initialize void   
 

Remove all the links to the fragments associated to this Library. Reset other properties as well.

void Library::pruneBasedOnOccurence float    p_fraction_to_keep
 

Move the Fragments with the lowest occurence counter into the rejected list. The list of fragment do not contain these moved fragments anymore. The Fragment list is first sorted.

Parameters:
p_fraction_to_keep  This argument specifies the fraction of the Fragment in the list to be kept. The fraction to move into the rejected list is 1.0 - p_fraction_to_keep.

void Library::pruneNWorstFragment const int    p_number
 

Remove the last fragments in the sorted list (based on occurence count, highest count first). The removed Fragments are moved into the rejected list.

Parameters:
p_number  The number of Fragments to remove.

void Library::pruneWithGoodnessFraction const float    p_threshold_fraction
 

Remove some Fragment from the main list, add them in the rejected list. Set to zero the occurence count in all remaining fragment. The Fragment list is first sorted.

Parameters:
p_threshold_fraction  This identifies which Fragment to eliminate. All Fragments with an occurence count less than p_threshold_fraction * potential_maximum_occurence_count are moved to the rejected list. The occurence count of all remaining Fragment is set zero.

void Library::pruneZeroOccurence void   
 

Move all the Fragments with a zero occurence counter to the rejected list.

void Library::resetFragmentList void   
 

Empty the rejected fragment list and put back these fragments into the main Fragment list.

void Library::setIsKeptConstant const bool    p_is_kept_constant [inline]
 

Set this Library as constant or not.

Parameters:
p_is_kept_constant  If this is 'true' the library will not be pruned by removal methods. Otherwise, the removal methods will be effective (default if this method has not been called with the value 'true' before).

void Library::setLibraryName const std::string &    p_Name [inline]
 

Setter of the Library's name.

void Library::setPotentialGoodnessCount int    p_potential [inline]
 

Set the maximum occurence count that this Library can possibly get.

void Library::shuffle void   
 

Shuffle the fragments: randomly change the fragment positions.


The documentation for this class was generated from the following file:
Generated on Sat Nov 4 15:59:00 2006 for GLARE by doxygen1.2.18