Hi:
I have been working on a project which requires searching through the rows of a matrix (of integers) for a particular row (this is in C++). Currently, I have each row in a binary search tree (using a lexicographic ordering on the rows) - I am wondering if there is a faster way of searching the rows. The < operator runs in O(n), so I was wondering if there are any other orderings/containers which would improve on this. (As far as I am aware, the tree is balanced.)
Thanks,
gfdsa



LinkBack URL
About LinkBacks



What I meant by "what is the problem?" is things seem to sound very smooth as it is. Are you having general performance issues? If you are, you can always create index to reference logical places in your tree (thus allowing you to skip ahead... though I don't recommend this if things are going smooth now since you need to do a fair amount of logic to implement the look up tables).