//---------------------------------------------------------------------------

#ifndef FC_MinH
#define FC_MinH
//---------------------------------------------------------------------------

class FC_Min {
    private:
        PLA *source;                 // source PLA. Must not be modified
        PLA *implpool;              // implicant pool. Here FC-Min feeds the result

		PLA sourcecopy;

        // FC-Min parameters

		unsigned int DF;

		// internal statistics
		unsigned int trials, hits;
		TermQueue * tq_out;
		int iterations;

		bool GenerateImplicant( const set<Term*> &Cover, const string &Mask );

    public:
        FC_Min( PLA *_pla, PLA *_implpool, int iterations, TermQueue * tq_out );
        //~FC_Min(void);
		void SetDF( const unsigned int _DF ) { DF = _DF; };
        void Run(void);

		unsigned int GetTrials(void) { return trials; };	// returns # of trials for an implicant
		unsigned int GetHits(void) { return hits; };		// returns # of generated implicants
};

#endif
