Package vcf
Class Steps
- java.lang.Object
-
- vcf.Steps
-
public class Steps extends java.lang.ObjectClass
Stepsrepresents a partition of a list of markers into a sequence of sets of consecutive markers (the steps).Instances of class
Stepsare immutable.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intend(int step)Returns the index of the last marker (exclusive) in the specified step.MarkerMapmap()Return the marker map.intsize()Returns the number of steps.intstart(int step)Returns the index of the first marker in the specified step.
-
-
-
Constructor Detail
-
Steps
public Steps(MarkerMap map, float minStep)
Constructs a newStepsinstance 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) == falsejava.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
-
-