50 lines
1.9 KiB
C++
50 lines
1.9 KiB
C++
//---------------------------------------------------------------------------
|
|
|
|
#ifndef MattrixH
|
|
#define MattrixH
|
|
//---------------------------------------------------------------------------
|
|
#include <mem.h>
|
|
|
|
//---------------------------------------------------------------------------
|
|
class HMattrix {
|
|
long double **aM;
|
|
int nDim;
|
|
public:
|
|
// HMatrix();
|
|
__fastcall HMattrix(int nDim);
|
|
__fastcall ~HMattrix();
|
|
void __fastcall deallocate(long double **aX, int dim);
|
|
void __fastcall StoreMattrix(HMattrix *M);
|
|
void __fastcall StoreColumn(long double *aCol, int col);
|
|
void __fastcall StoreRow(long double *aRow, int row);
|
|
void __fastcall StoreElement(long double val, int i, int j); // i=row, j=col
|
|
void __fastcall StoreElement(long double *val, int i, int j); // i=row, j=col
|
|
// int DeleteRowCol(bcd **aMx, int dim, int row, int col, bcd ***aMNew);
|
|
long double** __fastcall DeleteRowCol(long double **aMx, int dim, int row, int col);
|
|
void __fastcall XchCol(int col, long double *aCol);
|
|
long double ** __fastcall GetM();
|
|
long double __fastcall M(int i, int j);
|
|
long double __fastcall Det();
|
|
long double __fastcall Det(long double **aMn, int dim);
|
|
long double __fastcall Minor(long double **aMx, int row, int col, int dim);
|
|
};
|
|
|
|
|
|
int __fastcall equation(HMattrix *M, long double *aB, int nDim, long double *result);
|
|
|
|
// definicje dla wielomianu stopnia n=3
|
|
// Y=c3X3+c2X2+c1X+c0
|
|
|
|
struct ePoint {
|
|
long double x,y;
|
|
} ;
|
|
|
|
void __fastcall AssignPointValue(ePoint *dt, double x, double y);
|
|
long double __fastcall eSup(ePoint *aData, int count, int nI=0, int nJ=0);
|
|
bool __fastcall Polynom3(ePoint *aData, int count, long double *result);
|
|
bool __fastcall Polynom2ab(ePoint *aData, int count, long double *result);
|
|
bool __fastcall Polynom2abc(ePoint *aData, int count, long double *result);
|
|
double __fastcall Polynom3Value(double x, long double *Cn);
|
|
//---------------------------------------------------------------------------
|
|
#endif
|