home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'Math2.pas' rev: 3.00
-
- #ifndef Math2HPP
- #define Math2HPP
- #include <Vector.hpp>
- #include <Matrix.hpp>
- #include <Math1.hpp>
- #include <SysUtils.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Math2
- {
- //-- type declarations -------------------------------------------------------
- class DELPHICLASS ESDLMath2Error;
- class 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, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* 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 DELPHICLASS TCurveFit;
- class 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;
- int 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(int &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 int 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 PACKAGE void __fastcall PolynomialSmooth(Vector::TVector* SourceVec, int FirstElem, int LastElem
- , Vector::TVector* DestVec, int WindowSize);
- extern PACKAGE void __fastcall FirstDeriv(Vector::TVector* SourceVec, int FirstElem, int LastElem, Vector::TVector*
- DestVec, int WindowSize);
- extern PACKAGE bool __fastcall CalcCovar(Matrix::TMatrix* InData, Matrix::TMatrix* CovarMat, int LoC
- , int HiC, int LoR, int HiR, int Scaling);
- extern PACKAGE bool __fastcall CalcEigVec(Matrix::TMatrix* InMat);
- extern PACKAGE double __fastcall GetEigenResult(int EigVecNum, int VecElem);
- extern PACKAGE int __fastcall GetEigenSize(void);
- extern PACKAGE void __fastcall RemoveEigenMatrix(void);
- extern PACKAGE bool __fastcall CalcPrincComp(Matrix::TMatrix* InData, int LoC, int HiC, int LoR, int
- HiR, int Scaling);
- extern PACKAGE double __fastcall CalcFishQ(double m1, double m2, double s1, double s2);
- extern PACKAGE void __fastcall MeanDistanceKNN(Matrix::TMatrix* InMat, int kn, int FirstRow, int LastRow
- , Vector::TVector* &DistVec);
- extern PACKAGE void __fastcall FindCenters(Matrix::TMatrix* InMat, int RowLo, int RowHi, int NumCent
- , Matrix::TMatrix* &Centers, double &MeanDist);
- extern PACKAGE void __fastcall FindNearestNeighbors(int k, Matrix::TMatrix* InMat, int FirstObj, int
- LastObj, Vector::TVector* DatVec, Matrix::TMatrix* KNNList);
- extern PACKAGE double __fastcall CalcGaussKernel(Vector::TVector* Probe, Vector::TVector* RefCenter,
- double Width);
- extern PACKAGE double __fastcall CalcGaussKernelMat(Vector::TVector* Probe, Matrix::TMatrix* RefCenterMat
- , int RefCenterIx, double Width);
- extern PACKAGE 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
-