|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.VisADMath
public final class VisADMath
Utility class: provides support for mathematical operations on VisAD data objects.
| Nested Class Summary | |
|---|---|
protected static class |
VisADMath.Index
Provides support for indexing sample points. |
| Method Summary | |
|---|---|
static Data |
add(Data data1,
Data data2)
Adds two data objects together. |
static FlatField |
curveIntegralOfGradient(Field field)
Returns the indefinite curve integral of a Field, which is assumed to be the gradient of a function. |
static Data |
divide(Data data1,
Data data2)
Divides one data object by another. |
static Data |
exp(Data data)
Exponentiates a data object. |
static FlatField |
fromReference(FunctionType type,
FlatField data)
Transforms a FlatField object from a reference CoordinateSystem. |
static Data |
fromReference(MathType type,
Data data)
Transforms a data object from a reference CoordinateSystem. |
static RealTuple |
fromReference(RealTupleType type,
RealTuple data)
Transforms a RealTuple object from a reference CoordinateSystem. |
static IrregularSet |
fromReference(SetType type,
SampledSet data)
Transforms a SampledSet object from a reference CoordinateSystem. |
static Data |
invert(Data data)
Inverts a data object by forming the reciprocal. |
static Data |
log(Data data)
Takes the natural logarithm of a data object. |
static void |
main(String[] args)
Tests this class. |
static Data |
multiply(Data data1,
Data data2)
Multiplies two data objects together. |
static Data |
negate(Data data)
Negates a data object. |
static FlatField |
newFlatField(SampledSet set)
Creates a FlatField from a SampledSet. |
static FlatField |
newFlatField(SampledSet set,
MathType rangeType,
CoordinateSystem rangeCoordinateSystem)
Creates a FlatField from a SampledSet, a MathType for the range, and a CoordinateSystem for the range. |
static FlatField |
newFlatField(SampledSet domain,
SampledSet range)
Creates a FlatField from two SampledSet-s. |
static FlatField |
newFlatField(SampledSet domain,
SampledSet range,
MathType rangeType,
CoordinateSystem rangeCoordinateSystem)
Creates a FlatField from a domain SampledSet, a range SampledSet, and a CoordinateSystem for the range. |
static Data |
pow(Data base,
Data exponent)
Raises one data object to the power of another. |
static Data |
subtract(Data data1,
Data data2)
Subtracts one data object from another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Data negate(Data data)
throws VisADException,
RemoteException
data - The data object to be negated.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data invert(Data data)
throws VisADException,
RemoteException
data - The data object to be inverted.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data exp(Data data)
throws VisADException,
RemoteException
data - The data object to be exponentiated.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data log(Data data)
throws VisADException,
RemoteException
data - The data object to have the natural logarithm
taken.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data add(Data data1,
Data data2)
throws UnimplementedException,
TypeException,
ArithmeticException,
VisADException,
RemoteException
Data.WEIGHTED_AVERAGE and Data.NO_ERRORS.
data1 - The first data object.data2 - The second data object.
UnimplementedException - Operation not yet implemented.
TypeException - MathTypes are incompatible.
ArithmeticException - Invalid operation between types.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data subtract(Data data1,
Data data2)
throws UnimplementedException,
TypeException,
ArithmeticException,
VisADException,
RemoteException
data1 - The first data object.data2 - The second data object.
UnimplementedException - Operation not yet implemented.
TypeException - MathTypes are incompatible.
ArithmeticException - Invalid operation between types.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data multiply(Data data1,
Data data2)
throws UnimplementedException,
TypeException,
ArithmeticException,
VisADException,
RemoteException
Data.WEIGHTED_AVERAGE and Data.NO_ERRORS.
data1 - The first data object.data2 - The second data object.
UnimplementedException - Operation not yet implemented.
TypeException - MathTypes are incompatible.
ArithmeticException - Invalid operation between types.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data divide(Data data1,
Data data2)
throws UnimplementedException,
TypeException,
ArithmeticException,
VisADException,
RemoteException
data1 - The first data object.data2 - The second data object.
UnimplementedException - Operation not yet implemented.
TypeException - MathTypes are incompatible.
ArithmeticException - Invalid operation between types.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data pow(Data base,
Data exponent)
throws UnimplementedException,
TypeException,
ArithmeticException,
VisADException,
RemoteException
base - The data object to be raised by a power.exponent - The exponent by which to raise the base.
UnimplementedException - Operation not yet implemented.
TypeException - MathTypes are incompatible.
ArithmeticException - Invalid operation between types.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static Data fromReference(MathType type,
Data data)
throws TypeException,
VisADException,
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.
TypeException - Data object has illegal type.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static RealTuple fromReference(RealTupleType type,
RealTuple data)
throws VisADException,
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.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static IrregularSet fromReference(SetType type,
SampledSet data)
throws 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.
VisADException - Couldn't create necessary VisAD object.
public static FlatField fromReference(FunctionType type,
FlatField data)
throws VisADException,
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.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static FlatField curveIntegralOfGradient(Field field)
throws FieldException,
VisADException,
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.
FieldException - The Field has a non-flat range or range
dimension of Field != domain dimension of Field.
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static FlatField newFlatField(SampledSet set)
throws VisADException,
RemoteException
set - The SampledSet.
((SetType)set.getType()).getDomain(). The CoordinateSystem of the
range will be that of the set (i.e.
set.getCoordinateSystem()).
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static FlatField newFlatField(SampledSet domain,
SampledSet range)
throws VisADException,
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()).
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static FlatField newFlatField(SampledSet set,
MathType rangeType,
CoordinateSystem rangeCoordinateSystem)
throws VisADException,
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().
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static FlatField newFlatField(SampledSet domain,
SampledSet range,
MathType rangeType,
CoordinateSystem rangeCoordinateSystem)
throws VisADException,
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().
VisADException - Couldn't create necessary VisAD object.
RemoteException - Java RMI failure.
public static void main(String[] args)
throws VisADException,
RemoteException
args - Ignored.
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||