| Modifier and Type | Class and Description |
|---|---|
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| protected final byte[] | |
| protected final int[] |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addSegments(@NotNull IBasedSegmentBuilder<?>
based segment builder builder, @NotNull SegmentTreeRange treeRange for which to add segments treeRange)Add segments selected by given treeRange |
| public void | addSegments(@NotNull IBasedSegmentBuilder<?>
builder to which to add the segments builder, int start index of sub-sequence of segment tree startIndex, int end index of sub-sequence of segment tree endIndex, int start offset of the subsequence to use as start anchor startOffset, int end offset of the subsequence to use as end anchor endOffset, int start pos of sub-sequence segments in tree startPos, int end pos of sub-sequence segments in tree endPos)Add segments of subsequence of this tree to builder |
| public int | |
| public static int | |
| public static @NotNull SegmentTree | |
| public static @NotNull SegmentTree | |
| public static @NotNull SegmentTree. | Returns: segment tree instance with the datasegments of the tree segments, @NotNull CharSequence all out of base text allText, boolean true to build index search data, false to build base offset tree data buildIndexData)Build binary tree search data Index data has aggregated lengths with BASE and TEXT segments in the data, Offset data has segment start offset with BASE and ANCHOR segments in the data since TEXT segments have no offset they are skipped
The offset data can be used to pass as treeData to |
| public int | |
| public static int | |
| public int | |
| public static int | |
| public @Nullable Segment | |
| public @Nullable Segment | findSegment(int index, int startPos, int endPos, @NotNull BasedSequence baseSeq, @Nullable Segment hint)
|
| public static @Nullable Segment | findSegment(int index, int[] treeData, int startPos, int endPos, byte[] segmentBytes, @NotNull BasedSequence baseSeq)
|
| public @Nullable SegmentTreePos | |
| public @Nullable SegmentTreePos | |
| public static @Nullable SegmentTreePos | |
| public static int | |
| public static int | |
| public static @NotNull CharSequence | Returns: subsequence of segment corresponding to part of it which is in the sub-sequence of the treesegment segment, int start index of sub-sequence of segment tree startIndex, int end index of sub-sequence of segment tree endIndex, int start pos of sub-sequence segments in tree startPos, int end pos of sub-sequence segments in tree endPos)Get char sequence of segment corresponding to sub-sequence in segment tree |
| public @Nullable Segment | |
| public static @Nullable Segment | |
| public @NotNull Segment | |
| public @NotNull Segment | |
| public static @NotNull Segment | |
| public byte[] | |
| public @NotNull SegmentOffsetTree | Returns: SegmentOffsetTree for this segment treebase sequence for the sequence for this segment tree baseSeq)Build an offset segment tree from this index segment tree Efficiently reuses segmentBytes and only computes offset treeData for BASE and ANCHOR segments |
| public @NotNull SegmentTreeRange | getSegmentRange(int startIndex, int endIndex, int startPos, int endPos, @NotNull BasedSequence baseSequence, @Nullable Segment hint)
|
| public int | |
| public int | |
| public int[] | |
| public boolean | |
| public static boolean | |
| public int | |
| public static int | |
| public static void | |
| public int | |
| public @NotNull String | |
| public @NotNull String |
| F_ANCHOR_FLAGS | back to summary |
|---|---|
| public static final int F_ANCHOR_FLAGS | |
| MAX_VALUE | back to summary |
|---|---|
| public static final int MAX_VALUE | |
| segmentBytes | back to summary |
|---|---|
| protected final byte[] segmentBytes | |
| treeData | back to summary |
|---|---|
| protected final int[] treeData | |
| SegmentTree | back to summary |
|---|---|
| protected SegmentTree(int[] treeData, byte[] segmentBytes) | |
| addSegments | back to summary |
|---|---|
| public void addSegments(@NotNull IBasedSegmentBuilder<?> builder, @NotNull SegmentTreeRange treeRange) Add segments selected by given treeRange
| |
| addSegments | back to summary |
|---|---|
| public void addSegments(@NotNull IBasedSegmentBuilder<?> builder, int startIndex, int endIndex, int startOffset, int endOffset, int startPos, int endPos) Add segments of subsequence of this tree to builder
| |
| aggrLength | back to summary |
|---|---|
| public int aggrLength(int pos) | |
| aggrLength | back to summary |
|---|---|
| public static int aggrLength(int pos, int[] treeData) | |
| build | back to summary |
|---|---|
public static @NotNull SegmentTree build(@NotNull Iterable<Seg> segments, @NotNull CharSequence allText)
| |
| build | back to summary |
|---|---|
public static @NotNull SegmentTree build(@NotNull BasedSegmentBuilder builder)
| |
| buildTreeData | back to summary |
|---|---|
| public static @NotNull SegmentTree. Build binary tree search data Index data has aggregated lengths with BASE and TEXT segments in the data, Offset data has segment start offset with BASE and ANCHOR segments in the data since TEXT segments have no offset they are skipped
The offset data can be used to pass as treeData to
| |
| byteOffset | back to summary |
|---|---|
| public int byteOffset(int pos) | |
| byteOffset | back to summary |
|---|---|
| public static int byteOffset(int pos, int[] treeData) | |
| byteOffsetData | back to summary |
|---|---|
| public int byteOffsetData(int pos) | |
| byteOffsetData | back to summary |
|---|---|
| public static int byteOffsetData(int pos, int[] treeData) | |
| findSegment | back to summary |
|---|---|
public @Nullable Segment findSegment(int index, @NotNull BasedSequence baseSeq, @Nullable Segment hint)
| |
| findSegment | back to summary |
|---|---|
public @Nullable Segment findSegment(int index, int startPos, int endPos, @NotNull BasedSequence baseSeq, @Nullable Segment hint)
| |
| findSegment | back to summary |
|---|---|
public static @Nullable Segment findSegment(int index, int[] treeData, int startPos, int endPos, byte[] segmentBytes, @NotNull BasedSequence baseSeq)
| |
| findSegmentPos | back to summary |
|---|---|
public @Nullable SegmentTreePos findSegmentPos(int index)
| |
| findSegmentPos | back to summary |
|---|---|
public @Nullable SegmentTreePos findSegmentPos(int index, int startPos, int endPos)
| |
| findSegmentPos | back to summary |
|---|---|
public static @Nullable SegmentTreePos findSegmentPos(int index, int[] treeData, int startPos, int endPos)
| |
| getAnchorOffset | back to summary |
|---|---|
| public static int getAnchorOffset(int byteOffsetData) | |
| getByteOffset | back to summary |
|---|---|
| public static int getByteOffset(int byteOffsetData) | |
| getCharSequence | back to summary |
|---|---|
| public static @NotNull CharSequence getCharSequence(@NotNull Segment segment, int startIndex, int endIndex, int startPos, int endPos) Get char sequence of segment corresponding to sub-sequence in segment tree
| |
| getPrevAnchor | back to summary |
|---|---|
public @Nullable Segment getPrevAnchor(int pos, @NotNull BasedSequence baseSeq)
| |
| getPrevAnchor | back to summary |
|---|---|
public static @Nullable Segment getPrevAnchor(int pos, int[] treeData, byte[] segmentBytes, @NotNull BasedSequence baseSeq)
| |
| getSegment | back to summary |
|---|---|
public @NotNull Segment getSegment(int byteOffset, int pos, int startIndex, @NotNull BasedSequence baseSeq)
| |
| getSegment | back to summary |
|---|---|
public @NotNull Segment getSegment(int pos, @NotNull BasedSequence baseSeq)
| |
| getSegment | back to summary |
|---|---|
public static @NotNull Segment getSegment(int pos, int[] treeData, byte[] segmentBytes, @NotNull BasedSequence baseSeq)
| |
| getSegmentBytes | back to summary |
|---|---|
| public byte[] getSegmentBytes() | |
| getSegmentOffsetTree | back to summary |
|---|---|
| public @NotNull SegmentOffsetTree getSegmentOffsetTree(@NotNull BasedSequence baseSeq) Build an offset segment tree from this index segment tree Efficiently reuses segmentBytes and only computes offset treeData for BASE and ANCHOR segments
| |
| getSegmentRange | back to summary |
|---|---|
public @NotNull SegmentTreeRange getSegmentRange(int startIndex, int endIndex, int startPos, int endPos, @NotNull BasedSequence baseSequence, @Nullable Segment hint)
| |
| getTextEndOffset | back to summary |
|---|---|
| public int getTextEndOffset(Segment segment, @NotNull BasedSequence baseSequence) | |
| getTextStartOffset | back to summary |
|---|---|
| public int getTextStartOffset(Segment segment, @NotNull BasedSequence baseSequence) | |
| getTreeData | back to summary |
|---|---|
| public int[] getTreeData() | |
| hasPreviousAnchor | back to summary |
|---|---|
| public boolean hasPreviousAnchor(int pos) | |
| hasPreviousAnchor | back to summary |
|---|---|
| public static boolean hasPreviousAnchor(int pos, int[] treeData) | |
| previousAnchorOffset | back to summary |
|---|---|
| public int previousAnchorOffset(int pos) | |
| previousAnchorOffset | back to summary |
|---|---|
| public static int previousAnchorOffset(int pos, int[] treeData) | |
| setTreeData | back to summary |
|---|---|
| public static void setTreeData(int pos, int[] treeData, int agrrLength, int byteOffset, int prevAnchorOffset) | |
| size | back to summary |
|---|---|
| public int size() | |
| toString | back to summary |
|---|---|
public @NotNull String toString(@NotNull BasedSequence baseSeq)
| |
| toString | back to summary |
|---|---|
| public @NotNull String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| public final @NotNull byte[] | |
| public final @Nullable int[] | |
| public final @NotNull int[] |
| Access | Constructor and Description |
|---|---|
| public | SegmentTreeData(@NotNull int[] treeData, @NotNull byte[] segmentBytes, @Nullable int[] startIndices)
|
| segmentBytes | back to summary |
|---|---|
| public final @NotNull byte[] segmentBytes
| |
| startIndices | back to summary |
|---|---|
| public final @Nullable int[] startIndices
| |
| treeData | back to summary |
|---|---|
| public final @NotNull int[] treeData
| |
| SegmentTreeData | back to summary |
|---|---|
| public SegmentTreeData(@NotNull int[] treeData, @NotNull byte[] segmentBytes, @Nullable int[] startIndices) | |