Package cnuphys.swimZ

Class SwimZRange

java.lang.Object
cnuphys.swimZ.SwimZRange

public class SwimZRange extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    SwimZRange(double zo, double zf, double stepSize)
    Create an integration range
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the number of steps
    double
    Get the step size.
    double
    Get the final value of z
    double
    Get the starting value of z
    static void
    main(String[] arg)
     
    double
    z(int n)
    Obtain z for a given step number n [0, numStep]

    Methods inherited from class java.lang.Object

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

    • SwimZRange

      public SwimZRange(double zo, double zf, double stepSize)
      Create an integration range
      Parameters:
      zo - the staring value
      zf - the ending value
      stepSize - the approximate stepsize. It will be modified to the next smaller stepsize that requires an integer number of steps.
  • Method Details

    • getZo

      public double getZo()
      Get the starting value of z
      Returns:
      the starting value of z
    • getZf

      public double getZf()
      Get the final value of z
      Returns:
      the final value of z
    • getNumStep

      public int getNumStep()
      Get the number of steps
      Returns:
      the number of steps
    • getSetpSize

      public double getSetpSize()
      Get the step size. This is the first stepsize smaller than the one provided in the constructor that ensures an integer number of steps takes us exactly to zf, i.e. zf = zo + numStep*stepSize
      Returns:
      the step size in Z
    • z

      public double z(int n)
      Obtain z for a given step number n [0, numStep]
      Parameters:
      n - the value of n
      Returns:
      the z value
    • main

      public static void main(String[] arg)