Package org.apache.uima.cas.impl
Class BinaryCasSerDes4.ComprItemRefs
java.lang.Object
org.apache.uima.cas.impl.BinaryCasSerDes4.ComprItemRefs
- Enclosing class:
BinaryCasSerDes4
Manage the conversion of Items (FSrefs or String offsets) to relative index number
Map from int to int
Fs:
key = index into heap, value = fs index invalid input: '<'invalid input: '<'invalid input: '<' a search
key = fs index, value = index into heap invalid input: '<'invalid input: '<'invalid input: '<' just an array ref
StrOffset:
key = string offset, value = str index invalid input: '<'invalid input: '<'invalid input: '<' a search
key = str index, value = string offset (index into strings) invalid input: '<'invalid input: '<'invalid input: '<' just an array ref
take advantage: both keys / indexes monotonically increasing
most refs nearby
spacing fairly uniform
Do modified binary search -
- estimate first probe: avg of % invalid input: '&' current loc
Lifecycle:
1) create an instance
2) fill
3) finish
4) do gets
gc
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItemAddr
(int v) void
call after fsAddrs is loaded Currently has no purpose due to change of internal implint
getItemAddr
(int index) int
getItemIndex
(int itemAddr) int
-
Field Details
-
itemIndexToAddr
-
itemAddrToIndex
-
-
Constructor Details
-
ComprItemRefs
public ComprItemRefs()
-
-
Method Details
-
addItemAddr
public void addItemAddr(int v) -
getNbrOfItems
public int getNbrOfItems() -
finishSetup
public void finishSetup()call after fsAddrs is loaded Currently has no purpose due to change of internal impl -
getItemAddr
public int getItemAddr(int index) -
getItemIndex
public int getItemIndex(int itemAddr)
-