Package com.yahoo.search.predicate.index
Class Interval
- java.lang.Object
-
- com.yahoo.search.predicate.index.Interval
-
public class Interval extends Object
Utility class for interval related constants and methods. An interval consists of a begin and end value indicating the start and end of the interval. Both value are inclusive, eg (1,2) is an interval of size 2. There are 3 types of interval; normal, ZStar1 and ZStar2. Normal intervals have begin value in 16 MSB and end in 16 LSB. ZStar1 intervals have end value in 16 MSB and begin in 16 LSB. ZStar2 intervals have only an end value located at 16 LSB.- Author:
- Magnar Nedland, bjorncs
-
-
Field Summary
Fields Modifier and Type Field Description static int
INTERVAL_BEGIN
static int
MAX_INTERVAL_END
static int
ZERO_CONSTRAINT_RANGE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
combineZStarIntervals(int zStar1, int zStar2)
static int
fromBoundaries(int begin, int end)
static int
fromZStar1Boundaries(int begin, int end)
static int
fromZStar2Boundaries(int end)
static int
getBegin(int interval)
static int
getEnd(int interval)
static int
getZStar1Begin(int interval)
static int
getZStar1End(int interval)
static int
getZStar2End(int interval)
static boolean
isZStar1Interval(int interval)
static boolean
isZStar2Interval(int interval)
-
-
-
Field Detail
-
INTERVAL_BEGIN
public static final int INTERVAL_BEGIN
- See Also:
- Constant Field Values
-
MAX_INTERVAL_END
public static final int MAX_INTERVAL_END
- See Also:
- Constant Field Values
-
ZERO_CONSTRAINT_RANGE
public static final int ZERO_CONSTRAINT_RANGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromBoundaries
public static int fromBoundaries(int begin, int end)
-
fromZStar1Boundaries
public static int fromZStar1Boundaries(int begin, int end)
-
fromZStar2Boundaries
public static int fromZStar2Boundaries(int end)
-
isZStar1Interval
public static boolean isZStar1Interval(int interval)
-
isZStar2Interval
public static boolean isZStar2Interval(int interval)
-
getBegin
public static int getBegin(int interval)
-
getEnd
public static int getEnd(int interval)
-
getZStar1Begin
public static int getZStar1Begin(int interval)
-
getZStar1End
public static int getZStar1End(int interval)
-
getZStar2End
public static int getZStar2End(int interval)
-
combineZStarIntervals
public static int combineZStarIntervals(int zStar1, int zStar2)
- Returns:
- A new ZStar1 interval with boundaries [end(zStar1)+1, end(zStar2)]
-
-