public static class SequenceQuery.Gap extends Object implements Serializable
min=max=n
would only allow a fixed number
of n
terms. A Gap with
max=Integer.MAX_VALUE
allows arbitrarily long gaps.
A gap with min=max=0
allows no space between sub-query
results.Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
Gap(int min,
int max)
Creates a new
SequenceQuery.Gap . |
Modifier and Type | Method and Description |
---|---|
int |
check(int start,
int end)
Checks whether two given term positions can be the start and the end of
this gap (i.e.
|
int |
getMax() |
int |
getMin() |
public static final long serialVersionUID
public Gap(int min, int max)
SequenceQuery.Gap
.min
- the minimum number of terms required.max
- the maximum number of terms permitted.public int check(int start, int end)
end value needs to be
between (start + min + 1) and (start + max +1). This means a gap of zero
requires end == start + 1
.
start
- the start position for the gap.end
- the end position for the gap.0
if the start and end positions are accepted by
this gap, a negative number if the end position is too small, a positive
number if the end position is too large.public int getMin()
public int getMax()
Copyright © 2021 GATE. All rights reserved.