Table of Contents

Class Index

Namespace
TimeSeriesAnalysis
Assembly
TimeSeriesAnalysis.dll

Class with utility-methods for working with indices (vectors of integers)

There are some special features of indices: they should never be negative, and indices vectors are often monotonically increasing.

public class Index
Inheritance
Index
Inherited Members

Methods

Add(int[], int)

Element-wise addition of val2 to array1

public static int[] Add(int[] array1, int val2)

Parameters

array1 int[]
val2 int

Returns

int[]

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 necessary, to append the trailing indices

public static List<int> AppendTrailingIndices(List<int> indicesArray)

Parameters

indicesArray List<int>

Returns

List<int>

InverseIndices(int, List<int>)

given a list of sorted indices and a desired vector size N, returns the indices that are not in "sortedIndices" i.e. of the "other vectors

public static List<int> InverseIndices(int N, List<int> sortedIndices)

Parameters

N int
sortedIndices List<int>

Returns

List<int>

MakeIndexArray(int, int)

creates a monotonically increasing integer (11.12.13...) array starting at startValue and ending at endValue

public static int[] MakeIndexArray(int startValue, int endValue)

Parameters

startValue int
endValue int

Returns

int[]

Max(int[], int)

Returns element-wise maximum of array element and value

public static int[] Max(int[] array, int value)

Parameters

array int[]
value int

Returns

int[]

Remove(int[], List<int>)

Removes certain indices from the array

public static int[] Remove(int[] array, List<int> indicesToRemove)

Parameters

array int[]
indicesToRemove List<int>

Returns

int[]

Shift(int[], int)

Shifts the indices 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

public static int[] Shift(int[] inArray, int shiftByIndex)

Parameters

inArray int[]
shiftByIndex int

Returns

int[]

Subtract(int[], int)

subtracts val2 from array2 elements

public static int[] Subtract(int[] array1, int val2)

Parameters

array1 int[]
val2 int

Returns

int[]

Union(List<int>, List<int>)

returns the union of array1 and array2, a list of elements that are in either vector

public static List<int> Union(List<int> vec1, List<int> vec2)

Parameters

vec1 List<int>
vec2 List<int>

Returns

List<int>