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

#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;
    TButton *Button1;
    TEdit *edSearch;
    TGroupBox *GroupBox1;
    TMemo *mTextChane;
    TGroupBox *GroupBox2;
    TPanel *Panel3;
    TMemo *mResChane;
    TButton *Button2;
    TGroupBox *GroupBox3;
    TEdit *edCollision;
    TEdit *Edit2;
    TLabel *Label1;
    TLabel *Label2;
    TPanel *Panel4;
    TMemo *mInputFile;
    TStringGrid *sgHashTable;
    TMemo *mResReHash;
    void __fastcall Button1Click(TObject *Sender);
    void __fastcall Button2Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
        __fastcall TfrmMain(TComponent* Owner);
    class Identificator;
    class HashIdentificator;
    int AddToHashTableChane(int,Identificator*,int *);
    int SearchId(char *,Identificator*);
    int SearchIdChane(char *,Identificator*,int*);
    int NextHash(HashIdentificator *ident, int *hashTable, int HashTableLength);
    int *MakeHashTable(HashIdentificator *IdentTable, int IdentTableLength, int HashTableLength);
    void ShowTable(TStringGrid *sgGrid, int *hashTable, int HashTableLength);
    int HashIdSearch(HashIdentificator *IdentTable, int *hashTable, int HashTableLength, AnsiString Name);

    int colis_chane, cmp_count_tree,cmp_count_chane,cmp_count_rehash;

    HashIdentificator *HashIdentTable;
    Identificator *TableChane;
    int *HashTable;
    int HashTableLen;
    int collision_rehash;
    int HashTableChane[256];


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