Search Results for

    Show / Hide Table of Contents

    Class Array2D<T>

    Generic array operations that can be done on arrays of any type, for operators specific to numerical arrays(matrices) see Matrix.cs

    Inheritance
    object
    Array2D<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TimeSeriesAnalysis
    Assembly: TimeSeriesAnalysis.dll
    Syntax
    public class Array2D<T>
    Type Parameters
    Name Description
    T

    Methods

    | Edit this page View Source

    Append(T[][], T[])

    Combine two arrays into a single array(increasing the number of rows)

    Declaration
    public static T[][] Append(T[][] array1, T[] vector)
    Parameters
    Type Name Description
    T[][] array1
    T[] vector

    a vector

    Returns
    Type Description
    T[][]

    null if unsuccessful

    | Edit this page View Source

    Combine(T[][], T[][])

    Combine two arrays into a single array(increasing the number of rows)

    Declaration
    public static T[][] Combine(T[][] array1, T[][] array2)
    Parameters
    Type Name Description
    T[][] array1
    T[][] array2
    Returns
    Type Description
    T[][]

    null if unsuccessful

    | Edit this page View Source

    Create(T[])

    Create 2d-array with only a single column

    Declaration
    public static T[,] Create(T[] columnArray)
    Parameters
    Type Name Description
    T[] columnArray
    Returns
    Type Description
    T[,]
    | Edit this page View Source

    CreateFromList(List<T[]>)

    Initializes a 2D array from a list of arrays representing each column in the array

    Declaration
    public static T[,] CreateFromList(List<T[]> columnList)
    Parameters
    Type Name Description
    List<T[]> columnList
    Returns
    Type Description
    T[,]

    null if list columnList dimensions do not match

    | Edit this page View Source

    CreateJaggedFrom2D(T[,])

    Convert a 2D array into a jagged array

    Declaration
    public static T[][] CreateJaggedFrom2D(T[,] matrix)
    Parameters
    Type Name Description
    T[,] matrix
    Returns
    Type Description
    T[][]
    | Edit this page View Source

    CreateJaggedFromList(List<T[]>, List<int>)

    Convert a list of 1D arrays to a jagged array

    Declaration
    public static T[][] CreateJaggedFromList(List<T[]> listOfArrays, List<int> indicesToIgnore = null)
    Parameters
    Type Name Description
    List<T[]> listOfArrays
    List<int> indicesToIgnore

    optionally, indices in each variable to ignore

    Returns
    Type Description
    T[][]

    null if unsuccessful

    | Edit this page View Source

    Created2DFromJagged(T[][])

    Convert a jagged array to a 2d-array

    Declaration
    public static T[,] Created2DFromJagged(T[][] matrix)
    Parameters
    Type Name Description
    T[][] matrix
    Returns
    Type Description
    T[,]
    | Edit this page View Source

    Downsample(T[,], double, int)

    Downsample a matrix where times are rows and variables are columns

    Declaration
    public static T[,] Downsample(T[,] matrix, double downsampleFactor, int keyindex = 0)
    Parameters
    Type Name Description
    T[,] matrix
    double downsampleFactor
    int keyindex
    Returns
    Type Description
    T[,]
    | Edit this page View Source

    GetColumn(T[,], int)

    returns the column of the matrix with the given index

    Declaration
    public static T[] GetColumn(T[,] matrix, int columnNumber)
    Parameters
    Type Name Description
    T[,] matrix
    int columnNumber
    Returns
    Type Description
    T[]
    | Edit this page View Source

    GetColumn(T[][], int)

    returns the column of the matrix with the given index

    Declaration
    public static T[] GetColumn(T[][] matrix, int columnNumber)
    Parameters
    Type Name Description
    T[][] matrix
    int columnNumber
    Returns
    Type Description
    T[]
    | Edit this page View Source

    GetColumns(T[,], int[])

    returns all the columns correspoding to columnNumbers in a 2d-array

    Declaration
    public static T[,] GetColumns(T[,] matrix, int[] columnNumbers = null)
    Parameters
    Type Name Description
    T[,] matrix
    int[] columnNumbers
    Returns
    Type Description
    T[,]
    | Edit this page View Source

    GetRow(T[,], int)

    returns the row of the matrix with the given index as an vector

    Declaration
    public static T[] GetRow(T[,] matrix, int rowNumber)
    Parameters
    Type Name Description
    T[,] matrix
    int rowNumber
    Returns
    Type Description
    T[]
    | Edit this page View Source

    Transpose(T[,])

    transposes a 2d-array (rows are turned into columns and vice versa)

    Declaration
    public static T[,] Transpose(T[,] matrix)
    Parameters
    Type Name Description
    T[,] matrix
    Returns
    Type Description
    T[,]
    • Edit this page
    • View Source
    In this article
    • Methods
      • Append(T[][], T[])
      • Combine(T[][], T[][])
      • Create(T[])
      • CreateFromList(List<T[]>)
      • CreateJaggedFrom2D(T[,])
      • CreateJaggedFromList(List<T[]>, List<int>)
      • Created2DFromJagged(T[][])
      • Downsample(T[,], double, int)
      • GetColumn(T[,], int)
      • GetColumn(T[][], int)
      • GetColumns(T[,], int[])
      • GetRow(T[,], int)
      • Transpose(T[,])
    Back to top Generated by DocFX