//------------------------------------------------------------------------------
//    module para.h                                                           //
//                                                                            //
//    The class TParameter is derived from TParaSet and serves as a struct    //
//    with all parameters needed by the PNC cluster/learn algorithm.          //
//    See below or http://www.newty.de/pnc2/sdocu.html for more information.  //
//                                                                            //
//    copyright (c) 2000-2003 by Lars Haendel                                 //
//    home: www.newty.de                                                      //
//                                                                            //
//    This program is free software; you can redistribute it and/or modify    //
//    it under the terms of the GNU General Public License as published by    //
//    the Free Software Foundation as version 2 of the License.               //
//                                                                            //
//    This program is distributed in the hope that it will be useful,         //
//    but WITHOUT ANY WARRANTY; without even the implied warranty of          //
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           //
//    GNU General Public License for more details.                            //
//                                                                            //
//    You should have received a copy of the GNU General Public License       //
//    along with this program; if not, write to the Free Software             //
//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.               //
//                                                                            //
//------------------------------------------------------------------------------


#ifndef PARA_H
#define PARA_H

#include "ParaSet.h"                // due to:   base class TParaSet


//----------------------------------------------------------------------------------------------------------------------
#define SZ_N_G_MAX          "N_G_Max"
#define DEF_N_G_MAX        (int)   200          // maximum # tuples in adjazency matrix
#define MIN_N_G_MAX        (int)   10           // note: no hard minimum
#define MAX_N_G_MAX        (int)   10000        // note: no hard maximum, set to whatever you want
#define INT_N_G_MAX        (bool)  true

#define SZ_N_BINS           "N_Bins"
#define DEF_N_BINS         (int)   10           // # bins used to discretize continous variables for calculation of
#define MIN_N_BINS         (int)   2            // feature weights
#define MAX_N_BINS         (int)   40
#define INT_N_BINS         (bool)  true

#define SZ_OVERLAP_FAC     "OverlapFac"
#define DEF_OVERLAP_FAC    (float) 0.3
#define MIN_OVERLAP_FAC    (float) 0.0
#define MAX_OVERLAP_FAC    (float) 1.0
#define PRC_OVERLAP_FAC    (int)   1
#define INT_DIF_MAX        (bool)  false

#define SZ_NORMALIZE_BY_RANGE    "NormalizeByRange"
#define DEF_NORMALIZE_BY_RANGE   (bool) true

#define SZ_EQUAL_WIDTH_BINNING   "EqualWidthBinning"
#define DEF_EQUAL_WIDTH_BINNING  (bool) false



#ifdef BUILDER
using namespace std;
#endif

//----------------------------------------------------------------------------------------------------------------------
// class serves as struct with all parameters needed by the PNC cluster/learn algorithm and has load and save
// functionality
class TParameter : public TParaSet
{
public:

   // constructor/destructor
   TParameter(const int& nIntegerMaxMin, const bool& _f_Regression);             // default initialization constructor
   TParameter(){};                                                               // copy constructor
   ~TParameter(){};

   void Save(ofstream& file, const bool& f_Commented=false) const;               // save parameter to file (ofstream)
   bool Load(ifstream& file, int& line);                                         // load from file


//private:

   // additional parameters
   int   N_G_Max;             // maximum # tuples/elementary exemplars per group/interval
   int   N_Bins;              // # bins used to calculate mutual information for continous features
   float OverlapFac;          // additional factor to down weight symbolic distances/features
   bool  f_NormalizeByRange;
   bool  f_EqualWidthBinning;
   bool  f_Regression;        // flag: indicates regression task
};
#endif