Table of Contents

Class Array2DExtensionMethods

Namespace
TimeSeriesAnalysis
Assembly
TimeSeriesAnalysis.dll

Extension methods based on Array2D

public static class Array2DExtensionMethods
Inheritance
Array2DExtensionMethods
Inherited Members

Methods

Convert2DtoJagged(double[,])

Converts a 2d-array to a jagged array

public static double[][] Convert2DtoJagged(this double[,] matrix)

Parameters

matrix double[,]

Returns

double[][]

GetColumn(double[,], int)

returns the column of a 2d-array of doubles corresponding to columnIndex (starts at zero)

public static double[] GetColumn(this double[,] matrix, int columnIndex)

Parameters

matrix double[,]
columnIndex int

Returns

double[]

GetColumn(string[,], int)

returns the column of a 2d-array of strings corresponding to columnIndex (starts at zero)

public static string[] GetColumn(this string[,] matrix, int columnIndex)

Parameters

matrix string[,]
columnIndex int

Returns

string[]

GetColumnParsedAsDateTime(string[,], int, string)

Parses a column in a 2d-array and returns the results as a vector of date-times.

public static DateTime[] GetColumnParsedAsDateTime(this string[,] matrix, int columnNumber, string dateFormat)

Parameters

matrix string[,]
columnNumber int
dateFormat string

Returns

DateTime[]

GetColumns(double[,], int[])

Returns the columns corresponding to columnNumbers as a 2d-array

public static double[,] GetColumns(this double[,] matrix, int[] columnNumbers)

Parameters

matrix double[,]
columnNumbers int[]

Returns

double[,]

GetNColumns(double[,])

Return the number of columns of a 2d-matrix

public static int GetNColumns(this double[,] matrix)

Parameters

matrix double[,]

Returns

int

GetNColumns(double[][])

Get number of columns

public static int GetNColumns(this double[][] matrix)

Parameters

matrix double[][]

Returns

int

GetNRows(double[,])

Return the number of rows of a 2d-matrix

public static int GetNRows(this double[,] matrix)

Parameters

matrix double[,]

Returns

int

GetNRows(double[][])

Get nubmer of rows

public static int GetNRows(this double[][] matrix)

Parameters

matrix double[][]

Returns

int

GetRow(double[,], int)

returns the row of a 2d-array of doubles corresponding to rowNumber (starts at zero)

public static double[] GetRow(this double[,] matrix, int rowNumber)

Parameters

matrix double[,]
rowNumber int

Returns

double[]

GetRow(string[,], int)

returns the row of a 2d-array of strings corresponding to rowNumber (starts at zero)

public static string[] GetRow(this string[,] matrix, int rowNumber)

Parameters

matrix string[,]
rowNumber int

Returns

string[]

GetRowsAfterIndex(DateTime[], int)

Returns rows starting with rowIndex and onwards

public static DateTime[] GetRowsAfterIndex(this DateTime[] array, int rowIndex)

Parameters

array DateTime[]
rowIndex int

Returns

DateTime[]

GetRowsAfterIndex(double[,], int)

Returns rows starting with rowIndex and onwards

public static double[,] GetRowsAfterIndex(this double[,] array, int rowIndex)

Parameters

array double[,]
rowIndex int

Returns

double[,]

GetRowsAfterIndex(double[], int)

Returns rows starting with rowIndex and onwards

public static double[] GetRowsAfterIndex(this double[] array, int rowIndex)

Parameters

array double[]
rowIndex int

Returns

double[]

Transpose(double[,])

Transposes a 2d-matrix.

public static double[,] Transpose(this double[,] matrix)

Parameters

matrix double[,]

Returns

double[,]

WriteColumn(double[,], int, double[])

overwrites the column in matrix with the new column newColumnValues

public static double[,] WriteColumn(this double[,] matrix, int colIdx, double[] newColumnValues)

Parameters

matrix double[,]
colIdx int
newColumnValues double[]

Returns

double[,]