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
Assembly: TimeSeriesAnalysis.dll
Syntax
Type Parameters
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
|
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
|
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
|
Edit this page
View Source
Downsample(T[,], int)
Downsample a matrix where times are rows and variables are columns
Declaration
public static T[,] Downsample(T[,] matrix, int downsampleFactor)
Parameters
Type |
Name |
Description |
T[,] |
matrix |
|
int |
downsampleFactor |
|
Returns
|
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
|
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
|
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
|
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
|
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