Struct SymbolicTensorDim
Represents a single dimension of a SymbolicTensorShape
.
Syntax
[Serializable]
public struct SymbolicTensorDim
Constructors
SymbolicTensorDim(Char)
Initializes and returns an instance of SymbolicTensorDim
of dynamic type, with a character value. The character value maps to a string in the Model
class.
Declaration
public SymbolicTensorDim(char param)
Parameters
Type |
Name |
Description |
Char |
param |
|
SymbolicTensorDim(Int32)
Initializes and returns an instance of SymbolicTensorDim
of fixed type, with an integer value.
Declaration
public SymbolicTensorDim(int value)
Parameters
Type |
Name |
Description |
Int32 |
value |
|
Properties
isParam
Whether the dimension is dynamic. If the value is true
, you can use .param
to return the value as a character.
Declaration
public readonly bool isParam { get; }
Property Value
isValue
Whether the dimension is fixed. If the value is true
, you can use .value
to return the value.
Declaration
public readonly bool isValue { get; }
Property Value
param
The value of the dimension. You can only call this method if .isParam
is true.
Declaration
public readonly char param { get; }
Property Value
value
The value of the dimension. You can only call this method if .isValue
is true.
Declaration
public readonly int value { get; }
Property Value
Methods
Equals(Object)
Determines whether the specified object is equal to the current SymbolicTensorDim
.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Returns a string that represents the SymbolicTensorDim
.
Declaration
public override string ToString()
Returns
Overrides
Operators
Addition(Int32, SymbolicTensorDim)
Adds a SymbolicTensorDim
to an int
.
Declaration
public static SymbolicTensorDim operator +(int a, SymbolicTensorDim b)
Parameters
Returns
Addition(SymbolicTensorDim, Int32)
Adds an int
to a SymbolicTensorDim
.
Declaration
public static SymbolicTensorDim operator +(SymbolicTensorDim a, int b)
Parameters
Returns
Addition(SymbolicTensorDim, SymbolicTensorDim)
Adds two SymbolicTensorDim
dimensions.
Declaration
public static SymbolicTensorDim operator +(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
Division(Int32, SymbolicTensorDim)
Divides an int
by a SymbolicTensorDim
a whole number of times. The method throws an error if the result has a remainder.
Declaration
public static SymbolicTensorDim operator /(int a, SymbolicTensorDim b)
Parameters
Returns
Division(SymbolicTensorDim, Int32)
Divides a SymbolicTensorDim
by an int
a whole number of times. The method throws an error if the result has a remainder.
Declaration
public static SymbolicTensorDim operator /(SymbolicTensorDim a, int b)
Parameters
Returns
Division(SymbolicTensorDim, SymbolicTensorDim)
Divides two SymbolicTensorDim
dimensions a whole number of times. The method throws an error if the result has a remainder.
Declaration
public static SymbolicTensorDim operator /(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
Equality(SymbolicTensorDim, SymbolicTensorDim)
Declaration
public static bool operator ==(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
Inequality(SymbolicTensorDim, SymbolicTensorDim)
Declaration
public static bool operator !=(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
Multiply(Int32, SymbolicTensorDim)
Multiplies an int
by a SymbolicTensorDim
.
Declaration
public static SymbolicTensorDim operator *(int a, SymbolicTensorDim b)
Parameters
Returns
Multiply(SymbolicTensorDim, Int32)
Multiplies a SymbolicTensorDim
by an int
.
Declaration
public static SymbolicTensorDim operator *(SymbolicTensorDim a, int b)
Parameters
Returns
Multiply(SymbolicTensorDim, SymbolicTensorDim)
Multiplies two SymbolicTensorDim
dimensions.
Declaration
public static SymbolicTensorDim operator *(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
Subtraction(Int32, SymbolicTensorDim)
Subtracts a SymbolicTensorDim
from an int
.
Declaration
public static SymbolicTensorDim operator -(int a, SymbolicTensorDim b)
Parameters
Returns
Subtraction(SymbolicTensorDim, Int32)
Subtracts an int
from a SymbolicTensorDim
.
Declaration
public static SymbolicTensorDim operator -(SymbolicTensorDim a, int b)
Parameters
Returns
Subtraction(SymbolicTensorDim, SymbolicTensorDim)
Subtracts a SymbolicTensorDim
from another SymbolicTensorDim
.
Declaration
public static SymbolicTensorDim operator -(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns