Class Snapshot

java.lang.Object
edu.cnu.mdi.splot.pdata.Snapshot

public final class Snapshot extends Object
A snapshot of data points. This is to avoid concurrent modification issues.
Author:
heddle
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double[]
    The error data (sigmaY)
    final double[]
    The x data
    final double[]
    The y data
  • Constructor Summary

    Constructors
    Constructor
    Description
    Snapshot(double[] x, double[] y, double[] e)
    Create a snapshot.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the number of data points in the snapshot.

    Methods inherited from class java.lang.Object

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

    • x

      public final double[] x
      The x data
    • y

      public final double[] y
      The y data
    • e

      public final double[] e
      The error data (sigmaY)
  • Constructor Details

    • Snapshot

      public Snapshot(double[] x, double[] y, double[] e)
      Create a snapshot. Presumably the object creating the snapshot has copied the data and is locking the backing data during the copy.
      Parameters:
      x - the x data
      y - the y data
      e - the error data (sigmaY) may be null
  • Method Details

    • length

      public int length()
      Get the number of data points in the snapshot.
      Returns:
      the number of data points in the snapshot.