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
EqualsParam(SymbolicTensorDim)
Whether the current 'SymbolicTensorDim' is 'DimType.Param' and is equal to the specified dim.
Declaration
public bool EqualsParam(SymbolicTensorDim other)
Parameters
Returns
EqualsValue(SymbolicTensorDim)
Whether the current 'SymbolicTensorDim' is 'DimType.Value' and is equal to the specified dim.
Declaration
public bool EqualsValue(SymbolicTensorDim other)
Parameters
Returns
GCD(SymbolicTensorDim, SymbolicTensorDim)
Declaration
public static SymbolicTensorDim GCD(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
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(Int32, SymbolicTensorDim)
Declaration
public static bool operator ==(int a, SymbolicTensorDim b)
Parameters
Returns
Equality(SymbolicTensorDim, Int32)
Declaration
public static bool operator ==(SymbolicTensorDim a, int b)
Parameters
Returns
Equality(SymbolicTensorDim, SymbolicTensorDim)
Declaration
public static bool operator ==(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
GreaterThan(SymbolicTensorDim, Int32)
Declaration
public static bool operator>(SymbolicTensorDim d, int v)
Parameters
Returns
GreaterThanOrEqual(SymbolicTensorDim, Int32)
Declaration
public static bool operator >=(SymbolicTensorDim d, int v)
Parameters
Returns
Inequality(Int32, SymbolicTensorDim)
Declaration
public static bool operator !=(int a, SymbolicTensorDim b)
Parameters
Returns
Inequality(SymbolicTensorDim, Int32)
Declaration
public static bool operator !=(SymbolicTensorDim a, int b)
Parameters
Returns
Inequality(SymbolicTensorDim, SymbolicTensorDim)
Declaration
public static bool operator !=(SymbolicTensorDim a, SymbolicTensorDim b)
Parameters
Returns
LessThan(SymbolicTensorDim, Int32)
Declaration
public static bool operator <(SymbolicTensorDim d, int v)
Parameters
Returns
LessThanOrEqual(SymbolicTensorDim, Int32)
Declaration
public static bool operator <=(SymbolicTensorDim d, int v)
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