> ...I am reading a file with many (maybe million) and need to collect
> the values for each column (oene Judy array each) across the records,
> like this:
>
> for (irec = 0; irec < totrec; irec++) {
> for (i = 0; i < nsnp; i++) {
> key=something;
> JSLI(PValue, PJArray[i], key);
> }
> }
>
> that sounds like it. But, how is that done? Maybe you can point me
> to a code snippet that shows this.
Well it's still not totally clear to me from your code example what is
the problem. If totrec is a known value, can't you just create an array
of array of Judy pointers? Even if the value is variable, you can
malloc() it. So long as you are just needing a finite dense array of
pointers.
Of course if you want a sparse array then you can use JudyL itself.
Make each index whatever is your best key into each subarray, and store
the subsidiary Judy1/JudyL array (pointer) as a value in the top array.
This is actually how JudySL works. You can probably look in that source
code for examples of how it takes a C string, breaks it into keys of 4
or 8 bytes, and uses each chunk as a JudyL array key to store a pointer
to a JudyL array holding all subsidiary bytes (substrings of the common
prefix).
Sorry I can't offer more without a better understanding of where you get
totrec and nsnp and something in your code example above.
Alan
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel