home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 March / Chip_1999-03_cd.bin / zkuste / delphi / D / MATEM.ARJ / MATH1.ZIP / cppbld1 / math1.hpp next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  4.9 KB  |  122 lines

  1. //----------------------------------------------------------------------------
  2. // Math1.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: Math1.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef Math1HPP
  6. #define Math1HPP
  7. //----------------------------------------------------------------------------
  8. #include <System.hpp>
  9. namespace Math1
  10. {
  11. //-- type declarations -------------------------------------------------------
  12. typedef void __fastcall (*FeedBackProcType)(long StateCnt);
  13.  
  14. enum VarType { rnum, dnum, snum, inum, lnum, Bool, strg };
  15.  
  16. class __declspec(delphiclass) TRandGen;
  17. class __declspec(pascalimplementation) TRandGen : public System::TObject
  18. {
  19.     typedef System::TObject inherited;
  20.     
  21. private:
  22.     double FLowBorder;
  23.     double FHighBorder;
  24.     int FResolution;
  25.     void *FDistVec;
  26.     void __fastcall SetResolution(int res);
  27.     double __fastcall GetProbability(int Idx);
  28.     double __fastcall GetRandNum(void);
  29.     double __fastcall GetLambda(int ix);
  30.     void __fastcall SetProbability(int Idx, double Value);
  31.     
  32. public:
  33.     __fastcall TRandGen(void);
  34.     __fastcall virtual ~TRandGen(void);
  35.     __property double HighBorder = {read=FHighBorder, write=FHighBorder};
  36.     __property double Lambda[int ix] = {read=GetLambda};
  37.     __property double LowBorder = {read=FLowBorder, write=FLowBorder};
  38.     void __fastcall Normalize(void);
  39.     void __fastcall NormalDistri(double m, double s);
  40.     __property double Probability[int ix] = {read=GetProbability, write=SetProbability};
  41.     __property double Random = {read=GetRandNum};
  42.     int __fastcall IndexOfLambda(double Lambda);
  43.     __property int Resolution = {read=FResolution, write=SetResolution, nodefault};
  44.     void __fastcall UniformDistri(void);
  45.     void __fastcall WeibullDistri(double alpha, double beta);
  46. };
  47.  
  48. //-- var, const, procedure ---------------------------------------------------
  49. extern Extended e;
  50. extern Extended etom1;
  51. extern Extended lg2;
  52. extern Extended lg5;
  53. extern Extended lge;
  54. extern Extended lgPi;
  55. extern Extended ln10;
  56. extern Extended ln2;
  57. extern Extended lnPi;
  58. extern Extended PiH;
  59. extern Extended PiSqr;
  60. extern Extended Pitom1;
  61. extern Extended sqrt2;
  62. extern Extended sqrt2pi;
  63. extern Extended sqrt2pitom1;
  64. extern Extended GoldenR;
  65. extern Extended MinReal;
  66. extern Extended MaxReal;
  67. extern Extended MinSingle;
  68. extern Extended MaxSingle;
  69. extern Extended MinDouble;
  70. extern Extended MaxDouble;
  71. extern Extended MinExtended;
  72. extern Extended MaxExtended;
  73. extern long ProcStat;
  74. extern FeedBackProcType MathFeedBackProc;
  75. extern void __fastcall CalcScalePars(int Ntick, double LowVal, double HighVal, double &LowTick, double 
  76.     &Distance, Word &Divi);
  77. extern long __fastcall ScanBin( System::AnsiString Instring, int &Idx);
  78. extern long __fastcall ScanHex( System::AnsiString Instring, int &Idx);
  79. extern long __fastcall ScanOctal( System::AnsiString Instring, int &Idx);
  80. extern long __fastcall ScanDecimal( System::AnsiString Instring, int &Idx);
  81. extern double __fastcall ScanFPNum( System::AnsiString Instring, bool AllowExp, int DecPChar, int &Idx
  82.     );
  83. extern System::AnsiString __fastcall strf(double r, int FieldWidth, int DecP);
  84. extern void __fastcall ExChange(void *x, void *y, Word size);
  85. extern Byte __fastcall DecodeBit(int ix);
  86. extern int __fastcall CountBits(Byte InByte);
  87. extern double __fastcall lg(double x);
  88. extern double __fastcall ld(double x);
  89. extern double __fastcall sinh(double x);
  90. extern double __fastcall cosh(double x);
  91. extern double __fastcall tgh(double x);
  92. extern double __fastcall tg(double x);
  93. extern double __fastcall cot(double x);
  94. extern System::AnsiString __fastcall MakeEFormat(double x, int w, int d);
  95. extern System::AnsiString __fastcall Decimal(long innum, Byte places);
  96. extern System::AnsiString __fastcall Hex(long innum, Byte places);
  97. extern System::AnsiString __fastcall Octal(long innum, Byte places);
  98. extern System::AnsiString __fastcall Bin(long innum, Byte places);
  99. extern long __fastcall SortIntoArray(void * ArrayAdr, long LengArray, VarType TypArray, void * value
  100.     , bool Ascending, bool Dublicates);
  101. extern void __fastcall InsertIntoArray(void * ArrayAdr, long LengArray, VarType TypArray, void * value
  102.     , long index);
  103. extern void __fastcall SortArray(void * ArrayAdr, long LengArray, VarType TypArray, bool Ascending);
  104.     
  105. extern double __fastcall Min(double a, double b);
  106. extern double __fastcall Max(double a, double b);
  107. extern int __fastcall Sign(double a);
  108. extern bool __fastcall BRandom(double p);
  109. extern double __fastcall GRandom(void);
  110. extern double __fastcall LongRand(long seed);
  111. extern bool __fastcall WithinBounds(double Inval, double Boundary1, double Boundary2);
  112. extern long __fastcall IntPos(double InNum);
  113. extern long __fastcall IntNeg(double InNum);
  114. extern Word __fastcall GrayCode(Word InNum);
  115.  
  116. }    /* namespace Math1 */
  117. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  118. using namespace Math1;
  119. #endif
  120. //-- end unit ----------------------------------------------------------------
  121. #endif    // Math1
  122.