home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Math2.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
- // From: Math2.pas
- //----------------------------------------------------------------------------
- #ifndef Math2HPP
- #define Math2HPP
- //----------------------------------------------------------------------------
- #include <Vector.hpp>
- #include <Matrix.hpp>
- #include <Math1.hpp>
- #include <SysUtils.hpp>
- #include <System.hpp>
- namespace Math2
- {
- //-- type declarations -------------------------------------------------------
- class __declspec(delphiclass) ESDLMath2Error;
- class __declspec(pascalimplementation) ESDLMath2Error : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall ESDLMath2Error(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall ESDLMath2Error(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall ESDLMath2Error(int Ident) : Sysutils::Exception(Ident) { }
- /* Exception.CreateResFmt */ __fastcall ESDLMath2Error(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall ESDLMath2Error(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall ESDLMath2Error(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall ESDLMath2Error(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall ESDLMath2Error(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
- { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~ESDLMath2Error(void) { }
-
- };
-
- enum TClusterMethod { cmSingleLink, cmCompleteLink, cmWard, cmAvgLink, cmFlexLink };
-
- class __declspec(delphiclass) TCurveFit;
- class __declspec(pascalimplementation) TCurveFit : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- double sumx;
- double sumy;
- double sumxq;
- double sumyq;
- double sumDiff;
- double SumDiffq;
- double sumxy;
- double sumx2y;
- double sumx3;
- double sumx4;
- double sum1byy;
- double sum1byyq;
- double sumxbyy;
- double sumybyx;
- double sum1byx;
- double sum1byxq;
- double sumlnx;
- double sumlnxq;
- double sumylnx;
- double sumlny;
- double sumlnyq;
- double sumxlny;
- double sumxqlny;
- long FNumData;
- Vector::TVector* SumXArray;
- Vector::TVector* RHS;
- double __fastcall GetMeanX(void);
- double __fastcall GetMeanY(void);
- double __fastcall GetStdDevX(void);
- double __fastcall GetStdDevY(void);
- double __fastcall GetMeanDiff(void);
- double __fastcall GetStdDevDiff(void);
- double __fastcall GetRxy(void);
-
- public:
- __fastcall TCurveFit(void);
- __fastcall virtual ~TCurveFit(void);
- void __fastcall Init(void);
- void __fastcall EnterStatValue(double x, double y);
- void __fastcall CalcStatistics(long &NumData, double &MeanX, double &MeanY, double &StdevX, double
- &StdevY, double &MeanDiff, double &StdevDiff, double &rxy);
- void __fastcall CalcGaussFit(double &k0, double &k1, double &k2, double &FitQual);
- void __fastcall CalcLinFit(double &k, double &d, double &FitQual);
- void __fastcall CalcLogFit(double &k0, double &k1, double &FitQual);
- void __fastcall CalcParabolFit(double &k0, double &k1, double &k2, double &FitQual);
- bool __fastcall CalcPolyFit(const Byte nOrder, double * kArray, const int kArray_Size, double &FitQual
- );
- void __fastcall CalcReciLinFit(double &k0, double &k1, double &FitQual);
- void __fastcall CalcHyperbolFit(double &k0, double &k1, double &FitQual);
- __property long NumData = {read=FNumData, nodefault};
- __property double MeanX = {read=GetMeanX};
- __property double MeanY = {read=GetMeanY};
- __property double StdDevX = {read=GetStdDevX};
- __property double StdDevY = {read=GetStdDevY};
- __property double MeanDiff = {read=GetMeanDiff};
- __property double StdDevDiff = {read=GetStdDevDiff};
- __property double CorrCoeff = {read=GetRxy};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define MaxPolyFitOrder (Byte)(8)
- extern void __fastcall PolynomialSmooth(Vector::TVector* SourceVec, int FirstElem, int LastElem, Vector::TVector*
- DestVec, int WindowSize);
- extern void __fastcall FirstDeriv(Vector::TVector* SourceVec, int FirstElem, int LastElem, Vector::TVector*
- DestVec, int WindowSize);
- extern bool __fastcall CalcCovar(Matrix::TMatrix* InData, Matrix::TMatrix* CovarMat, int LoC, int HiC
- , int LoR, int HiR, int Scaling);
- extern bool __fastcall CalcEigVec(Matrix::TMatrix* InMat);
- extern double __fastcall GetEigenResult(int EigVecNum, int VecElem);
- extern int __fastcall GetEigenSize(void);
- extern void __fastcall RemoveEigenMatrix(void);
- extern bool __fastcall CalcPrincComp(Matrix::TMatrix* InData, int LoC, int HiC, int LoR, int HiR, int
- Scaling);
- extern double __fastcall CalcFishQ(double m1, double m2, double s1, double s2);
- extern void __fastcall MeanDistanceKNN(Matrix::TMatrix* InMat, int kn, int FirstRow, int LastRow, Vector::TVector*
- &DistVec);
- extern void __fastcall FindCenters(Matrix::TMatrix* InMat, int RowLo, int RowHi, int NumCent, Matrix::TMatrix*
- &Centers, double &MeanDist);
- extern void __fastcall FindNearestNeighbors(int k, Matrix::TMatrix* InMat, int FirstObj, int LastObj
- , Vector::TVector* DatVec, Matrix::TMatrix* KNNList);
- extern double __fastcall CalcGaussKernel(Vector::TVector* Probe, Vector::TVector* RefCenter, double
- Width);
- extern double __fastcall CalcGaussKernelMat(Vector::TVector* Probe, Matrix::TMatrix* RefCenterMat, int
- RefCenterIx, double Width);
- extern int __fastcall AgglomClustering(Matrix::TMatrix* InMat, Matrix::TDistMode DistanceMeasure, TClusterMethod
- ClusterMethod, double alpha, Matrix::TIntMatrix* &ClustResult, Vector::TVector* &ClustDist, Vector::TVector*
- &DendroCoords);
-
- } /* namespace Math2 */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Math2;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Math2
-