Class Type.ScalarType

Enclosing class:
Type

public static final class Type.ScalarType extends Type
  • Method Details

    • isScalar

      public boolean isScalar()
      Overrides:
      isScalar in class Type
    • getScalarKind

      public byte getScalarKind()
      Description copied from class: Type
      Returns the ScalarKind of this type (always NonScalar for non-scalar values).
      Overrides:
      getScalarKind in class Type
    • getRank

      public int getRank()
      Description copied from class: Type
      Returns the "rank" of a numeric type, in order of float > half > int > short. When operating on two numeric types, the result is the higher-rank type.
      Overrides:
      getRank in class Type
    • getMinWidth

      public int getMinWidth()
      Description copied from class: Type
      For scalars, returns the minimum size in bits of the type.
      Overrides:
      getMinWidth in class Type
    • getWidth

      public int getWidth()
      Description copied from class: Type
      For scalars, returns the size in bits of the type.
      Overrides:
      getWidth in class Type
    • getCols

      public int getCols()
      Description copied from class: Type
      For matrices, returns the number of columns (e.g. mat3x4 returns 3). For scalars and vectors, returns 1. For all other types, causes an assertion failure.
      Overrides:
      getCols in class Type
    • getRows

      public int getRows()
      Description copied from class: Type
      For matrices and vectors, returns the number of rows (e.g. mat3x4 return 4). For scalars, returns 1. For all other types, causes an assertion failure.
      Overrides:
      getRows in class Type
    • getComponents

      public int getComponents()
      Description copied from class: Type
      For type that contains scalars, returns the number of scalars. For all other types, causes an assertion failure.
      Overrides:
      getComponents in class Type
    • getMinValue

      public double getMinValue()
      Description copied from class: Type
      Returns the minimum value that can fit in the type.
      Overrides:
      getMinValue in class Type
    • getMaxValue

      public double getMaxValue()
      Description copied from class: Type
      Returns the maximum value that can fit in the type.
      Overrides:
      getMaxValue in class Type