// defines
#ifndef _DEFINES_H
#define _DEFINES_H

#include <fstream>

/* defines used throughout the source

   BUILDER     // C++ builder is used as compiler
   GUI         // GUI version
   RELEASE     // release versions without obsolete parameters and without statistical tests or confidence intervals ...

#ifdef BUILDER             // C++ builder specific
using namespace std;

void WriteDefines(ofstream& file, const bool& f_Regression);   // utility function to write settings/defines to file

// batch interface
// #define VALIDATION_1          // see readme.txt in sub directory 'validation' (default: OFF)
// #define VALIDATION_2          // do. (default: OFF)

// TPnc flags
#define RE_CALC_Y_C               // for regression tasks only: calculate output of cuboid as mean of the output of all
                                  // merged tuples, slightly better (default: ON)

// note: one and only one merge test must be defined
//#define SINGLE_MERGE_TEST       // use normal single merge test (default: OFF)
#define DOUBLE_MERGE_TEST         // use double merge test (default: ON)
//#define CONFIDENT_MERGE_TEST    // use confident merge test (default: OFF)   note: must not be defined if RELEASE is defined
#define ALPHA (float) 0.05        // error probability needed for confidence intervals (default: 0.05)
//#define LAPCOR_MERGE_TEST       // use laplace corrected merge test (default: OFF) (doesn't work)

//#define FORWARD_PRUNING         // use forward selection pruning instead of backward one, higher compression but worse
                                  // prediction quality (default: OFF)

// TPnc & TPrediction flags
#define NOMINAL_VARIABLES (bool) true  // handle nominal variables as symbolic (default: true)

// hirate: one and only one must be defined (even if HITRATE is not defined, i.e. deactivated)
#define NORMAL_HITRATE                 // (default: ON)
//#define LAPCOR_HITRATE               // (default: OFF)
//#define CONF_HITRATE                 // (default: OFF)   note: cannot be defined if RELEASE is defined

// TPrediction flags
//#define HITRATE             // use cuboid's hitrate in prediction routines, sometimes slightly better but increases
                              // model's size (default Off)
//#define MASS_TIE_BREAKING   // use mass as tie breaking criterion (obsolet if HITRATE is defined) (default: OFF)
#define GAUSS_MSF             // use gaussian membership functions outside the cuboid, i.e. exp(-d^2) instead of exp(-d)
                              // slightly better (default: ON)

// misc
#define SEARCH_LINES (int)  64

#define DEF_COM_CHAR (char) '%'           // comment character in output files (default: '%')
extern char ComChar;

// returns true if 'c' is a comment character, i.e. a character starting a comment
inline bool IsComment(const char c) { return (c == '#' || c == '%' || c == '*'); };

#define STS 1024  // string size used for filenames etc.

// some error texts
#define MSG_IPI "Insufficient programmer's intelligence!"
#define MSG_FNI "Functionality wasn't implemented. Should not happen. If you read this, lean back and drink some coffee!"

// debugging

//#define DEBUG                        // debug mode (default: OFF!!)
//#define DEBUG_LOG_ON                 // log some actions like TPnc objects creation/destruction (default: OFF!!)

extern ofstream DebugLogFile;          // debug logfile (global)