package obialign // import ( // "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils" // "git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq" // ) const wsize = 16 const dwsize = wsize * 2 // Out values are always the smallest // Among in values, they rank according to their score // For equal score the shortest path is the best func encodeValues(score, length int, out bool) uint64 { const mask = uint64(1<> wsize) & mask) length := int(((value + 1) ^ mask) & mask) out := (value & outmask) == 0 return score, length, out } func _incpath(value uint64) uint64 { return value - 1 } func _incscore(value uint64) uint64 { const incr = uint64(1) << wsize return value + incr } func _setout(value uint64) uint64 { const outmask = ^(uint64(1) << dwsize) return value & outmask } var _empty = encodeValues(0, 0, false) var _out = encodeValues(0, 30000, true) var _notavail = encodeValues(0, 30000, false)