Package vcf
Class Steps
- java.lang.Object
-
- vcf.Steps
-
public class Steps extends java.lang.Object
Class
Steps
represents a partition of a list of markers into a sequence of sets of consecutive markers (the steps).Instances of class
Steps
are immutable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
end(int step)
Returns the index of the last marker (exclusive) in the specified step.MarkerMap
map()
Return the marker map.int
size()
Returns the number of steps.int
start(int step)
Returns the index of the first marker in the specified step.
-
-
-
Constructor Detail
-
Steps
public Steps(MarkerMap map, float minStep)
Constructs a newSteps
instance from the specified data.- Parameters:
map
- the marker mapminStep
- the minimum distance between the first markers in consecutive steps- Throws:
java.lang.IllegalArgumentException
- ifminStep <= 0f || Float.isFinite(minStep) == false
java.lang.NullPointerException
- ifmap == null
-
-
Method Detail
-
size
public int size()
Returns the number of steps.- Returns:
- the number of steps
-
start
public int start(int step)
Returns the index of the first marker in the specified step.- Parameters:
step
- a step index- Returns:
- the index of the first marker in the specified step
- Throws:
java.lang.IllegalArgumentException
- ifstep < 0 || step >= this.nSteps()
-
end
public int end(int step)
Returns the index of the last marker (exclusive) in the specified step.- Parameters:
step
- a step index- Returns:
- the index of the last marker (exclusive) in the specified step
- Throws:
java.lang.IllegalArgumentException
- ifstep < 0 || step >= this.nSteps()
-
map
public MarkerMap map()
Return the marker map.- Returns:
- the marker map
-
-