Search Results for

    Show / Hide Table of Contents

    Struct ConstantVector

    A vector which has a constant value between its start and end indices.

    Implements
    IComparable
    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Math
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [DataContract]
    public struct ConstantVector : IComparable

    Constructors

    ConstantVector(Int32, Int32, Double)

    Constructor

    Declaration
    [Construction(new string[]{"Start", "End", "Value"})]
    public ConstantVector(int start, int end, double value)
    Parameters
    Type Name Description
    Int32 start
    Int32 end
    Double value

    Properties

    Count

    The number of elements in this vector

    Declaration
    public readonly int Count { get; }
    Property Value
    Type Description
    Int32

    End

    The end index

    Declaration
    [DataMember]
    public int End { get; set; }
    Property Value
    Type Description
    Int32

    Start

    The start index

    Declaration
    [DataMember]
    public int Start { get; set; }
    Property Value
    Type Description
    Int32

    Value

    The value of the vector

    Declaration
    [DataMember]
    public double Value { get; set; }
    Property Value
    Type Description
    Double

    Methods

    CompareTo(Object)

    Compares this constant vector to another one.

    Declaration
    public int CompareTo(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Int32

    Contains(Int32)

    True if the index lies inside this vector.

    Declaration
    public bool Contains(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    Boolean

    ToString()

    String representation of this constant vector.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    ToString(String, Func<Int32, String>)

    String representation of this constant vector using the supplied value format and function for converting ints to strings.

    Declaration
    public string ToString(string format, Func<int, string> intToString)
    Parameters
    Type Name Description
    String format
    Func<Int32, String> intToString
    Returns
    Type Description
    String

    Implements

    System.IComparable
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.