visad
Class LogCoordinateSystem

java.lang.Object
  extended by visad.CoordinateSystem
      extended by visad.LogCoordinateSystem
All Implemented Interfaces:
Serializable

public class LogCoordinateSystem
extends CoordinateSystem

A CoordinateSystem to transform between values and their logarithms. The logarithm is the reference.

See Also:
Serialized Form

Constructor Summary
LogCoordinateSystem(RealTupleType reference)
          Construct a coordinate system with logarithmical reference of base 10.
LogCoordinateSystem(RealTupleType reference, double base)
          Construct a coordinate system with logarithmical reference specified
 
Method Summary
 boolean equals(Object cs)
          See if the Object in question is equal to this LogCoordinateSystem
 double[][] fromReference(double[][] logValues)
          Convert logrithmic values to values.
 double getBase()
          Get the base used in this LogCoordinateSystem.
 double[][] toReference(double[][] values)
          Convert values to logarithmic values.
 
Methods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogCoordinateSystem

public LogCoordinateSystem(RealTupleType reference)
                    throws VisADException
Construct a coordinate system with logarithmical reference of base 10.

Parameters:
reference - MathType of values
Throws:
VisADException - some VisAD error

LogCoordinateSystem

public LogCoordinateSystem(RealTupleType reference,
                           double base)
                    throws VisADException
Construct a coordinate system with logarithmical reference specified

Parameters:
reference - MathType of values
base - logrithmic base
Throws:
VisADException - negative or zero base specified
Method Detail

toReference

public double[][] toReference(double[][] values)
                       throws VisADException
Convert values to logarithmic values.

Specified by:
toReference in class CoordinateSystem
Parameters:
values - array of values
Returns:
array of logarithms of values
Throws:
VisADException - values dimension not the same as CS dimension

fromReference

public double[][] fromReference(double[][] logValues)
                         throws VisADException
Convert logrithmic values to values.

Specified by:
fromReference in class CoordinateSystem
Parameters:
logValues - array of logrithmic values
Returns:
array of values
Throws:
VisADException - logValues dimension not the same as CS dimension

getBase

public double getBase()
Get the base used in this LogCoordinateSystem.


equals

public boolean equals(Object cs)
See if the Object in question is equal to this LogCoordinateSystem

Specified by:
equals in class CoordinateSystem
Parameters:
cs - Object in question
Returns:
true if cs's reference tuples and base is equal to this's