seqan icon indicating copy to clipboard operation
seqan copied to clipboard

PackedStrings for non-packables should be regular strings

Open h-2 opened this issue 8 years ago • 3 comments

One can create String<short, Packed<Alloc<> > > which does not make sense, because short cant be packed. Doing this not only increases overhead, but does not work, i.e. the tests fail in some cases.

TODO:

  • rename String<TValue, Packed<THostspec> > to PackedString_<TValue, THostspec >
  • make a metafunction that PackedType_<String<TValue, TSpec> > that sets Type PackedString_<TValue, Spec > iff BitsPerValue<TValue>::VALUE < sizeof(TValue) * 8
  • otherwise the metafunction should set Type to String<TValue, THostspec >, i.e. the Packed<> is stripped
  • finally String<TValue, Packed<THostspec> > can be defined as inheriting from the metafunctions Type
    • ultimately the tests can be added again

h-2 avatar Dec 10 '15 16:12 h-2

It would be more sinful to disable the Packed String spec on non-packable types. For that, it suffices to introduce PackableAlphabetConcept refining AlphabetConcept, then decorate the PackedString implementation with concept checking.

esiragusa avatar Dec 11 '15 14:12 esiragusa

Ok, can you provide a few more hints to @smehringer on this? Thanks!

h-2 avatar Dec 11 '15 15:12 h-2

@h-2 is this problem considered for the seqan3::bitcompressed_vector? If so we could close it then.

rrahn avatar Nov 20 '18 10:11 rrahn