Einzelnen Beitrag anzeigen

p3ps1

Registriert seit: 16. Dez 2003
Ort: Recklinghausen
87 Beiträge
 
Delphi 6 Enterprise
 
#3

Re: binären baum speichern und ladenFür ein

  Alt 2. Jan 2004, 13:22
Delphi-Quellcode:
Type TBintreenode = class(TBase)
                     left,right:TBintreenode;
                     Constructor create(l:TBintreenode;tb:TBase;r:TBintreenode);
                     Procedure insertleft(l:TBintreenode);
                     Procedure insertright(r:TBintreenode);
                     Function leftTree:TBintreenode;
                     Function rightTree:TBintreenode;
                     Function elem:Tbase;
                     Function copy:TBintreenode;
                     Function depth:Integer;
                     Destructor Destroy;Override;
                     Function schluss:Boolean;
                     Function getvalue:TBase;
                     Procedure setvalue(tb:TBase);
                   Private
                     value:Tbase;
                   End;



     Ttree = class(TBase)
               root : TBintreenode;
               constructor create;
               Function empty:Boolean;
               Function copy:Ttree;Virtual;
               Function depth:Integer;
               Destructor destroy;Override;
             End;
[edit=sakura] [delphi]-Tag geschlossen. Mfg, sakura[/edit]
Es geht schief was nur schiefgehen kann
  Mit Zitat antworten Zitat