//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
#include "Unit3.h"
#include <Grids.hpp>
using namespace std;
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
  TPanel *Panel2;
  TPanel *Panel4;
  TButton *Button1;
  TButton *Button2;
  TLabel *Label2;
  TLabel *Label3;
  TLabel *Label4;
  TEdit *Edit1;
  TLabel *Label5;
  TEdit *Edit2;
  TPanel *Panel1;
  TStringGrid *RunGrid;
  TSplitter *Splitter1;
  TSpeedButton *SpeedButton9;
  TSpeedButton *SpeedButton8;
  TSpeedButton *SpeedButton7;
  TSpeedButton *SpeedButton6;
  TSpeedButton *SpeedButton5;
  TSpeedButton *SpeedButton4;
  TSpeedButton *SpeedButton3;
  TSpeedButton *SpeedButton25;
  TSpeedButton *SpeedButton24;
  TSpeedButton *SpeedButton23;
  TSpeedButton *SpeedButton22;
  TSpeedButton *SpeedButton21;
  TSpeedButton *SpeedButton20;
  TSpeedButton *SpeedButton2;
  TSpeedButton *SpeedButton19;
  TSpeedButton *SpeedButton18;
  TSpeedButton *SpeedButton17;
  TSpeedButton *SpeedButton16;
  TSpeedButton *SpeedButton15;
  TSpeedButton *SpeedButton14;
  TSpeedButton *SpeedButton13;
  TSpeedButton *SpeedButton12;
  TSpeedButton *SpeedButton11;
  TSpeedButton *SpeedButton10;
  TSpeedButton *SpeedButton1;
  TLabel *Label1;
  TLabel *Label6;
  void __fastcall SpeedButton9Click(TObject *Sender);
  void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  void __fastcall Button1Click(TObject *Sender);
  void __fastcall Button2Click(TObject *Sender);
  void __fastcall OnStudyDataGet(TMessage& Msg);
  void __fastcall OnStudyEnd(TMessage& Msg);
  void __fastcall OnTss(TMessage& Msg);

private:	// User declarations
  vector<double> Addition;
  vector<double> Add;
protected :
  BEGIN_MESSAGE_MAP
    VCL_MESSAGE_HANDLER(WM_TERM_VALUE, TMessage, OnStudyDataGet )
    VCL_MESSAGE_HANDLER(WM_TERM_END, TMessage, OnStudyEnd )
    VCL_MESSAGE_HANDLER(WM_TSS,TMessage,OnTss)
  END_MESSAGE_MAP(TForm)
public:		// User declarations

  __fastcall TForm1(TComponent* Owner);
  double	 Vector_Multiple (const vector<double	> lhs , const vector<double	> rhs );
  double __fastcall PerceptronTest( const vector<double> Data);
  ThreadMLP* MLP;
  unsigned long GridIdx;

};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
