Record Class Tensor.Type
java.lang.Object
java.lang.Record
io.github.douira.glsl_transformer.ast.Tensor.Type
- Enclosing class:
- Tensor
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
ConstructorsConstructorDescriptionType(int tokenType, Tensor.NumberType numberType, int[] shape, int spaceDimensions, int highestDimension, String compactName, String explicitName) Creates an instance of aTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompactNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplicitNamerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thehighestDimensionrecord component.Returns the value of thenumberTyperecord component.int[]shape()Returns the value of theshaperecord component.intReturns the value of thespaceDimensionsrecord component.intReturns the value of thetokenTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Type
public Type(int tokenType, Tensor.NumberType numberType, int[] shape, int spaceDimensions, int highestDimension, String compactName, String explicitName) Creates an instance of aTyperecord class.- Parameters:
tokenType- the value for thetokenTyperecord componentnumberType- the value for thenumberTyperecord componentshape- the value for theshaperecord componentspaceDimensions- the value for thespaceDimensionsrecord componenthighestDimension- the value for thehighestDimensionrecord componentcompactName- the value for thecompactNamerecord componentexplicitName- the value for theexplicitNamerecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
tokenType
public int tokenType()Returns the value of thetokenTyperecord component.- Returns:
- the value of the
tokenTyperecord component
-
numberType
Returns the value of thenumberTyperecord component.- Returns:
- the value of the
numberTyperecord component
-
shape
public int[] shape()Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-
spaceDimensions
public int spaceDimensions()Returns the value of thespaceDimensionsrecord component.- Returns:
- the value of the
spaceDimensionsrecord component
-
highestDimension
public int highestDimension()Returns the value of thehighestDimensionrecord component.- Returns:
- the value of the
highestDimensionrecord component
-
compactName
Returns the value of thecompactNamerecord component.- Returns:
- the value of the
compactNamerecord component
-
explicitName
Returns the value of theexplicitNamerecord component.- Returns:
- the value of the
explicitNamerecord component
-