spis.Util.Monitor
Class XyData

java.lang.Object
  extended byspis.Util.Monitor.XyData
All Implemented Interfaces:
java.io.Serializable

public class XyData
extends java.lang.Object
implements java.io.Serializable

Class Name : XyData
Project ref : SPIS project
File name : XyData.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : Mar 2, 2004
Modification :

Description : set of (xi,yi) data (usually stored for postprocessing).

Versions and anomalies correction :

Version numberAuthor (name, e-mail) Corrections/Modifications
0.1 JF Roussel, roussel@onecert.frCreation


Version:
0.1
Author:
JF Roussel
See Also:
Serialized Form

Constructor Summary
XyData(java.lang.String name_)
          Default constructor with data name
XyData(java.lang.String name_, FloatScalTable xTable, FloatScalTable yTable)
          Default constructor with full data
XyData(java.lang.String name_, ScalFunctionOfScal f, float xMin, float xMax, int intervalNb)
          Constructor from a function: produces a set of (xi, f(xi))
 
Method Summary
 void addData(float x, float y)
           
 XyData computeHistogram(int intervalNb)
          Generates and returns the histogram of this set of data (xi, yi):
yi is considered as the number of occurences (can be uniformly 1) of the value xi.
 int getDataNb()
           
 java.lang.String getName()
           
 float[] getXArray()
           
 FloatScalTable getXTable()
           
 float[] getYArray()
           
 FloatScalTable getYTable()
           
 void setDataNb(int i)
           
 void setName(java.lang.String string)
           
 void setXTable(FloatScalTable table)
           
 void setYTable(FloatScalTable table)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XyData

public XyData(java.lang.String name_)
Default constructor with data name


XyData

public XyData(java.lang.String name_,
              FloatScalTable xTable,
              FloatScalTable yTable)
Default constructor with full data


XyData

public XyData(java.lang.String name_,
              ScalFunctionOfScal f,
              float xMin,
              float xMax,
              int intervalNb)
Constructor from a function: produces a set of (xi, f(xi))

Method Detail

computeHistogram

public XyData computeHistogram(int intervalNb)
Generates and returns the histogram of this set of data (xi, yi):
yi is considered as the number of occurences (can be uniformly 1) of the value xi.
The returned histogram (vi, ni) tells that ni occurences were found in the interval centred in vi.

Parameters:
intervalNb - number of steps in the wished histogram

addData

public void addData(float x,
                    float y)

getXArray

public float[] getXArray()
Returns:
x array

getYArray

public float[] getYArray()
Returns:
y array

getDataNb

public int getDataNb()
Returns:
data number

getName

public java.lang.String getName()
Returns:
data name

getXTable

public FloatScalTable getXTable()
Returns:
x table

getYTable

public FloatScalTable getYTable()
Returns:
y table

setDataNb

public void setDataNb(int i)
Parameters:
i - data number

setName

public void setName(java.lang.String string)
Parameters:
string - data name

setXTable

public void setXTable(FloatScalTable table)
Parameters:
table - x table

setYTable

public void setYTable(FloatScalTable table)
Parameters:
table - y table