etomica.data.meter
Class MeterRDF

java.lang.Object
  extended by etomica.data.meter.MeterRDF
All Implemented Interfaces:
IAction, DataSourceIndependent, IDataSource, IEtomicaDataSource, Serializable

public class MeterRDF
extends Object
implements IAction, IEtomicaDataSource, DataSourceIndependent, Serializable

Meter for tabulation of the atomic radial distribution function (RDF). The meter takes data via actionPerformed and returns the average RDF via getData.

See Also:
Serialized Form

Field Summary
protected  IBox box
           
protected  int callCount
           
protected  DataFunction data
           
protected  long[] gSum
           
protected  AtomsetIteratorBoxDependent iterator
           
protected  DataDoubleArray rData
           
protected  ISpace space
           
protected  DataTag tag
           
protected  DataSourceUniform xDataSource
           
protected  double xMax
           
 
Constructor Summary
MeterRDF(ISpace space)
          Creates meter with default to compute pair correlation for all leaf atoms in a box.
 
Method Summary
 void actionPerformed()
          Takes the RDF for the current configuration of the given box.
 IBox getBox()
           
 IData getData()
          Returns the RDF, averaged over the calls to actionPerformed since the meter was reset or had some parameter changed (xMax or # of bins).
 IEtomicaDataInfo getDataInfo()
           
 int getIndependentArrayDimension()
          Returns the number of independent data dimensions
 DataDoubleArray getIndependentData(int i)
          Returns the X data for the given dimension
 DataDoubleArray.DataInfoDoubleArray getIndependentDataInfo(int i)
          Returns the DataInfo for the given dimension
 DataTag getIndependentTag()
          Returns the tag associated with this DataSource.
 String getName()
           
 DataTag getTag()
           
 DataSourceUniform getXDataSource()
           
 void reset()
          Zero's out the RDF sum tracked by this meter.
 void setBox(IBox box)
           
 void setName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

box

protected IBox box

space

protected final ISpace space

gSum

protected long[] gSum

data

protected DataFunction data

rData

protected DataDoubleArray rData

iterator

protected AtomsetIteratorBoxDependent iterator

xDataSource

protected final DataSourceUniform xDataSource

xMax

protected double xMax

tag

protected final DataTag tag

callCount

protected int callCount
Constructor Detail

MeterRDF

public MeterRDF(ISpace space)
Creates meter with default to compute pair correlation for all leaf atoms in a box.

Parameters:
parent -
Method Detail

getDataInfo

public IEtomicaDataInfo getDataInfo()
Specified by:
getDataInfo in interface IEtomicaDataSource

getTag

public DataTag getTag()
Specified by:
getTag in interface IEtomicaDataSource

reset

public void reset()
Zero's out the RDF sum tracked by this meter.


actionPerformed

public void actionPerformed()
Takes the RDF for the current configuration of the given box.

Specified by:
actionPerformed in interface IAction

getData

public IData getData()
Returns the RDF, averaged over the calls to actionPerformed since the meter was reset or had some parameter changed (xMax or # of bins).

Specified by:
getData in interface IDataSource
Returns:
the data given by this source

getXDataSource

public DataSourceUniform getXDataSource()

getIndependentData

public DataDoubleArray getIndependentData(int i)
Description copied from interface: DataSourceIndependent
Returns the X data for the given dimension

Specified by:
getIndependentData in interface DataSourceIndependent

getIndependentDataInfo

public DataDoubleArray.DataInfoDoubleArray getIndependentDataInfo(int i)
Description copied from interface: DataSourceIndependent
Returns the DataInfo for the given dimension

Specified by:
getIndependentDataInfo in interface DataSourceIndependent

getIndependentTag

public DataTag getIndependentTag()
Description copied from interface: DataSourceIndependent
Returns the tag associated with this DataSource.

Specified by:
getIndependentTag in interface DataSourceIndependent

getIndependentArrayDimension

public int getIndependentArrayDimension()
Description copied from interface: DataSourceIndependent
Returns the number of independent data dimensions

Specified by:
getIndependentArrayDimension in interface DataSourceIndependent

getBox

public IBox getBox()
Returns:
Returns the box.

setBox

public void setBox(IBox box)
Parameters:
box - The box to set.

getName

public String getName()

setName

public void setName(String name)