⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit2.h

📁 程序采用可视化界面
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Grids.hpp>
#include <stdio.h>
#include "stdlib.h"
#include "iostream.h"
#include <math.h>
#include <Dialogs.hpp>

#define FIN 2.5
#define FOUT 2.5 
typedef struct node            // 一个结构体对应于一个因子
{ float data;                  // 因子的偏回归平方和
  int flag;                    // 标明该因子是否被选中
  float b;                     // 记录对应于该因子的回归系数
  node *next;
}node;
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published:	// IDE-managed Components
    TLabel *Label1;
    TLabel *Label2;
    TEdit *Edit1;
    TEdit *Edit2;
    TStringGrid *StringGrid1;
    TButton *Button1;
    TButton *Button2;
    TLabel *Label3;
    TEdit *Edit3;
    TLabel *Label4;
    TLabel *Label5;
    TLabel *Label6;
    TLabel *Label7;
    TEdit *Edit4;
    TEdit *Edit5;
    TEdit *Edit6;
    TEdit *Edit7;
    TButton *Button3;
    TButton *Button4;
    TOpenDialog *OpenDialog1;
    TSaveDialog *SaveDialog1;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall Button1Click(TObject *Sender);
    void __fastcall Edit1Exit(TObject *Sender);
    void __fastcall Edit2Exit(TObject *Sender);
    void __fastcall Button3Click(TObject *Sender);
    void __fastcall Button4Click(TObject *Sender);
private:	// User declarations
    int M,N;
    node *initiate();
    void average(float **x, float y[], float ax[], float *ay);
    void augmented_matrix(float **l, float **x, float y[], float ay, float ax[]);
    void extended_augmented_matrix(float **l, float **r);
    void symbol(node *h, int flag, int m);
    float input_b(node *h, float **r, float **l, float ax[], float ay);
    void input_p(node *h, float **r);
    float read(node *h, int flag, int *f, int *s0);
    void elimination(float **r, int k);
    float in(node *h, float **r);
    int out(node *h, float **r);

public:		// User declarations
    __fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -