Class AlgorithmRegOAR35D.MatrixListItem

  • All Implemented Interfaces:
    java.lang.Comparable<AlgorithmRegOAR35D.MatrixListItem>
    Enclosing class:
    AlgorithmRegOAR35D

    class AlgorithmRegOAR35D.MatrixListItem
    extends java.lang.Object
    implements java.lang.Comparable<AlgorithmRegOAR35D.MatrixListItem>
    Helper class to make it easy to store the necessary information about a minimum. Stores the "point", or vector at which the minimum was reached; the "cost", or value of the cost function at that minimum; and the matrix, which was the true input into the cost function and represents the transformation that gives the minimum cost of differences between the images. Implements Comparable, so that a list of MatrixListItems can be sorted using Java's sort.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double cost
      Cost of function at this minimum.
      protected double[] initial
      Rotations, translations, scales, and skews that make up transformation.
      protected TransMatrixd matrix
      Matrix that gives best transformation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected MatrixListItem​(double _cost, TransMatrixd _matrix, double[] _initial)
      Creates new minimum object, setting the data and copying the point array explicitly.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(AlgorithmRegOAR35D.MatrixListItem o)
      Necessary to implement so that list may be sorted.
      java.lang.String toAbridgedString()
      Creates string of this object with just first 6DOF and cost.
      java.lang.String toString()
      Creates readable string of this object, including cost, matrix, and point with its meanings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • cost

        protected double cost
        Cost of function at this minimum.
      • initial

        protected double[] initial
        Rotations, translations, scales, and skews that make up transformation.
      • matrix

        protected TransMatrixd matrix
        Matrix that gives best transformation.
    • Constructor Detail

      • MatrixListItem

        protected MatrixListItem​(double _cost,
                                 TransMatrixd _matrix,
                                 double[] _initial)
        Creates new minimum object, setting the data and copying the point array explicitly.
        Parameters:
        _cost - Cost of this minimum.
        _matrix - Matrix that gives best transformation.
        _initial - Rotations, translations, scales, and skews that make up transformation.
    • Method Detail

      • compareTo

        public int compareTo​(AlgorithmRegOAR35D.MatrixListItem o)
        Necessary to implement so that list may be sorted. Returns -1 if this cost is less than the parameter's cost; 1 if this cost is greater than the parameter's cost; and 0 if they are equal.
        Specified by:
        compareTo in interface java.lang.Comparable<AlgorithmRegOAR35D.MatrixListItem>
        Parameters:
        o - MatrixListItem to compare to.
        Returns:
        -1 if this is less than, 1 if greater than, 0 if equal.
      • toAbridgedString

        public java.lang.String toAbridgedString()
        Creates string of this object with just first 6DOF and cost.
        Returns:
        Readable string representation of this object.
      • toString

        public java.lang.String toString()
        Creates readable string of this object, including cost, matrix, and point with its meanings.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Readable string representation of this object.