Package vcf

Class Steps

java.lang.Object
vcf.Steps

public class Steps extends 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.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Steps(MarkerMap map, float minStep)
    Constructs a new Steps instance from the specified data.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    end(int step)
    Returns the index of the last marker (exclusive) in the specified step.
    map()
    Return the marker map.
    int
    Returns the number of steps.
    int
    start(int step)
    Returns the index of the first marker in the specified step.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Steps

      public Steps(MarkerMap map, float minStep)
      Constructs a new Steps instance from the specified data.
      Parameters:
      map - the marker map
      minStep - the minimum distance between the first markers in consecutive steps
      Throws:
      IllegalArgumentException - if minStep <= 0f || Float.isFinite(minStep) == false
      NullPointerException - if map == null
  • Method Details

    • 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:
      IllegalArgumentException - if step < 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:
      IllegalArgumentException - if step < 0 || step >= this.nSteps()
    • map

      public MarkerMap map()
      Return the marker map.
      Returns:
      the marker map