simongog / sdsl-lite

Succinct Data Structure Library 2.0
Other
2.21k stars 350 forks source link

lcp construction #27

Closed mpetri closed 11 years ago

mpetri commented 11 years ago

I was trying to construct an lcp array and could not figure out how to do it. there seems to be no construct() method which constructs the lcp array form a file? There are also no examples showing how to construct an lcp array. I had to construct a cst and use cst.lcp[] to access the lcp array?

the construct_lcp classes all require cache configs which I don't know how to use? do I just point to the sa / text on disk using the constants KEY_BWT? do these have to be stored in sdsl format or in normal uint8_t or uint64_t? Can I somehow specify the num_bytes type of each input in the cache_config file? For example KEY_SA num_bytes=8 is a uncompressed sa on disk using 64bit integers.

another comment: the different values of num_bytes should be defines similar to KEY_SA

simongog commented 11 years ago

The LCP construction stuff is in include/sdsl/construct_lcp.hpp. Currently there is not default construction method for the lcp array. You can have a look into include/sdsl/construct.hpp to see how a LCP array is build for CST construction. Arrays in the config are all in sdsl format.

mpetri commented 11 years ago

removing the num_bytes=1 2 3 4 5 magic numbers during construction would also improve code readability and should probably be fixed before the current milestone.