|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IntSeqCounter
An IntSeqCounter provides counts for sequences of
integers. This interface parallels CharSeqCounter.
The method count(int[],int,int) returns the basic count
for the specified integer sequence. The method extensionCount(int[],int,int) is the sum of the counts for all
single integer extensions of the specified integer sequence. As
described in the class documentation for CharSeqCounter,
these two methods are enough to compute a maximum likelihood
estimator of conditional integer likelihoods.
The method numExtensions(int[],int,int) returns the
number of single integer extensions of the specified integer slice.
This is useful for computing interpolated estimates with
Witten-Bell smoothing.
| Method Summary | |
|---|---|
int |
count(int[] is,
int start,
int end)
Returns the count of the specified sequence of integers. |
long |
extensionCount(int[] is,
int start,
int end)
Returns the sum of the count of all sequences that extend the specified sequence by one integer. |
int[] |
integersFollowing(int[] is,
int start,
int end)
Returns an array of the integers that follow the specified integer array slice. |
int |
numExtensions(int[] is,
int start,
int end)
Returns the number of one integer extensions of the specified with non-zero counts. |
int[] |
observedIntegers()
Returns an array of all integers that have non-zero counts in the model. |
| Method Detail |
|---|
int count(int[] is,
int start,
int end)
is - Underlying array of integers.start - Index of first integer in the slice.end - Index of one past the last integer in the slice.
IndexOutOfBoundsException - If the start and end minus one
indices do not fall within the range of the integer array.
long extensionCount(int[] is,
int start,
int end)
is - Underlying array of integers.start - Index of first integer in the slice.end - Index of one past the last integer in the slice.
IndexOutOfBoundsException - If the start and end minus one
indices do not fall within the range of the integer array.
int numExtensions(int[] is,
int start,
int end)
is - Underlying array of integers.start - Index of first integer in the slice.end - Index of one past the last integer in the slice.
IndexOutOfBoundsException - If the start and end minus one
indices do not fall within the range of the integer array.
int[] integersFollowing(int[] is,
int start,
int end)
is - Underlying array of integers.start - Index of first integer in the slice.end - Index of one past the last integer in the slice.
IndexOutOfBoundsException - If the start and end minus one
indices do not fall within the range of the integer array.int[] observedIntegers()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||