DataDouble
, DataDoubleArray
, DataDoubleBDArray
, DataFunction
, DataGroup
, DataTable
, DataTensor
, DataVector
, LatticeSumCrystal.DataGroupLSC
, LatticeSumCrystalMolecular.DataGroupLSC
public interface IData
The data held by a Data instance is mutable, but the structure of a Data instance is not. The "structure" of a Data instance refers to the number and type of data it holds. A DataDoubleArray, for example, holds an array of double; the values in the array may be changed, but the length of the array (the structure) cannot. Thus any object holding a reference to a Data instance can be assured that the number and type of data it holds will not be changed by something else that also references the instance.
Information about the data is encapsulated in a DataInfo instance that is held by the Data instance. The DataInfo holds a descriptive label, a Dimension instance that describes the physical dimensions (e.g., mass, time) of the data, and a DataFactory that will make new independent instances of the same Data type and with the same structure. The DataInfo instance is, like the Data structure, completely immutable.
DataInfo
Modifier and Type | Method | Description |
---|---|---|
void |
assignTo(double[] array) |
Fills the given array with the values held by this Data instance.
|
void |
DE(double y) |
Divide-equals (*=) operation, dividing all values in data by given
value.
|
void |
DE(IData y) |
Divide-equals (/=) operation.
|
void |
E(double y) |
Equals (=) operation, sets all values in data equal to the given value.
|
void |
E(IData data) |
Deep-copies the data from the given object to this one.
|
int |
getLength() |
Returns the number of values held by the data instance.
|
double |
getValue(int i) |
Returns the i-th data value.
|
boolean |
isNaN() |
Returns true if any data value is true for Double.isNaN
|
void |
map(IFunction function) |
Maps the function on all data values, replace each with the value given
by the function applied to it.
|
void |
ME(IData y) |
Minus-equals (-=) operation.
|
void |
PE(double y) |
Plus-equals (+=) operation, adding given value to all values in data.
|
void |
PE(IData y) |
Plus-equals (+=) operation.
|
void |
TE(double y) |
Times-equals (*=) operation, multiplying all values in data by given
value.
|
void |
TE(IData y) |
Times-equals (*=) operation.
|
void E(IData data)
java.lang.ClassCastException
- if the given data object is not of a type that can be copied
to this one.void PE(IData y)
void ME(IData y)
void TE(IData y)
void DE(IData y)
void E(double y)
void PE(double y)
void TE(double y)
void DE(double y)
void map(IFunction function)
int getLength()
double getValue(int i)
i
- index of the desired data valuejava.lang.IllegalArgumentException
- if i >= getLength()void assignTo(double[] array)
java.lang.IllegalArgumentException
- if the length of the array is not equal to getLengthboolean isNaN()