Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
18
Добавлен:
02.05.2014
Размер:
2.55 Кб
Скачать
#ifndef frmmainH
#define frmmainH
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "RzButton.hpp"
#include "RzCmboBx.hpp"
#include "RzEdit.hpp"
#include "RzPanel.hpp"
#include "RzSpnEdt.hpp"
#include <ExtCtrls.hpp>
#include <Mask.hpp>
#include <Grids.hpp>

typedef double __fastcall (__closure *FunctionValue)(double &x, double &y);
typedef double __fastcall (__closure *FunctionDerivative)(int n, double x, double y);
typedef void __fastcall (__closure *ItitializeParams)();
class DownableFunction {
public:
    FunctionValue m_Function;
    FunctionDerivative m_DerivativeX;
    FunctionDerivative m_DerivativeY;
    ItitializeParams m_Initialize;
    __fastcall DownableFunction(FunctionValue value, FunctionDerivative dx, FunctionDerivative dy, ItitializeParams init);
    void __fastcall Initialize() { if (m_Initialize) m_Initialize(); }
};

class TMainForm : public TForm {
__published:
    TLabel *AuthorLabel;
    TRzGroupBox *InputGroupBox;
    TLabel *FunctionLabel;
    TLabel *ParamsLabel;
    TLabel *AParamLabel;
    TLabel *BParamLabel;
    TLabel *Label5;
    TLabel *DParamLabel;
    TLabel *EpsLabel;
    TRzComboBox *FunctionList;
    TRzSpinEdit *AParamEdit;
    TRzSpinEdit *BParamEdit;
    TRzSpinEdit *CParamEdit;
    TRzSpinEdit *DParamEdit;
    TRzButton *EvaluateButton;
    TRzSpinEdit *EpsEdit;
    TRzGroupBox *OutputGroupBox;
    TStringGrid *OutputGrid;
    TLabel *ErrorLabel;
    TLabel *EntityLabel;
    TLabel *Y0Label;
    TLabel *X0Label;
    TRzSpinEdit *X0Edit;
    TRzSpinEdit *Y0Edit;
    void __fastcall FunctionListChange(TObject *Sender);
    void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
    void __fastcall FormKeyUp(TObject *Sender, WORD &Key,
          TShiftState Shift);
    void __fastcall EvaluateButtonClick(TObject *Sender);
private:
public:
    double m_A, m_B, m_C, m_D;
    double m_X0, m_Y0;
    double m_Eps;
    FunctionValue m_Function;
    FunctionDerivative m_DerivativeX;
    FunctionDerivative m_DerivativeY;
    __fastcall TMainForm(TComponent* Owner);
    double __fastcall ComplexFunction(double &x, double &y);
    double __fastcall ComplexFunctionDX(int n, double x, double y);
    double __fastcall ComplexFunctionDY(int n, double x, double y);
    void __fastcall ComplexInitialize();
    void __fastcall PrepareData();
    void __fastcall ValidateData();
};
extern PACKAGE TMainForm *MainForm;
#endif
Соседние файлы в папке Лабораторная работа №5