//---------------------------------------------------------------------------
#ifndef tpfnctH
  #define tpfnctH
//---------------------------------------------------------------------------
struct TCovs;
class TBoolFnct;
//---------------------------------------------------------------------------
class TPfnct
{
public:
  char * iv;
  char * ov;
  int dim; //dimension (# of DCs)
  TPfnct * next;
  int valid; // 1,0
  TCovs * cov; // which parent on-terms are covered
  int covlen; // # of cov entries
  int * covfield; // field of encoded covered parent on-terms
  int dvar;
  int essential;
  int tmp;
  int tmp2;
  int cvd;
  int prime; // 1 = prime, 0 = non-prime
  int origin; // bit 0 - generated by CD-S, bit 1 - generated by FC-min
  int index; // index in TBoolFnct->index
public:
  TPfnct();
  TPfnct& operator=(TPfnct&);
  TPfnct(TBoolFnct *_parent, char *_iv, char *_ov, int _tdim);
  ~TPfnct();
  void DeleteCovs();
  int CountPrimes();
  int CountFCs();
  int CountCommons();
  int CountUnknowns();
};
//---------------------------------------------------------------------------
TCovs * DuplCov( TCovs * c );
char * JoinCubes( char * c1, char * c2, int len );
int Contains( char * c1, char * c2, int len );
int Intersects( char * c1, char * c2, int len );
int CountHamming( char * c1, char * c2, int len );
int CountPrimes( TPfnct * ff );
int CountFCs( TPfnct * ff );
int CountCommons( TPfnct * ff );
int CountUnknowns( TPfnct * ff );
//---------------------------------------------------------------------------
#endif
