Const correctness is a kind of disease that spreads through all levels of a library. Luckily, it grants super powers to the infected.
In this case, we're trying to integrate DYNAMIC behind an interface (the handle graph interface:
handle.hpp) which makes a number of simple assertions about what should be const (things that access the graph but don't modify anything in it) that look to be useful to ensuring correct coding against it.
I've touched up a number of the core classes in DYNAMIC so that they are const correct. In most cases this was easy, although it was a little tricky to deal with the alphabet encoding functions, as these were doing double duty as encoding characters into the local alphabet (which should be const-able) and alphabet extension (which is not).
I did not try to do the same with the BWT and FM-index. These should presumably be pretty easy to fix, but I'm not using them and am not motivated to fix them now.
Const correctness is a kind of disease that spreads through all levels of a library. Luckily, it grants super powers to the infected.
In this case, we're trying to integrate DYNAMIC behind an interface (the handle graph interface: handle.hpp) which makes a number of simple assertions about what should be const (things that access the graph but don't modify anything in it) that look to be useful to ensuring correct coding against it.
I've touched up a number of the core classes in DYNAMIC so that they are const correct. In most cases this was easy, although it was a little tricky to deal with the alphabet encoding functions, as these were doing double duty as encoding characters into the local alphabet (which should be const-able) and alphabet extension (which is not).
I did not try to do the same with the BWT and FM-index. These should presumably be pretty easy to fix, but I'm not using them and am not motivated to fix them now.
CC @jeizenga @edawson