Package vcf

Class 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.

    • Constructor Summary

      Constructors 
      Constructor Description
      Steps​(MarkerMap map, float minStep)
      Constructs a new Steps instance from the specified data.
    • 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.
      • Methods inherited from class java.lang.Object

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

      • 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:
        java.lang.IllegalArgumentException - if minStep <= 0f || Float.isFinite(minStep) == false
        java.lang.NullPointerException - if map == 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 - 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:
        java.lang.IllegalArgumentException - if step < 0 || step >= this.nSteps()
      • map

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