#include <Library.h>
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) |
Fragment * | getFragmentByIndex (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) |
|
Default constructor. |
|
Default destructor |
|
Add a fragment to the Library. |
|
Subdivide the main Fragment list in equally sized smaller libraries, build one of these and return it.
|
|
Sum up the occurence count of the Fragment from first to last. The Fragment list is not sorted before.
|
|
Remove the Fragment in the list at the specified position. |
|
Return a pointer on a Fragment at a specified position.
|
|
Return the main list of Fragment. |
|
Returns 'true' if the Library is kept constant (not responding to removal methods). Return 'false' otherwise. |
|
Getter of the Library's name. |
|
Return the number of Fragment in main list (kept, not rejected). |
|
Return the number of Fragment initially read (size of main list and rejected list added). |
|
Return the number of Fragment in rejected list. |
|
Return the maximum occurence count that this library can possibly get. This has to be initially set with the method setPotentialGoodnessCount(). |
|
Return the rejected list of Fragments. |
|
Remove all the links to the fragments associated to this Library. Reset other properties as well. |
|
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.
|
|
Remove the last fragments in the sorted list (based on occurence count, highest count first). The removed Fragments are moved into the rejected list.
|
|
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. |
|
Move all the Fragments with a zero occurence counter to the rejected list. |
|
Empty the rejected fragment list and put back these fragments into the main Fragment list. |
|
Set this Library as constant or not.
|
|
Setter of the Library's name. |
|
Set the maximum occurence count that this Library can possibly get. |
|
Shuffle the fragments: randomly change the fragment positions. |