Record Class Tensor.Type

java.lang.Object
java.lang.Record
io.github.douira.glsl_transformer.ast.Tensor.Type
Enclosing class:
Tensor

@Desugar public static record Tensor.Type(int tokenType, Tensor.NumberType numberType, int[] shape, int spaceDimensions, int highestDimension, String compactName, String explicitName) extends Record
The shape is an array of up to three integers describing how big this tensor is in each dimension. The first dimension contains the number of bits of each value and the following dimensions describe the actual dimensions of the tensor.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Type(int tokenType, Tensor.NumberType numberType, int[] shape, int spaceDimensions, int highestDimension, String compactName, String explicitName)
    Creates an instance of a Type record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the compactName record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the explicitName record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the highestDimension record component.
    Returns the value of the numberType record component.
    int[]
    Returns the value of the shape record component.
    int
    Returns the value of the spaceDimensions record component.
    int
    Returns the value of the tokenType record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • Type

      public Type(int tokenType, Tensor.NumberType numberType, int[] shape, int spaceDimensions, int highestDimension, String compactName, String explicitName)
      Creates an instance of a Type record class.
      Parameters:
      tokenType - the value for the tokenType record component
      numberType - the value for the numberType record component
      shape - the value for the shape record component
      spaceDimensions - the value for the spaceDimensions record component
      highestDimension - the value for the highestDimension record component
      compactName - the value for the compactName record component
      explicitName - the value for the explicitName record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • tokenType

      public int tokenType()
      Returns the value of the tokenType record component.
      Returns:
      the value of the tokenType record component
    • numberType

      public Tensor.NumberType numberType()
      Returns the value of the numberType record component.
      Returns:
      the value of the numberType record component
    • shape

      public int[] shape()
      Returns the value of the shape record component.
      Returns:
      the value of the shape record component
    • spaceDimensions

      public int spaceDimensions()
      Returns the value of the spaceDimensions record component.
      Returns:
      the value of the spaceDimensions record component
    • highestDimension

      public int highestDimension()
      Returns the value of the highestDimension record component.
      Returns:
      the value of the highestDimension record component
    • compactName

      public String compactName()
      Returns the value of the compactName record component.
      Returns:
      the value of the compactName record component
    • explicitName

      public String explicitName()
      Returns the value of the explicitName record component.
      Returns:
      the value of the explicitName record component