Interface CoordinateTransformationOperator

All Superinterfaces:
Operator
All Known Implementing Classes:
AbstractCoordinateTransformationOperator, LinearOperator, ProjectiveOperator

public interface CoordinateTransformationOperator extends Operator

Coordinate transformation operator in n-dimensional Euclidean space: g(x) = O f(x) = f(map(x)), where x is a point of the n-dimensional space, map is some mapping of this space, f is the source mathematical function and g is the result of applying the operator to f. The mapping is fully defined by the basic method of this interface, map(double[] destPoint, double[] srcPoint), that transforms the original point to the new point.

Implementations of this interface are usually immutable and always thread-safe: map method of this interface may be freely used while simultaneous accessing the same instance from several threads. All implementations of this interface from this package are immutable.

Author:
Daniel Alievsky
  • Field Summary

    Fields inherited from interface net.algart.math.functions.Operator

    IDENTITY
  • Method Summary

    Modifier and Type
    Method
    Description
    In this interface, this method is equivalent to CoordinateTransformedFunc.getInstance(f, this).
    boolean
    Indicates whether some other object is also a coordinate transformation operator, performing the same coordinate transformation as this one.
    int
    Returns the hash code of this object.
    void
    map(double[] destPoint, double[] srcPoint)
    Transforms the coordinates srcPoint of the original point in n-dimensional space to the coordinates destPoint of the destination point.
  • Method Details

    • map

      void map(double[] destPoint, double[] srcPoint)
      Transforms the coordinates srcPoint of the original point in n-dimensional space to the coordinates destPoint of the destination point. Usually destPoint.length must be equal to srcPoint.length (the number of dimensions), but this requirement is not strict.

      This method must not modify srcPoint array.

      Warning: this method will probably not work correctly if destPoint and srcPoint is the same Java array!

      Parameters:
      destPoint - the coordinates of the destinated point y, filled by this method.
      srcPoint - the coordinates of the source point x.
      Throws:
      NullPointerException - if one of the arguments is null.
      IllegalArgumentException - if destPoint.length!=srcPoint.length (may be not thrown by some implementations, or may be thrown in other situations).
    • apply

      Func apply(Func f)
      In this interface, this method is equivalent to CoordinateTransformedFunc.getInstance(f, this).
      Specified by:
      apply in interface Operator
      Parameters:
      f - the parent function, the arguments of which will be mapped by this operator.
      Returns:
      new transformed function.
    • hashCode

      int hashCode()
      Returns the hash code of this object. The result depends on all parameters, specifying coordinate transformation, performed by this operator.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code of this operator.
    • equals

      boolean equals(Object obj)
      Indicates whether some other object is also a coordinate transformation operator, performing the same coordinate transformation as this one.

      There is high probability, but no guarantee that this method returns true if the passed operator specifies a transformation, identical to this one. There is a guarantee that this method returns false if the passed operator specifies a transformation, different than this one.

      Overrides:
      equals in class Object
      Parameters:
      obj - the object to be compared for equality with this operator.
      Returns:
      true if the specified object is a coordinate transformation operator equal to this one.