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

#ifndef ExpandH
#define ExpandH
//---------------------------------------------------------------------------


typedef enum {no_IE, fast_IE, multiple_IE, exhaustive_IE, scatter_IE} IE_method;

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

          // Expand parameters
        IE_method method;			// no_IE, fast_IE, multiple_IE, exhaustive_IE, scatter_IE

        void FastExpand(void);
        void MultipleExpand(void);
        void ExhaustiveExpand(void);
		void ScatterExpand(void);

		TermQueue * tq_in, * tq_out, *tq_out2;

    public:
        Expand( PLA *_source, PLA *_implpool, TermQueue * tq_in, TermQueue * tq_out, TermQueue * tq_out2 = NULL);
		Expand( PLA *_source ) { source = _source; };
        //~Expand(void);
        void Run(void);
		void ExpandTerm( Term &t );		// Tries to expand a single term, so that the output matrix will be kept

		void SetMethod( const IE_method m ) { method = m; };
};

#endif
