Documentation of 'visad.MathType' Java class
MathType
visad

Class MathType

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    FunctionType, ScalarType, SetType, TupleType


    public abstract class MathType
    extends java.lang.Object
    implements java.io.Serializable
    MathType is the superclass for VisAD's hierarchy of mathematical types. It encompasses the mathematical concepts of scalars, tuples (i.e., n-dimensional vectors), functions, and certain forms of sets.

    VisAD Data objects are finite approximations to math objects. Every Data object possesses a MathType, which characterizes the mathematical object that the data approximate. This MathType is not synonymous with the class of the Data object, even though the class names for a Data object and its corresponding MathType object (Set and SetType, e.g.) may be similar.

    MathType objects are immutable; one implication is that the setDefaultSet method (in RealTupleType) can be invoked only prior to using the related getDefaultSet method.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      MathType()
      this constructor assumes it is not creating an instrinsic MathType
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      static void addTimeAlias(java.lang.String name)
      Adds a ScalarType name that guessMaps should map to Animation.
      abstract MathType binary(MathType type, int op, java.util.Vector names) 
      abstract ShadowType buildShadowType(DataDisplayLink link, ShadowType parent) 
      abstract MathType cloneDerivative(RealType d_partial) 
      abstract boolean equals(java.lang.Object type)
      ScalarTypes are equal if they have the same name; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equal
      abstract boolean equalsExceptName(MathType type)
      this is useful for determining compatibility of Data objects for binary mathematical operations; any RealTypes are equal; any TextTypes are equal; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equal
      abstract boolean equalsExceptNameButUnits(MathType type) 
      static boolean findScalarType(MathType mt, ScalarType st)
      return true if st occurs in mt
      ScalarMap[] guessMaps(boolean threeD)
      Guesses at a set of "default" mappings for this MathType.
      static void main(java.lang.String[] args)
      run 'java visad.MathType' to test MathType.prettyString() and MathType.guessMaps()
      abstract Data missingData()
      returns a missing Data object for any MathType
      java.lang.String prettyString()
      return a String that indents complex MathTypes for human readability
      abstract java.lang.String prettyString(int indent) 
      static MathType stringToType(java.lang.String s)
      create a MathType from its string representation; essentially the inverse of the prettyString method
      java.lang.String toString() 
      abstract MathType unary(int op, java.util.Vector names) 
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MathType

        public MathType()
        this constructor assumes it is not creating an instrinsic MathType
    • Method Detail

      • equals

        public abstract boolean equals(java.lang.Object type)
        ScalarTypes are equal if they have the same name; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equal
        Overrides:
        equals in class java.lang.Object
      • equalsExceptName

        public abstract boolean equalsExceptName(MathType type)
        this is useful for determining compatibility of Data objects for binary mathematical operations; any RealTypes are equal; any TextTypes are equal; TupleTypes are equal if their components are equal; FunctionTypes are equal if their domains and ranges are equal
      • missingData

        public abstract Data missingData()
                                  throws VisADException,
                                         java.rmi.RemoteException
        returns a missing Data object for any MathType
        Throws:
        VisADException
        java.rmi.RemoteException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • prettyString

        public java.lang.String prettyString()
        return a String that indents complex MathTypes for human readability
      • prettyString

        public abstract java.lang.String prettyString(int indent)
      • stringToType

        public static MathType stringToType(java.lang.String s)
                                     throws VisADException
        create a MathType from its string representation; essentially the inverse of the prettyString method
        Throws:
        VisADException
      • addTimeAlias

        public static void addTimeAlias(java.lang.String name)
        Adds a ScalarType name that guessMaps should map to Animation.
      • guessMaps

        public ScalarMap[] guessMaps(boolean threeD)
        Guesses at a set of "default" mappings for this MathType. Intuitively, first we look for a FunctionType with domain dimension 3, then a nested group of FunctionTypes with 'cumulative' domain dimension 3. Next we look for a FunctionType or nested group of FunctionTypes with domain dimension 2. Then, we look for a FunctionType with domain dimension 1. Nested groups of FunctionTypes may be nested with TupleTypes, which is indicated by some of the MathType templates. Lastly, if no matching FunctionTypes are found, then we look for 3-D, 2-D, or 1-D SetTypes.
      • main

        public static void main(java.lang.String[] args)
                         throws VisADException,
                                java.rmi.RemoteException
        run 'java visad.MathType' to test MathType.prettyString() and MathType.guessMaps()
        Throws:
        VisADException
        java.rmi.RemoteException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.