docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SymbolicTensorDim

    Represents a single dimension of a SymbolicTensorShape.

    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Sentis
    Assembly: Unity.Sentis.dll
    Syntax
    [Serializable]
    public struct SymbolicTensorDim

    Properties

    isParam

    Whether the dimension is dynamic. If the value is true, you can use .param to return the value as a byte.

    Declaration
    public bool isParam { get; }
    Property Value
    Type Description
    bool

    isValue

    Whether the dimension is fixed. If the value is true, you can use .value to return the value.

    Declaration
    public bool isValue { get; }
    Property Value
    Type Description
    bool

    param

    The value of the dimension. You can only call this method if .isParam is true.

    Declaration
    public byte param { get; }
    Property Value
    Type Description
    byte

    value

    The value of the dimension. You can only call this method if .isValue is true.

    Declaration
    public int value { get; }
    Property Value
    Type Description
    int

    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

    The object to compare against.

    Returns
    Type Description
    bool

    Whether the object is equal to the current SymbolicTensorDim.

    Overrides
    ValueType.Equals(object)

    EqualsParam(SymbolicTensorDim)

    Whether the current 'SymbolicTensorDim' is 'DimType.Param' and is equal to the specified dim.

    Declaration
    public bool EqualsParam(SymbolicTensorDim other)
    Parameters
    Type Name Description
    SymbolicTensorDim other

    The 'SymbolicTensorDim' to compare against.

    Returns
    Type Description
    bool

    Whether the other SymbolicTensorDim is is a param and is equal to the current SymbolicTensorDim.

    EqualsValue(SymbolicTensorDim)

    Whether the current 'SymbolicTensorDim' is 'DimType.Value' and is equal to the specified dim.

    Declaration
    public bool EqualsValue(SymbolicTensorDim other)
    Parameters
    Type Name Description
    SymbolicTensorDim other

    The 'SymbolicTensorDim' to compare against.

    Returns
    Type Description
    bool

    Whether the other SymbolicTensorDim is is a value and is equal to the current SymbolicTensorDim.

    GCD(SymbolicTensorDim, SymbolicTensorDim)

    Calculates the greatest common divisor of two SymbolicTensorDim objects.

    Declaration
    public static SymbolicTensorDim GCD(SymbolicTensorDim a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The first SymbolicTensorDim.

    SymbolicTensorDim b

    The second SymbolicTensorDim.

    Returns
    Type Description
    SymbolicTensorDim

    The greatest common divisor of the SymbolicTensorDim objects.

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The calculated hash code.

    Overrides
    ValueType.GetHashCode()

    Int(int)

    Initializes and returns an instance of SymbolicTensorDim of fixed type, with an integer value.

    Declaration
    public static SymbolicTensorDim Int(int value)
    Parameters
    Type Name Description
    int value

    The size of the dim.

    Returns
    Type Description
    SymbolicTensorDim

    The symbolic tensor dim.

    Param(byte)

    Initializes and returns an instance of SymbolicTensorDim of dynamic type, with a byte value.

    Declaration
    public static SymbolicTensorDim Param(byte param)
    Parameters
    Type Name Description
    byte param

    The byte value dynamic parameter.

    Returns
    Type Description
    SymbolicTensorDim

    The symbolic tensor dim.

    ToString()

    Returns a string that represents the SymbolicTensorDim.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string representation of the SymbolicTensorDim.

    Overrides
    ValueType.ToString()
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the dim type is not implemented.

    Operators

    operator +(int, SymbolicTensorDim)

    Adds a SymbolicTensorDim to an int.

    Declaration
    public static SymbolicTensorDim operator +(int a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    int a

    The LHS integer of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the add operation.

    operator +(SymbolicTensorDim, int)

    Adds an int to a SymbolicTensorDim.

    Declaration
    public static SymbolicTensorDim operator +(SymbolicTensorDim a, int b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    int b

    The RHS integer of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the add operation.

    operator +(SymbolicTensorDim, SymbolicTensorDim)

    Adds two SymbolicTensorDim objects.

    Declaration
    public static SymbolicTensorDim operator +(SymbolicTensorDim a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the add operation.

    operator /(int, 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
    Type Name Description
    int a

    The LHS integer of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the divide operation.

    operator /(SymbolicTensorDim, int)

    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
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    int b

    The RHS integer of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the divide operation.

    operator /(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
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the divide operation.

    operator ==(int, SymbolicTensorDim)

    Determines whether a 'SymbolicTensorDim' is equal to a value.

    Declaration
    public static bool operator ==(int a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    int a

    The integer value to compare.

    SymbolicTensorDim b

    The 'SymbolicTensorDim' to compare.

    Returns
    Type Description
    bool

    Whether the 'SymbolicTensorDim' object is equal to the value.

    operator ==(SymbolicTensorDim, int)

    Determines whether a 'SymbolicTensorDim' is equal to a value.

    Declaration
    public static bool operator ==(SymbolicTensorDim a, int b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The 'SymbolicTensorDim' to compare.

    int b

    The integer value to compare.

    Returns
    Type Description
    bool

    Whether the 'SymbolicTensorDim' object is equal to the value.

    operator ==(SymbolicTensorDim, SymbolicTensorDim)

    Determines whether two 'SymbolicTensorDim' objects are equal.

    Declaration
    public static bool operator ==(SymbolicTensorDim a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The first 'SymbolicTensorDim' to compare.

    SymbolicTensorDim b

    The second 'SymbolicTensorDim' to compare.

    Returns
    Type Description
    bool

    Whether the two 'SymbolicTensorDim' objects are equal.

    operator >(SymbolicTensorDim, int)

    Whether a SymbolicTensorDim is known to be greater than than a given integer value.

    Declaration
    public static bool operator >(SymbolicTensorDim d, int v)
    Parameters
    Type Name Description
    SymbolicTensorDim d

    The SymbolicTensorDim to compare.

    int v

    The integer value to compare.

    Returns
    Type Description
    bool

    The result of the comparison

    operator >=(SymbolicTensorDim, int)

    Whether a SymbolicTensorDim is known to be greater than or equal to than a given integer value.

    Declaration
    public static bool operator >=(SymbolicTensorDim d, int v)
    Parameters
    Type Name Description
    SymbolicTensorDim d

    The SymbolicTensorDim to compare.

    int v

    The integer value to compare.

    Returns
    Type Description
    bool

    The result of the comparison

    operator !=(int, SymbolicTensorDim)

    Determines whether a 'SymbolicTensorDim' is not equal to a value.

    Declaration
    public static bool operator !=(int a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    int a

    The integer value to compare.

    SymbolicTensorDim b

    The 'SymbolicTensorDim' to compare.

    Returns
    Type Description
    bool

    Whether the 'SymbolicTensorDim' object is not equal to the value.

    operator !=(SymbolicTensorDim, int)

    Determines whether a 'SymbolicTensorDim' is not equal to a value.

    Declaration
    public static bool operator !=(SymbolicTensorDim a, int b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The 'SymbolicTensorDim' to compare.

    int b

    The integer value to compare.

    Returns
    Type Description
    bool

    Whether the 'SymbolicTensorDim' object is not equal to the value.

    operator !=(SymbolicTensorDim, SymbolicTensorDim)

    Determines whether two 'SymbolicTensorDim' objects are not equal.

    Declaration
    public static bool operator !=(SymbolicTensorDim a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The first 'SymbolicTensorDim' to compare.

    SymbolicTensorDim b

    The second 'SymbolicTensorDim' to compare.

    Returns
    Type Description
    bool

    Whether the two 'SymbolicTensorDim' objects are not equal.

    operator <(SymbolicTensorDim, int)

    Whether a SymbolicTensorDim is known to be less than a given integer value.

    Declaration
    public static bool operator <(SymbolicTensorDim d, int v)
    Parameters
    Type Name Description
    SymbolicTensorDim d

    The SymbolicTensorDim to compare.

    int v

    The integer value to compare.

    Returns
    Type Description
    bool

    The result of the comparison

    operator <=(SymbolicTensorDim, int)

    Whether a SymbolicTensorDim is known to be less than or equal to than a given integer value.

    Declaration
    public static bool operator <=(SymbolicTensorDim d, int v)
    Parameters
    Type Name Description
    SymbolicTensorDim d

    The SymbolicTensorDim to compare.

    int v

    The integer value to compare.

    Returns
    Type Description
    bool

    The result of the comparison

    operator *(int, SymbolicTensorDim)

    Multiplies an int by a SymbolicTensorDim.

    Declaration
    public static SymbolicTensorDim operator *(int a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    int a

    The LHS integer of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the multiply operation.

    operator *(SymbolicTensorDim, int)

    Multiplies a SymbolicTensorDim by an int.

    Declaration
    public static SymbolicTensorDim operator *(SymbolicTensorDim a, int b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    int b

    The RHS integer of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the multiply operation.

    operator *(SymbolicTensorDim, SymbolicTensorDim)

    Multiplies two SymbolicTensorDim dimensions.

    Declaration
    public static SymbolicTensorDim operator *(SymbolicTensorDim a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the multiply operation.

    operator -(int, SymbolicTensorDim)

    Subtracts a SymbolicTensorDim from an int.

    Declaration
    public static SymbolicTensorDim operator -(int a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    int a

    The LHS integer of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the subtract operation.

    operator -(SymbolicTensorDim, int)

    Subtracts an int from a SymbolicTensorDim.

    Declaration
    public static SymbolicTensorDim operator -(SymbolicTensorDim a, int b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    int b

    The RHS integer of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the subtract operation.

    operator -(SymbolicTensorDim, SymbolicTensorDim)

    Subtracts a SymbolicTensorDim from another SymbolicTensorDim.

    Declaration
    public static SymbolicTensorDim operator -(SymbolicTensorDim a, SymbolicTensorDim b)
    Parameters
    Type Name Description
    SymbolicTensorDim a

    The LHS 'SymbolicTensorDim' of the operation.

    SymbolicTensorDim b

    The RHS 'SymbolicTensorDim' of the operation.

    Returns
    Type Description
    SymbolicTensorDim

    The result of the subtract operation.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)