00001 #ifndef GLAREALGORITHM_H
00002 #define GLAREALGORITHM_H
00003
00004 #include "PartitionLibrarySet.h"
00005
00006 #include <iosfwd>
00007 #include <vector>
00008
00009 class Library;
00010 class LibrarySet;
00011
00015 class GlareAlgorithm
00016 {
00017 public:
00018
00022 virtual ~GlareAlgorithm(){};
00023
00027 virtual bool isOptimized( void ) = 0;
00028
00032 virtual void evaluateGoodness( void ) = 0;
00033
00037 virtual void pruneDimensions( void ) = 0;
00038
00042 virtual std::ostream& getTrace( std::ostream& p_ostream ) = 0;
00043
00047 virtual void reset( void ){};
00048
00052 void usePartition( bool p_is_using_partition = true );
00053
00057 bool isUsingPartition( void ) const;
00058
00062 void setNumberPartition( int p_number );
00063
00067 void setLibrarySets( std::vector< LibrarySet* > p_library_sets );
00068
00072 void addLibrarySet( LibrarySet* p_library_set );
00073
00077 void setLibraries( std::vector< Library* > p_libraries );
00078
00082 void addLibrary( Library* p_library );
00083
00084 protected:
00085
00086 void initialize( void );
00087 std::vector< LibrarySet* >& getLibrarySets( void );
00088 std::vector< LibrarySet* > m_library_sets;
00089 std::vector< Library* >& getLibraries( void );
00090 std::vector< Library* > m_libraries;
00091 std::vector< LibrarySet* > partitionLibrarySet( void );
00092 int m_iteration_counter;
00093 int m_maximum_iteration_threshold;
00094
00095
00096 bool m_is_using_partition;
00097 int m_number_partition;
00098 PartitionLibrarySet m_partition_library_set;
00099 };
00100
00101 #endif
00102 partition;
00103 int m_number_partition;
00104 PartitionLibrarySet m_partition_library_set;
00105 };
00106
00107 #endif