Package ai.onnxruntime
Enum OnnxSparseTensor.SparseTensorType
- java.lang.Object
-
- java.lang.Enum<OnnxSparseTensor.SparseTensorType>
-
- ai.onnxruntime.OnnxSparseTensor.SparseTensorType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<OnnxSparseTensor.SparseTensorType>
- Enclosing class:
- OnnxSparseTensor
public static enum OnnxSparseTensor.SparseTensorType extends java.lang.Enum<OnnxSparseTensor.SparseTensorType>
The type of the sparse tensor.Should be synchronized with OrtSparseFormat in the C API.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOCK_SPARSE
Block sparse tensor.COO
COO sparse tensor.CSRC
CSR or CSC sparse tensor.UNDEFINED
Undefined sparse tensor.
-
Field Summary
Fields Modifier and Type Field Description int
value
The int value mirroring OrtSparseFormat.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OnnxSparseTensor.SparseTensorType
mapFromInt(int value)
Maps from an int in native land into a SparseTensorType instance.static OnnxSparseTensor.SparseTensorType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static OnnxSparseTensor.SparseTensorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNDEFINED
public static final OnnxSparseTensor.SparseTensorType UNDEFINED
Undefined sparse tensor.
-
COO
public static final OnnxSparseTensor.SparseTensorType COO
COO sparse tensor.
-
CSRC
public static final OnnxSparseTensor.SparseTensorType CSRC
CSR or CSC sparse tensor.
-
BLOCK_SPARSE
public static final OnnxSparseTensor.SparseTensorType BLOCK_SPARSE
Block sparse tensor.
-
-
Method Detail
-
values
public static OnnxSparseTensor.SparseTensorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OnnxSparseTensor.SparseTensorType c : OnnxSparseTensor.SparseTensorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OnnxSparseTensor.SparseTensorType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
mapFromInt
public static OnnxSparseTensor.SparseTensorType mapFromInt(int value)
Maps from an int in native land into a SparseTensorType instance.- Parameters:
value
- The value to lookup.- Returns:
- The enum instance.
-
-