seqan / product_backlog

This repository is used as product backlog for all SeqAn relevant backlog items. This is intended to organise the work for the team.
2 stars 1 forks source link

Handling of "bit-patterns" is inconsistent. #388

Open marehr opened 3 years ago

marehr commented 3 years ago

Description

Handling of "bit-patterns" is inconsistent. The dynamic_bitset takes string literals"0101" while the shape gets an extra strong type that is initialised with a numeric literal in binary notation: bin_literal{0b10101}.

I suggest the following:

  1. rename bin_literal to bits
  2. give bits a constructor from number and one from string_view.
  3. introduce 0b101_bits and "101"_bits as user defined literals of type bits.
  4. Use bits in the constructors of dynamic_bitset and shape. Thoughts: 2020-11-10
    • shape gets strong_type for ungapped{5} or bin_literal{0b10101} -> "101"_bits
    • we have already a literal: 0b101011_shape -> shape // static
    • can we have 10_ungapped_shape -> shape ungapped of size 10? not possible as runtime parameter
    • seqan2 has: dynamic_gapped_shape, dynamic_ungapped_shape, static_gapped_shape and static_ungapped_shape
    • extension of shapes as static/dynamic, idea: use first class templates using mechanism like in span.
      • RESOLUTION: we need more use cases: document it as NO_API/Experimental must not be stable for 3.1 TODO: which dependencies are affected.

created from https://github.com/seqan/product_backlog/issues/244