AVL TREE STUFF


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]

Posted by Aaron on July 11, 2001 at 15:33:52:

I don't often brag, but damnit i spent enough time on this to kill a horse. so here:

Your code ran normally during the first (small) test
Your code created perfectly correct output on the small test.
Your code ran normally during the robust test.
Your code created perfectly correct output on the robust test.
Here are the results of the timing run:
Analyzer: /u/dvw/icount
Version: 1.2 (30/Mar/93) (shade version: 5.25 V8 SPARC ELF32 (14/Feb/95))
Uname: fynbo.cs.utexas.edu sun4u SunOS 5.7 Generic_106541-09
Start: Wed Jul 11 13:46:38 2001
Application: ./test.exe 1 test_one.txt
Application Instructions: 38899
Stop: Wed Jul 11 13:46:38 2001
Instructions: 38899
Time: 0.030 usr 0.040 sys 0.073 real 95.931%
Speed: 555.700 KIPS

Also, here is the test code i used to shake the bugs out of my stuff, I found it to be really beneficial, if you get use out of it great if not just tell me to shut my pie hole :)


for(int c = 0; c < 20000;x++) {
x = random();
cout << (x & 1) << " " << ((x >> 1)%0xF) << endl;
if(x & 1)
Test.insert (((x >> 1)% 0xF));
else {
// if(((x >> 1)%0xF) == 8) Test.PrintTree();
Test.Delete(((x >> 1)% 0xF));
}
if(!Test.VerifyAVL()) {
cout << "oh poop\n";
Test.PrintTree();
exit(1);
}
}




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]