Class Index
Class with utility-methods forr working with indices (vectors of integers)
There are some special features of indices: they should never be negative,
and indice vectors are often monotonically increasing.
Assembly: TimeSeriesAnalysis.dll
Syntax
Methods
|
Edit this page
View Source
Add(int[], int)
elementwise addition of val2 to array1
Declaration
public static int[] Add(int[] array1, int val2)
Parameters
Type |
Name |
Description |
int[] |
array1 |
|
int |
val2 |
|
Returns
|
Edit this page
View Source
AppendTrailingIndices(List<int>)
When filtering out bad data before identification of
difference equations that depend both y[k] and y[k-1]
it will some times be neccessary, to append the trailing indices
Declaration
public static List<int> AppendTrailingIndices(List<int> indiceArray)
Parameters
Type |
Name |
Description |
List<int> |
indiceArray |
|
Returns
|
Edit this page
View Source
InverseIndices(int, List<int>)
given a list of sorted indeces and a desired vector size N, returns the indices that are not in "sortedIndices"
i.e. of the "other vectors
Declaration
public static List<int> InverseIndices(int N, List<int> sortedIndices)
Parameters
Type |
Name |
Description |
int |
N |
|
List<int> |
sortedIndices |
|
Returns
|
Edit this page
View Source
MakeIndexArray(int, int)
creates a monotonically increasing integer (11.12.13...) array starting at startValue and ending at endValue
Declaration
public static int[] MakeIndexArray(int startValue, int endValue)
Parameters
Type |
Name |
Description |
int |
startValue |
|
int |
endValue |
|
Returns
|
Edit this page
View Source
Max(int[], int)
Returns element-wise maximum of array element and value
Declaration
public static int[] Max(int[] array, int value)
Parameters
Type |
Name |
Description |
int[] |
array |
|
int |
value |
|
Returns
|
Edit this page
View Source
Remove(int[], List<int>)
Removes ceratin indices from the array
Declaration
public static int[] Remove(int[] array, List<int> indicesToRemove)
Parameters
Type |
Name |
Description |
int[] |
array |
|
List<int> |
indicesToRemove |
|
Returns
|
Edit this page
View Source
Shift(int[], int)
Shifts the indice array by an integer, (positive or negative value)
Note that the return index array by will not have negative indices, so returned array may be smaller in dimension that input
Declaration
public static int[] Shift(int[] inArray, int shiftByIndex)
Parameters
Type |
Name |
Description |
int[] |
inArray |
|
int |
shiftByIndex |
|
Returns
|
Edit this page
View Source
Subtract(int[], int)
subtracts val2 from array2 elements
Declaration
public static int[] Subtract(int[] array1, int val2)
Parameters
Type |
Name |
Description |
int[] |
array1 |
|
int |
val2 |
|
Returns
|
Edit this page
View Source
Union(List<int>, List<int>)
returns the union of array1 and array2, a list of elements that are in either vector
Declaration
public static List<int> Union(List<int> vec1, List<int> vec2)
Parameters
Returns