Table of Contents

Class VecExtensionMethods

Namespace
TimeSeriesAnalysis
Assembly
TimeSeriesAnalysis.dll

Utility functions and operations for treating arrays as mathetmatical vectors

public static class VecExtensionMethods
Inheritance
VecExtensionMethods
Inherited Members

Methods

Add(double[], double, double)

Add a scalar to vector

public static double[] Add(this double[] array, double scalar, double nanValue = -9999)

Parameters

array double[]
scalar double
nanValue double

Returns

double[]

Add(double[], double[], double)

Add a vector to vector

public static double[] Add(this double[] array, double[] vectorToAdd, double nanValue = -9999)

Parameters

array double[]
vectorToAdd double[]
nanValue double

Returns

double[]

Mult(double[], double, double)

Multiply vector by a scalar

public static double[] Mult(this double[] array, double scalar, double nanValue = -9999)

Parameters

array double[]
scalar double
nanValue double

Returns

double[]

Sub(double[], double[], double)

Elementwise subtraction of two arrays of same size

public static double[] Sub(this double[] array1, double[] array2, double nanValue = -9999)

Parameters

array1 double[]
array2 double[]
nanValue double

Returns

double[]

SubArray(double[], int, int)

Returns the portion of array1 starting and indStart, and ending at indEnd(or at the end if third paramter is omitted)

public static double[] SubArray(this double[] array1, int indStart, int indEnd = -9999)

Parameters

array1 double[]

array to get subarray from

indStart int

starting index

indEnd int

ending index(or to the end if omitted)

Returns

double[]

null if indStart and indEnd are the same, otherwise the subarray

ToString(double[], int, string)

Create a compact string of vector with a certain number of significant digits and a chosen divider

public static string ToString(this double[] array, int nSignificantDigits, string dividerStr = ";")

Parameters

array double[]
nSignificantDigits int
dividerStr string

Returns

string