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

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