diff --git a/bitvector.h b/bitvector.h index 94fc837..a68a81a 100644 --- a/bitvector.h +++ b/bitvector.h @@ -19,9 +19,11 @@ #ifndef _BITVECTOR_H_ #define _BITVECTOR_H_ +#include "la_traits.h" #include "vec.h" #include "numbers.h" #include "laerror.h" + #include //TODO: if efficiency is requires, make also a monic_bitvector, which will not store the leading 1 explicitly @@ -251,5 +253,17 @@ public: unsigned int population(const unsigned int before=0) const {return bitvector::population(before?before-1:0);}; }; + +//some necessary traits of the non-scalar class to be able to use LA methods +template<> +class LA_traits { +public: + static bool is_plaindata() {return false;}; + static void copyonwrite(bitvector& x) {x.copyonwrite();}; + typedef bool elementtype; + typedef bool normtype; +}; + + }//namespace #endif