Record Class Window2D

java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.nn.Window2D

public record Window2D(int height, int width, int strideHeight, int strideWidth, int paddingHeight, int paddingWidth, int dilationHeight, int dilationWidth) extends Record
Floor-mode spatial window with symmetric zero padding and optional dilation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Window2D(int height, int width)
     
    Window2D(int height, int width, int strideHeight, int strideWidth, int paddingHeight, int paddingWidth, int dilationHeight, int dilationWidth)
    Creates an instance of a Window2D record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
    Returns the value of the dilationHeight record component.
    int
    Returns the value of the dilationWidth record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    int
    outputHeight(int input)
     
    int
    outputWidth(int input)
     
    int
    Returns the value of the paddingHeight record component.
    int
    Returns the value of the paddingWidth record component.
    int
    Returns the value of the strideHeight record component.
    int
    Returns the value of the strideWidth record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Window2D

      public Window2D(int height, int width)
    • Window2D

      public Window2D(int height, int width, int strideHeight, int strideWidth, int paddingHeight, int paddingWidth, int dilationHeight, int dilationWidth)
      Creates an instance of a Window2D record class.
      Parameters:
      height - the value for the height record component
      width - the value for the width record component
      strideHeight - the value for the strideHeight record component
      strideWidth - the value for the strideWidth record component
      paddingHeight - the value for the paddingHeight record component
      paddingWidth - the value for the paddingWidth record component
      dilationHeight - the value for the dilationHeight record component
      dilationWidth - the value for the dilationWidth record component
  • Method Details

    • outputHeight

      public int outputHeight(int input)
    • outputWidth

      public int outputWidth(int input)
    • area

      public int area()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • strideHeight

      public int strideHeight()
      Returns the value of the strideHeight record component.
      Returns:
      the value of the strideHeight record component
    • strideWidth

      public int strideWidth()
      Returns the value of the strideWidth record component.
      Returns:
      the value of the strideWidth record component
    • paddingHeight

      public int paddingHeight()
      Returns the value of the paddingHeight record component.
      Returns:
      the value of the paddingHeight record component
    • paddingWidth

      public int paddingWidth()
      Returns the value of the paddingWidth record component.
      Returns:
      the value of the paddingWidth record component
    • dilationHeight

      public int dilationHeight()
      Returns the value of the dilationHeight record component.
      Returns:
      the value of the dilationHeight record component
    • dilationWidth

      public int dilationWidth()
      Returns the value of the dilationWidth record component.
      Returns:
      the value of the dilationWidth record component