/** * Test method: void setValPos(int pos, long val, int bits) * Test method: long getValPos(int pos, int bits) * * @throws Exception */ public void testSetAndGetValPos() throws Exception { int pos = 60; int bits = 10; BitMap instance = new BitMap(1000L); instance.setValPos(pos, 1000, bits); long expResult = 1000L; long result = instance.getValPos(pos, bits); assertEquals(expResult, result); }
blockClass = (int) bitMap.getValPos((int) pos, 4); pos += 4; blockOffset = (int) ((blockClass == 0) ? bitMap.getBit((int) pos) * 16 : 0); blockClass = (int) bitMap.getValPos((int) pos, 4); pos += 4; blockOffset = (int) bitMap.getValPos((int) pos, Tables.offsetBits[blockClass]); res += Tables.smallRank[Tables.decodeTable[blockClass][blockOffset]][l1Idx];