Скачиваний:
24
Добавлен:
02.05.2014
Размер:
2.06 Кб
Скачать
//---------------------------------------------------------------------------

#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TfrmMain : public TForm
{
__published:	// IDE-managed Components
    TPanel *Panel1;
    TPanel *Panel2;
    TGroupBox *GroupBox1;
    TGroupBox *GroupBox2;
    TMemo *mText;
    TPanel *Panel3;
    TMemo *mResTree;
    TMemo *mResReHash;
    TGroupBox *GroupBox3;
    TEdit *edCollision;
    TLabel *Label2;
    TStringGrid *sgHashTable;
        TPanel *Panel5;
        TPanel *Panel6;
        TButton *Button2;
        TEdit *edSearch;
        TPanel *Panel4;
        TMemo *mInputFile;
    void __fastcall Button2Click(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
private:	// User declarations
public:		// User declarations
        __fastcall TfrmMain(TComponent* Owner);
    class Identificator;
    void AddToTree(int,Identificator*);
    int AddToHashTableChane(int,Identificator*,int *);
    int SearchId(char *,Identificator*);
    int *MakeHashTable(Identificator *IdentTable,int IdentTableLength, int HashTableLength);
    int NextHash(Identificator *ident, int *hashTable, int HashTableLength);
    void ShowTable(TStringGrid *sgGrid, int *hashTable, int HashTableLength);
    int HashIdSearch(Identificator *IdentTable, int *hashTable, int HashTableLength, AnsiString);

    int cmp_count_tree;
    int cmp_count_rehash;
    Identificator *TreeIdentTable;
    Identificator *HashIdentTable;
    int *HashTable;
    int HashTableLen;
    int collision_rehash;

};
//---------------------------------------------------------------------------
extern PACKAGE TfrmMain *frmMain;
//---------------------------------------------------------------------------
#endif
Соседние файлы в папке CompareMethods_CBuilder6