Discussion:
Coding stuff
(too old to reply)
Jack
2005-09-30 00:03:43 UTC
Permalink
So, in the interest of not wasting time... lemme be the one to ask some
stupid questions.

1) int interchangeWithLeader( int index)
would I be correct in saying that this method is giving us the index to
a node in the array treeData[], that we are then supposed to swap it with
the node at the head of its equivalence class, and then return its new
index?

2) int SlideAndIncrement( int index )
would I be correct in saying that this method is giving us the index to
a node in the array treeData[], that we are then supposed to slide it to the
head of the next equivalence class, and then return it's new index?

3) void updateOptAdaptive( int index )
Is this method the one that basically loops through the tree calling
interchange and slide&inc?

Thanks!
Jack
2005-09-30 00:31:35 UTC
Permalink
Also, a 'slide' implies that this sort of thing happens,
treeData[x,1,2,3,4] --> treeData[1,2,3,4,x]
as opposed to just a swap,
treeData[x,1,2,3,4] --> treeData[4,1,2,3,x]

Right?

Loading...