00001 #ifndef LIBRARYSET_H
00002 #define LIBRARYSET_H
00003
00004 #include "CompositeFragment.h"
00005 #include "Library.h"
00006 #include <vector>
00007
00011 class LibrarySet
00012 {
00013 public:
00014
00015 typedef long long int IndexType;
00016
00020 LibrarySet( void );
00021
00025 virtual ~LibrarySet(){};
00026
00030 void initialize( void );
00031
00035 inline void addLibrary( Library* p_library );
00036
00040 inline void addLibrary( std::vector< Library* >& p_libraries );
00041
00045 inline IndexType getSetSize( void ) const;
00046
00050 inline IndexType getInitialSetSize( void ) const;
00051
00055 inline void goFirst( void );
00056
00060 inline void goNext( void );
00061
00065 inline void goPrevious( void );
00066
00071 inline void goTo( IndexType p_index );
00072
00076 inline bool isLast( void ) const;
00077
00081 inline bool isFirst( void ) const;
00082
00086 inline bool isEnd( void ) const;
00087
00092 void buildCompositeFragment( CompositeFragment& p_composite_fragment );
00093
00097 inline std::vector<Library*>& getLibraries( void );
00098
00102 std::string getCompositionString( void );
00103
00107 inline std::string getLibrarySetName( void ) const;
00108
00112 inline void setLibrarySetName( const std::string & p_name );
00113
00117 double getEffectiveness( void );
00118
00119 protected:
00120
00121 inline void calculateCurrentFragmentIndexes( void );
00122 inline std::vector<int>& getCurrentFragmentIndexes( void );
00123
00124 private:
00125
00126
00127 inline IndexType calculateIndex( const IndexType p_Index, const int p_LibrarySize, const int p_CycleSize );
00128
00129
00130 IndexType m_CurrentIndex;
00131 std::vector<Library*> m_Libraries;
00132 std::vector<int> m_CurrentFragmentIndexes;
00133 std::string m_LibrarySetName;
00134
00135 };
00136
00137 #include "LibrarySet.inline.cc"
00138
00139 #endif
00140 ector<int> m_CurrentFragmentIndexes;
00141 std::string m_LibrarySetName;
00142
00143 };
00144
00145 #include "LibrarySet.inline.cc"
00146
00147 #endif