X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fstatic_bitsequence%2Fstatic_bitsequence.h;fp=src%2Fstatic_bitsequence%2Fstatic_bitsequence.h;h=1bcb0b4d135789d2059f58594284ac6e160edb11;hb=f485a898fccde5f6beb9d9b31be4afe973ad627b;hp=d8e3f1825e6fb6f07b9f2d00c0d59d4fb71c3da3;hpb=3ce6865a802bdf540109dd37ce04c25408645b26;p=SXSI%2Flibcds.git diff --git a/src/static_bitsequence/static_bitsequence.h b/src/static_bitsequence/static_bitsequence.h index d8e3f18..1bcb0b4 100644 --- a/src/static_bitsequence/static_bitsequence.h +++ b/src/static_bitsequence/static_bitsequence.h @@ -36,30 +36,30 @@ /** Base class for static bitsequences, contains many abstract functions, so this can't * be instantiated. It includes base implementations for rank0, select0 and select1 based * on rank0. - * + * * @author Francisco Claude */ class static_bitsequence { - + public: virtual ~static_bitsequence() {}; /** Returns the number of zeros until position i */ virtual uint rank0(uint i); - /** Returns the position of the i-th zero + /** Returns the position of the i-th zero * @return (uint)-1 if i=0, len if i>num_zeros or the position */ virtual uint select0(uint i); /** Returns the number of ones until position i */ virtual uint rank1(uint i); - /** Returns the position of the i-th one + /** Returns the position of the i-th one * @return (uint)-1 if i=0, len if i>num_ones or the position */ virtual uint select1(uint i); - virtual uint select_next1(uint i); - virtual uint select_next0(uint i); + virtual uint select_next1(uint i); + virtual uint select_next0(uint i); /** Returns the i-th bit */ virtual bool access(uint i); @@ -77,17 +77,17 @@ public: virtual uint size()=0; /** Stores the bitmap given a file pointer, return 0 in case of success */ - virtual int save(FILE * fp)=0; - + virtual int save(FILE * fp)=0; + /** Reads a bitmap determining the type */ static static_bitsequence * load(FILE * fp); - + protected: /** Length of the bitstring */ uint len; /** Number of ones in the bitstring */ - uint ones; - + uint ones; + }; #include