public final class VisADMath
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
VisADMath.Index
Provides support for indexing sample points.
|
Modifier and Type | Method and Description |
---|---|
static visad.Data |
add(visad.Data data1,
visad.Data data2)
Adds two data objects together.
|
static visad.FlatField |
curveIntegralOfGradient(visad.Field field)
Returns the indefinite curve integral of a Field, which is assumed
to be the gradient of a function.
|
static visad.Data |
divide(visad.Data data1,
visad.Data data2)
Divides one data object by another.
|
static visad.Data |
exp(visad.Data data)
Exponentiates a data object.
|
static visad.FlatField |
fromReference(visad.FunctionType type,
visad.FlatField data)
Transforms a FlatField object from a reference CoordinateSystem.
|
static visad.Data |
fromReference(visad.MathType type,
visad.Data data)
Transforms a data object from a reference CoordinateSystem.
|
static visad.RealTuple |
fromReference(visad.RealTupleType type,
visad.RealTuple data)
Transforms a RealTuple object from a reference CoordinateSystem.
|
static visad.IrregularSet |
fromReference(visad.SetType type,
visad.SampledSet data)
Transforms a SampledSet object from a reference CoordinateSystem.
|
static visad.Data |
invert(visad.Data data)
Inverts a data object by forming the reciprocal.
|
static visad.Data |
log(visad.Data data)
Takes the natural logarithm of a data object.
|
static void |
main(java.lang.String[] args)
Tests this class.
|
static visad.Data |
multiply(visad.Data data1,
visad.Data data2)
Multiplies two data objects together.
|
static visad.Data |
negate(visad.Data data)
Negates a data object.
|
static visad.FlatField |
newFlatField(visad.SampledSet set)
Creates a FlatField from a SampledSet.
|
static visad.FlatField |
newFlatField(visad.SampledSet set,
visad.MathType rangeType,
visad.CoordinateSystem rangeCoordinateSystem)
Creates a FlatField from a SampledSet, a MathType for the range, and a
CoordinateSystem for the range.
|
static visad.FlatField |
newFlatField(visad.SampledSet domain,
visad.SampledSet range)
Creates a FlatField from two SampledSet-s.
|
static visad.FlatField |
newFlatField(visad.SampledSet domain,
visad.SampledSet range,
visad.MathType rangeType,
visad.CoordinateSystem rangeCoordinateSystem)
Creates a FlatField from a domain SampledSet, a range SampledSet, and a
CoordinateSystem for the range.
|
static visad.Data |
pow(visad.Data base,
visad.Data exponent)
Raises one data object to the power of another.
|
static visad.Data |
subtract(visad.Data data1,
visad.Data data2)
Subtracts one data object from another.
|
public static visad.Data negate(visad.Data data) throws visad.VisADException, java.rmi.RemoteException
data
- The data object to be negated.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data invert(visad.Data data) throws visad.VisADException, java.rmi.RemoteException
data
- The data object to be inverted.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data exp(visad.Data data) throws visad.VisADException, java.rmi.RemoteException
data
- The data object to be exponentiated.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data log(visad.Data data) throws visad.VisADException, java.rmi.RemoteException
data
- The data object to have the natural logarithm
taken.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data add(visad.Data data1, visad.Data data2) throws visad.UnimplementedException, visad.TypeException, java.lang.ArithmeticException, visad.VisADException, java.rmi.RemoteException
Data.WEIGHTED_AVERAGE
and Data.NO_ERRORS
.data1
- The first data object.data2
- The second data object.visad.UnimplementedException
- Operation not yet implemented.visad.TypeException
- MathTypes are incompatible.java.lang.ArithmeticException
- Invalid operation between types.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data subtract(visad.Data data1, visad.Data data2) throws visad.UnimplementedException, visad.TypeException, java.lang.ArithmeticException, visad.VisADException, java.rmi.RemoteException
data1
- The first data object.data2
- The second data object.visad.UnimplementedException
- Operation not yet implemented.visad.TypeException
- MathTypes are incompatible.java.lang.ArithmeticException
- Invalid operation between types.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data multiply(visad.Data data1, visad.Data data2) throws visad.UnimplementedException, visad.TypeException, java.lang.ArithmeticException, visad.VisADException, java.rmi.RemoteException
Data.WEIGHTED_AVERAGE
and Data.NO_ERRORS
.data1
- The first data object.data2
- The second data object.visad.UnimplementedException
- Operation not yet implemented.visad.TypeException
- MathTypes are incompatible.java.lang.ArithmeticException
- Invalid operation between types.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data divide(visad.Data data1, visad.Data data2) throws visad.UnimplementedException, visad.TypeException, java.lang.ArithmeticException, visad.VisADException, java.rmi.RemoteException
data1
- The first data object.data2
- The second data object.visad.UnimplementedException
- Operation not yet implemented.visad.TypeException
- MathTypes are incompatible.java.lang.ArithmeticException
- Invalid operation between types.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data pow(visad.Data base, visad.Data exponent) throws visad.UnimplementedException, visad.TypeException, java.lang.ArithmeticException, visad.VisADException, java.rmi.RemoteException
base
- The data object to be raised by a power.exponent
- The exponent by which to raise the base.visad.UnimplementedException
- Operation not yet implemented.visad.TypeException
- MathTypes are incompatible.java.lang.ArithmeticException
- Invalid operation between types.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.Data fromReference(visad.MathType type, visad.Data data) throws visad.TypeException, visad.VisADException, java.rmi.RemoteException
type
- The VisAD MathType of the returned data object.
It shall be a RealTupleType, SetType, or
FunctionType and shall have a CoordinateSystem,
which shall be used in the transformation.data
- The data object to be transformed. The object
shall be a Real, RealTuple, SampledSet, or
FlatField.type
.visad.TypeException
- Data object has illegal type.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.RealTuple fromReference(visad.RealTupleType type, visad.RealTuple data) throws visad.VisADException, java.rmi.RemoteException
type
- The MathType of the returned data object. It
shall have a CoordinateSystem, which shall be
used in the transformation.data
- The RealTuple object to be transformed.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.IrregularSet fromReference(visad.SetType type, visad.SampledSet data) throws visad.VisADException
type
- The MathType of the returned data object.It
shall have a CoordinateSystem, which shall be
used in the transformation.data
- The SampledSet object to be transformed.visad.VisADException
- Couldn't create necessary VisAD object.public static visad.FlatField fromReference(visad.FunctionType type, visad.FlatField data) throws visad.VisADException, java.rmi.RemoteException
type
- The MathType of the returned data object.It
shall have a CoordinateSystem, which shall be
used in the transformation.data
- The data object to be transformed.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.FlatField curveIntegralOfGradient(visad.Field field) throws visad.FieldException, visad.VisADException, java.rmi.RemoteException
Scalar derivative dy/dx RealTuple of partial derivatives (du/dx, du/dy, ...) Tuple of RealTuple-s of partial derivatives (one set of partial derivatives for each component of the resulting FlatField) ((du/dx, du/dy, ...), (dv/dx, dv/dy, ...), ...)The domain points of the returned FlatField will be the same as the Field's. The type of the range of the returned FlatField will depend on the type of the range of the Field. The value of the range at the first domain point of the returned FlatField shall be arbitrarily set to (possibly vector) zero.
field
- The Field whose indefinite curve integral
is to be computed.visad.FieldException
- The Field has a non-flat range or range
dimension of Field != domain dimension of Field.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.FlatField newFlatField(visad.SampledSet set) throws visad.VisADException, java.rmi.RemoteException
set
- The SampledSet.((SetType)set.getType()).getDomain()
. The CoordinateSystem of the
range will be that of the set (i.e.
set.getCoordinateSystem()
).visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.FlatField newFlatField(visad.SampledSet domain, visad.SampledSet range) throws visad.VisADException, java.rmi.RemoteException
domain
- The domain of the FlatField.range
- The range of the FlatField.((SetType)set.getType()).getDomain()
. The CoordinateSystem of the
range will be that of the set (i.e.
set.getCoordinateSystem()
).visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.FlatField newFlatField(visad.SampledSet set, visad.MathType rangeType, visad.CoordinateSystem rangeCoordinateSystem) throws visad.VisADException, java.rmi.RemoteException
set
- The SampledSet.rangeType
- The MathType of the range for the returned
FlatField.rangeCoordinateSystem
- The CoordinateSystem for the range of the
returned FlatField. May be null
.((SetType)set.getType()).getDomain()
.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static visad.FlatField newFlatField(visad.SampledSet domain, visad.SampledSet range, visad.MathType rangeType, visad.CoordinateSystem rangeCoordinateSystem) throws visad.VisADException, java.rmi.RemoteException
domain
- The domain SampledSet.range
- The range SampledSet.rangeType
- The MathType of the range for the returned
FlatField.rangeCoordinateSystem
- The CoordinateSystem for the range of the
returned FlatField. May be null
.((SetType)set.getType()).getDomain()
.visad.VisADException
- Couldn't create necessary VisAD object.java.rmi.RemoteException
- Java RMI failure.public static void main(java.lang.String[] args) throws visad.VisADException, java.rmi.RemoteException
args
- Ignored.visad.VisADException
- if a core VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.