source: liacs/da/fibo_queue/fiboqueue.cc@ 367

Last change on this file since 367 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#include<iostream>
2#include<iomanip>
3using namespace std;
4#include "fiboqueue.h"
5void FiboQueue::BouwShowListOp(FiboNode*sv91,List*sv92,int&sv93){scl3*sv94;
6List*sv95;FiboNode*sv96,*sv97;sv96=sv91;do{
7sv94=new scl3(sv96->Value,sv96->Mark,sv93);if(sv92->sf34()==NULL)
8{sv92->sf34(sv94);sv92->sf35(sv94);}else{sv92->sf35()->sf20(sv94);
9sv92->sf35(sv94);}sv97=sv96->Child;if(sv97!=NULL){if(sv92->sf20()==NULL)
10{sv95=new List();sv92->sf20(sv95);}BouwShowListOp(sv97,sv92->sf20(),sv93);}
11sv96=sv96->Right;sv93++;}while(sv96!=sv91);sv93--;}
12void FiboQueue::ShowList(List*sv98){List*sv92;scl3*sv94;int sv93,sv99;sv92=sv98;
13do{sv94=sv92->sf34();sv93=0;do{sv99=sv94->sf33();while(sv93<sv99-1)
14{cout<<" ";sv93++;}cout<<setw(4)<<sv94->Value();if(sv94->Mark())cout<<'*';
15else cout<<' ';sv93++;sv94=sv94->sf20();}while(sv94!=NULL);cout<<'\n';
16sv92=sv92->sf20();}while(sv92!=NULL);}void FiboQueue::Show(){List*sv100;
17int sv93;cout<<"De Fibonacci rij ziet er als volgt uit:\n";if(!IsEmpty())
18{sv100=new List();sv93=1;BouwShowListOp(Min,sv100,sv93);ShowList(sv100);
19delete sv100;}}
Note: See TracBrowser for help on using the repository browser.