Page 1 of 1

Data Structure Project Question

Posted: Sun Dec 09, 2007 9:23 pm
by irishjugg
Hey all, Ive got a class project for my CSE 331 data structures class. Gotta look thru this project and find a data structure to swap out with other ones to do performance evaluations on the differences and such. Was wondering if anyone could point me to a data structure in bzflag's source that would be relatively trivial to change and test with? I sorta procrastinated on this so any guidance would greatly be appreciated.

Posted: Sun Dec 09, 2007 9:39 pm
by JeffM
that's a rather general request, and honestly we should not be doing your work for you.

Perhaps if you were more specific we could point you to specific places in the code, but that's about it.

Sorry for vagueness.

Posted: Sun Dec 09, 2007 11:05 pm
by irishjugg
Pardon my vagueness, I was not requesting someone do any of the work for me, I was simply asking if there is say a vector or a list somewhere that would be reasonably easy to replace with say a queue or a stack or whatever else that I could also do timers to handle testing the differences in runtime with each structure.

So in short is there a standard data structure somewhere in the code that is not attached to 20 files so that if I were to change it it would be somewhat trivial to implement something in its place, I was looking at the font managers maps and vectors but I do not know how I would do the timed testing there, things like that.

Thanks in advance if anyone replies.

Posted: Mon Dec 10, 2007 4:17 am
by macsforme
Probably not. If I understand what you're looking for correctly, you'd probably be better off figuring out your own solution and making it from scratch. Finding and adapting something in code that was written for something totally different probably will not work well.

agreed

Posted: Mon Dec 10, 2007 4:50 am
by irishjugg
Oh I agree the project is quite asanine, but thats what prof wants me to do lol. Just swap out structures, its your basic run of the mill final project busy work.

Posted: Mon Dec 10, 2007 7:31 am
by JeffM
I believe that research is part of the project they want you to do, not just the coding replacement. That is where you show that you understand how to find the structures and what is best for the needs.

but anyway I can not think if anything off the top of my head that fits your bill. usually simple STL type replacements don't buy us much of anything. all of our performance related structures are used all over the place and are what they need to be for speed ( Octree, etc.. )

The big lists would be player list, shot list, and world database, and those are very pervasive. anything smaller can be found just by looking at where we use the various stl types.

thanks

Posted: Mon Dec 10, 2007 4:53 pm
by irishjugg
Thanks for the guidance, I will look at those structures and see which ones would be least painful to swap out. The main point of the project was actually only to be able to compile a major project with several developers and libraries as well as make changes to it and evaluate the difference in performance from the change. Hell we arent even required to have our changes better anything, it just about reinforcing the differences in data structures and how they work. I guess I would have hoped for a slightly more useful project after 18 weeks of class but, you know, I do what the prof wants..

Thanks for the list of things to check out, I was just having trouble tracing through how the whole source works. That will be a big help.

Posted: Tue Dec 11, 2007 5:15 pm
by DTRemenak
We typically overuse vectors. Look at a bunch of instances of vectors and see if one makes sense to switch to a different container.