/*------------------------------------------------------------ Copyright (C) 1999 by Rolf Backofen, Sebastian Will. All Rights Reserved. Permission to use, copy, modify, and distribute this software and its documentation for NON-COMMERCIAL purposes and without fee is hereby granted provided that this copyright notice appears in all copies. THE AUTHORS AND PUBLISHER MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE AUTHORS AND PUBLISHER SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. ------------------------------------------------------------*/ #ifndef BASICDEF_HH #define BASICDEF_HH #include "math.h" #define NDEBUG typedef double cost_t; // don't compare two floating point values by ==, // this may almost always lead to errors. // instead use the function approx_equal #define APPROX_EQUAL 0.00001 bool approx_equal(cost_t x, const cost_t &y, cost_t ae=APPROX_EQUAL); const int PRECISION=6; // printlength of DistanceMatrix values const int ROWFILL= 2; // min distance between two successive row-values const int NOFILL= '0'; // this fillcharacter means that no-fill is used. const cost_t INFTY = 10000000.0; // const cost_t MINUSINFTY = -INFTY; class Pair { public: Pair(int i, int j); int i,j; }; #endif