Hi,

I try to understand the indexing package operation. I want to store data
from a C-apps on disk to be able to natively read it into R with
indexing/mmap (and vice versa from R-indexing to C-apps). If I understand
correctly, we have:

 # each column in the envir contains a list of entries:
    #  d: original data mapping
    #  s: sorted data
    #  o: ordered data (location of sorted in data)

We use binsearch() to find index for "value" in sorted data:

binsearch(value, sorted[], n) -> return sorted_idx;

then we use the sorted_idx as a index in ordered data to locate index in
original data:

ordered [sorted_idx] -> return idx;

original [idx]  -> return value;


Is this how it works?

Best regards,
Daniel

	[[alternative HTML version deleted]]

