Class DefaultFrame<P extends FramePosition>

java.lang.Object
net.algart.matrices.stitching.DefaultFrame<P>
All Implemented Interfaces:
Frame<P>

public class DefaultFrame<P extends FramePosition> extends Object implements Frame<P>
  • Constructor Details

    • DefaultFrame

      protected DefaultFrame(Matrix<? extends PArray> matrix, P position)
  • Method Details

    • valueOf

      public static <P extends FramePosition> DefaultFrame<P> valueOf(Matrix<? extends PArray> matrix, P position)
    • dimCount

      public int dimCount()
      Description copied from interface: Frame
      The number of space dimensions.
      Specified by:
      dimCount in interface Frame<P extends FramePosition>
      Returns:
      the number of space dimensions
    • matrix

      public Matrix<? extends PArray> matrix()
      Description copied from interface: Frame
      The matrix, contained in this frame. There is a guarantee that thisInstance.Frame.matrix().dimCount()==thisInstance.Frame.dimCount().
      Specified by:
      matrix in interface Frame<P extends FramePosition>
      Returns:
      matrix contained in this frame.
    • position

      public P position()
      Description copied from interface: Frame
      The position in n-dimensional space, where the given matrix is placed. There is a guarantee that thisInstance.Frame.position().area().coordCount()==thisInstance.Frame.dimCount().
      Specified by:
      position in interface Frame<P extends FramePosition>
      Returns:
      position in n-dimensional space, where the given matrix is placed.
    • freeResources

      public void freeResources()
      Description copied from interface: Frame
      Calls Matrix.freeResources(null) for the matrix, contained in this frame.
      Specified by:
      freeResources in interface Frame<P extends FramePosition>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Description copied from interface: Frame
      Returns the hash code of this object. The result depends both on the matrix and the frame position.
      Specified by:
      hashCode in interface Frame<P extends FramePosition>
      Overrides:
      hashCode in class Object
      Returns:
      the hash code of this frame.
    • equals

      public boolean equals(Object obj)
      Description copied from interface: Frame
      Indicates whether some other object is also a Frame, containg the matrix and position, equal to the matrix and position in this frame.

      Note: this method should return true even the class of the passed frame is different than this class. This method checks only the built-in matrices and positions.

      Specified by:
      equals in interface Frame<P extends FramePosition>
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to be compared for equality with this frame.
      Returns:
      true if the specified object is a frame containing the equal matrix and position.