From 5480b55c9fd5bcc10f4105c7ba53b83626856b4f Mon Sep 17 00:00:00 2001 From: nvalimak Date: Tue, 10 Mar 2009 19:12:03 +0000 Subject: [PATCH] Added rankLessThan git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@241 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- libcds/src/static_sequence/static_sequence.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libcds/src/static_sequence/static_sequence.h b/libcds/src/static_sequence/static_sequence.h index cf8a1e0..f8f3bb5 100644 --- a/libcds/src/static_sequence/static_sequence.h +++ b/libcds/src/static_sequence/static_sequence.h @@ -46,13 +46,24 @@ public: /** Returns the number of occurrences of c until position i */ virtual uint rank(uint c, uint i)=0; - + virtual uint rankLessThan(uint &i, uint j) + { + //assert(0); // Implemented only in static_sequence_wvtree + return -1; + } + /** Returns the position of the i-th c * @return (uint)-1 if i=0, len if i exceeds the number of cs */ virtual uint select(uint c, uint i)=0; /** Returns the i-th element */ virtual uint access(uint i)=0; + virtual uint access(uint i, uint &rank) + { + //assert(0); // Implemented only in static_sequence_wvtree + return -1; + } + /** Returns the length of the sequence */ virtual uint length(); -- 2.17.1