Array

Array

The namespace for all UF/Array utility functions, typically for static methods.

Source:

Members

(static) invertMatrix :function

Source:
Type:
  • function

(static) solveMatrices :function

Source:
Type:
  • function

Methods

(static) LUDecompositionMatrix(arg0_matrix) → {Object}

Performs LUD decomposition on a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

Returns:
Type:
Object

(static) QRDecompositionMatrix(arg0_matrix) → {Object}

Performs QR decomposition on a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>
Returns:
Type:
Object

(static) QRLeastSquaredMatrix(arg0_matrix, arg1_matrix) → {Array.<number>}

Performs QR least squared on two matrices.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>
arg1_matrix Array.<Array.<number>>
Returns:
Type:
Array.<number>

(static) SORMatrix(arg0_matrix, arg1_b_vectors, arg2_omegaopt, arg3_optionsopt) → {Array.<number>}

Performs successive over-relaxation (SOR) for a given matrix and target b_vectors.

Source:
Parameters:
Name Type Attributes Default Description
arg0_matrix Array.<Array.<number>>
arg1_b_vectors Array.<Array.<number>>
arg2_omega number <optional>
1
arg3_options Object <optional>
Name Type Attributes Default Description
max_iterations number <optional>
1000
tolerance number <optional>
1e-10
Returns:
Type:
Array.<number>

(static) absoluteValue(arg0_array, arg1_optionsopt) → {Array.<number>}

Performs an absolute value operation on every valid element in an array, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>
arg1_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) absoluteValueArrays(arg0_array, arg1_array, arg2_optionsopt) → {Array.<number>}

Absolute value the distance between two arrays, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The array to perform absolute distances on.

arg1_array Array.<number>

The second array with which to compare distances.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) add(arg0_array, arg1_number, arg2_optionsopt) → {Array.<number>}

Performs an addition operation on every valid element in an array, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The array to pass to the function.

arg1_number number

The value to add to the array.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) addArrays(arg0_array, arg1_array, arg2_optionsopt) → {Array.<number>}

Adds two arrays together recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The first array to add to.

arg1_array Array.<number>

The second array to add with.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) addMatrices(arg0_matrix, arg1_matrix) → {Array.<Array.<number>>}

Adds 2 matrices represented as 2D arrays together.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The first matrix to add.

arg1_matrix Array.<Array.<number>>

The second matrix to add.

Returns:
Type:
Array.<Array.<number>>

(static) append(arg0_array, arg1_array) → {Array.<Array.<any>>}

Concatenates two arrays and returns it.

Source:
Parameters:
Name Type Description
arg0_array Array.<Array.<any>>
arg1_array Array.<Array.<any>>
Returns:
Type:
Array.<Array.<any>>

(static) appendDataframes(arg0_dataframe, arg1_dataframe, arg2_optionsopt) → {Array.<Array.<any>>}

Appends two dataframes to one another.

Source:
Parameters:
Name Type Attributes Description
arg0_dataframe Array.<Array.<any>>

The dataframe to input into the function.

arg1_dataframe Array.<Array.<any>>

The dataframe to append.

arg2_options Object <optional>
Name Type Attributes Description
default_value any <optional>

Optional. What the default variable should be.

Returns:
Type:
Array.<Array.<any>>

(static) augmentMatrices(arg0_matrix, arg1_matrix) → {Array.<Array.<any>>}

Combine the columns of two matrices to form a new matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<any>>

The first matrix to augment on.

arg1_matrix Array.<Array.<any>>

The second matrix to augment with.

Returns:
Type:
Array.<Array.<any>>

(static) choleskyDecompositionMatrix(arg0_matrix) → {Array.<Array.<any>>}

Performs a Cholesky decomposition on a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<any>>

The matrix to pass to the function.

Returns:
Type:
Array.<Array.<any>>

(static) convertDataframeToObject(arg0_dataframe) → {Array.<any>}

Converts a dataframe to an object.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>

The dataframe to convert to an object

Returns:
Type:
Array.<any>

(static) convertObjectToDataframe(arg0_dataframe_obj) → {Array.<Array.<any>>}

Converts a given object to a dataframe.

Source:
Parameters:
Name Type Description
arg0_dataframe_obj Object

The object to convert into a dataframe.

Returns:
Type:
Array.<Array.<any>>

(static) create(arg0_optionsopt) → {Array.<any>}

Creates an array from the following options.

Source:
Parameters:
Name Type Attributes Description
arg0_options Object <optional>
Name Type Attributes Description
domain Array.<number> <optional>

Creates an integer array between [min, max].

linear_sequence Array.<number> <optional>

Generates a linear sequence from linear_sequence[0] to linear_sequence[1] in steps of linear_sequence[2].

number | Array.<string>

Generates a sequenced array according to a mathematical equation. [0]: Mathematical equation as a string literal. The current iteration when generating the sequence is referred to as 'n'. [1]: The total number of iterations to repeat the sequence for.

Array.<any>

Repeats an array x times.

Array.<any>

Repeats each element of an array x times.

Returns:
Type:
Array.<any>

(static) cubicSplineInterpolation(arg0_x_values, arg1_y_values, arg2_x_to_interpolate) → {number}

Cubic spline interpolates a given X position, assuming that points to be interpolated are along the X-axis.

Source:
Parameters:
Name Type Description
arg0_x_values Array.<number>

Extant X values with data.

arg1_y_values Array.<number>

Y values corresponding to X values.

arg2_x_to_interpolate number | string

The X value to interpolate for.

Returns:
Type:
number

(static) dimensionality(arg0_input_array, arg1_dimension_array) → {Array.<Array.<any>>}

Formats an array with n dimensions with zero-indexed dimensionality.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
arg1_dimension_array Array.<number>

An array providing the dimensions of the current array (what to break it down into), starting with the Y dimension.

Returns:
Type:
Array.<Array.<any>>

(static) divide(arg0_array, arg1_number, arg2_optionsopt) → {Array.<number>}

Performs a division operation on every valid element in an array, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The array to pass to the function.

arg1_number Array.<number>

The value to divide by.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) divideArrays(arg0_array, arg1_array, arg2_optionsopt) → {Array.<number>}

Divides two arrays together recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The base array.

arg1_array Array.<number>

The divisor array.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) exponentiate(arg0_array, arg1_number, arg2_optionsopt) → {Array.<number>}

Performs an exponent operation on every valid element in an array, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The array to pass to the function.

arg1_number number

The value to exponentiate by.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) exponentiateArrays(arg0_array, arg1_array, arg2_optionsopt) → {Array.<number>}

Exponentiates two arrays recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>
arg1_array Array.<number>
arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) findClosestPointInDomain(arg0_input_array, arg1_value) → {number}

Finds the closest point in a domain for a given value.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<number>
arg1_value number
Returns:
Type:
number

(static) findDomain(arg0_input_array, arg1_value) → {Array.<number>}

Finds the closest valid domain in an array for a given value.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<number>
arg1_value number

The value to find the closest valid domain for.

Returns:
Type:
Array.<number>

(static) flatten(arg0_input_array) → {Array.<any>}

Flattens a nested array to be 1-deep.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
Returns:
Type:
Array.<any>

(static) fromSpreadsheetCell(arg0_cell_string) → {Array.<number>}

Converts a spreadsheet cell string (e.g. 'A1', 'ZZ15') into 1-based coordinates.

Source:
Parameters:
Name Type Description
arg0_cell_string string
Returns:
Type:
Array.<number>

(static) gaussEliminationMatrix(arg0_matrix) → {Array.<Array.<number>>}

Performs Gauss elimination on a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

Returns:
Type:
Array.<Array.<number>>

(static) gaussJacobMatrix(arg0_matrix) → {Array.<number>}

Performs Gauss-Jordan on a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

Returns:
Type:
Array.<number>

(static) gaussJacobiMatrix(arg0_matrix, arg1_toleranceopt, arg2_max_iterationsopt) → {Array.<Array.<number>>}

Performs Gauss-Jacobi on a matrix.

Source:
Parameters:
Name Type Attributes Default Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

arg1_tolerance number <optional>
1e-6

The level of accuracy to tolerate.

arg2_max_iterations number <optional>
1000

The number of max iterations.

Returns:
Type:
Array.<Array.<number>>

(static) gaussSeidelMatrix(arg0_matrix, arg1_toleranceopt, arg2_max_iterationsopt) → {Array.<Array.<number>>}

Performs Gauss-Seidel on a matrix.

Source:
Parameters:
Name Type Attributes Default Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

arg1_tolerance number <optional>
1e-6

The level of accuracy to tolerate.

arg2_max_iterations number <optional>
1000

The number of max iterations.

Returns:
Type:
Array.<Array.<number>>

(static) getAverage(arg0_array) → {number}

Returns the mean of an array.

Source:
Parameters:
Name Type Description
arg0_array Array.<number>

The input array.

Returns:
Type:
number

(static) getCardinality(arg0_variable) → {number}

Fetches the cardinality of an array/object/variable.

Source:
Parameters:
Name Type Description
arg0_variable any
Returns:
Type:
number

(static) getClosest(arg0_array, arg1_value) → {number|null}

Finds the closest number in an array to a given target value.

Source:
Parameters:
Name Type Description
arg0_array Array.<number>
arg1_value number
Returns:
Type:
number | null

(static) getClosestInDomain(arg0_domain_array, arg1_value) → {number}

Finds the closest point in a domain for a given value.

Source:
Parameters:
Name Type Description
arg0_domain_array Array.<number>

The array to search.

arg1_value number

The value to find the closest point for.

Returns:
Type:
number

(static) getCofactor(arg0_matrix, arg1_row, arg2_column) → {Array.<Array.<number>>}

Fetches the cofactor in a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

arg1_row number

The row to calculate cofactor for.

arg2_column number

The column to calculate cofactor for.

Returns:
Type:
Array.<Array.<number>>

(static) getColumns(arg0_dataframe) → {number}

Fetches the number of columns in a given dataframe.

Source:
Parameters:
Name Type Description
arg0_dataframe Object

The dataframe to pass to the function.

Returns:
Type:
number

(static) getDimensions(arg0_dataframe) → {Array.<number>}

Returns the number of columns and rows.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>
Returns:
Type:
Array.<number>

(static) getElements(arg0_array, arg1_optionsopt) → {Array.<any>}

Fetches array elements that fulfil the following criteria and returns it as an array. If an element being compared to is not of a valid type to the comparison (e.g. .greater option on an object), the element will be returned as-is in the new array.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<any>

The array to pass to the function.

arg1_options <optional>
Name Type Attributes Default Description
cardinality number <optional>

Elements in array must have a length of this.

cardinality_geq number <optional>

Elements in array must have a length greater to or equal to this number.

cardinality_greater number <optional>

Elements in array must have a length greater than this number.

cardinality_leq number <optional>

Elements in array must have a length less than this number.

cardinality_less_than number <optional>

Elements in array mus thave a length less than or equal to this number.

eq number <optional>

Elements in returned array are equal to this number.

geq number <optional>

Elements in returned array must be greater to or equal than this number.

greater number <optional>

Elements in returned array must be greater than this number.

in_array Array.<any> <optional>

Fetches elements that are also included in this set.

in_set Array.<any> <optional>

Fetches elements that are also included in this set.

indexes Array.<number> <optional>

Fetches the following indexes.

not_indexes Array.<number> <optional>

Compares only indexes not mentioned in this array.

leq number <optional>

Elements in returned array must be less than or equal to this number.

less number <optional>

Elements in returned array must be less than this number.

not_range Array.<number> <optional>

Returns array values within this range. Has an array length of 2.

range Array.<number> <optional>

Returns array values within this range.

recursive boolean <optional>
false

Whether the array is recursive.

Returns:
Type:
Array.<any>

(static) getFilledDomain(arg0_min, arg1_max) → {Array.<number>}

Returns a filled domain range between [min, max].

Source:
Parameters:
Name Type Description
arg0_min number
arg1_max number
Returns:
Type:
Array.<number>

(static) getHeader(arg0_dataframe) → {boolean}

Checks whether a dataframe has a true header.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

Returns:
Type:
boolean

(static) getMatrixDeterminant(arg0_matrix) → {number}

Calculates the matrix determinant.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

Returns:
Type:
number

(static) getMaximum(arg0_array, arg1_max_value) → {number}

Returns the maximum value within an array.

Source:
Parameters:
Name Type Description
arg0_array Array.<any>
arg1_max_value number
Returns:
Type:
number

(static) getMidpoint(arg0_array) → {number}

Returns the midpoint of an array.

Source:
Parameters:
Name Type Description
arg0_array Array.<number>
Returns:
Type:
number

(static) getMinimum(arg0_array, arg1_min_value) → {number}

Returns the maximum value within an array.

Source:
Parameters:
Name Type Description
arg0_array Array.<any>
arg1_min_value number
Returns:
Type:
number

(static) getRecursiveCardinality(arg0_input_array) → {number}

Fetches the total number of elements in an array, including subarrays.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
Returns:
Type:
number

(static) getRows(arg0_dataframe) → {number}

Fetches the number of rows in a dataframe.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

Returns:
Type:
number

(static) getSubstringElements(arg0_array, arg1_string, arg2_optionsopt) → {Array.<string>}

Recursively fetches the element of an array containing a substring.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<any>

The array to pass to the function.

arg1_string string

The substring to search array elements for.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true

Whether to traverse recursively.

Returns:
Type:
Array.<string>

(static) householderTransformationMatrix(arg0_matrix) → {any}

Performs Householder transformation on a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

Returns:
Type:
any

(static) indexesOf(arg0_array, arg1_index_array, arg2_optionsopt) → {Array.<any>}

Returns the indexes of an array of strings.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<any>
arg1_index_array Array.<number>
arg2_options Object <optional>
Name Type Attributes Default Description
return_values boolean <optional>
false

Optional. Whether to return array values instead of indices.

Returns:
Type:
Array.<any>

(static) inverseMatrix(arg0_matrix) → {Array.<Array.<number>>}

Inverts a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The matrix to pass to the function.

Returns:
Type:
Array.<Array.<number>>

(static) isEmpty(arg0_input_array) → {boolean}

Checks whether an array is empty.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
Returns:
Type:
boolean

(static) isType(arg0_array, arg1_type) → {boolean}

Whether an array is purely of a given type.

Source:
Parameters:
Name Type Description
arg0_array Array.<Array.<any>>

The array to pass to the function.

arg1_type string

The typeof to compare to.

Returns:
Type:
boolean

(static) lagrangeInterpolation(arg0_x_values, arg1_y_values, arg2_x_to_interpolate) → {number}

Performs Lagrange interpolation for a given X-value in a data series.

Source:
Parameters:
Name Type Description
arg0_x_values Array.<number>
arg1_y_values Array.<number>
arg2_x_to_interpolate number
Returns:
Type:
number

(static) linearInterpolation(arg0_x_values, arg1_y_values, arg2_x_to_interpolate) → {any|number}

Performs linear interpolation for a given X-value in a data series.

Source:
Parameters:
Name Type Description
arg0_x_values Array.<number>
arg1_y_values Array.<number>
arg2_x_to_interpolate number | string
Returns:
Type:
any | number

(static) mergeArrays(arg0_input_array, arg1_array) → {Array.<any>}

Concatenates two arrays.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
arg1_array Array.<any>
Returns:
Type:
Array.<any>

(static) mergeDataframes(arg0_dataframe, arg1_dataframe, arg2_optionsopt) → {Array.<Array.<any>>}

Merges two dataframes; with the second dataframe's columns being appended to the first dataframe post-operation. Mathematical operations can be applied here as a system of equations. Dataframes may have different dimensions, non-corresponding values are assumed to be zero or undefined.

Dataframes are a 2D array, typically with a header row.

Source:
Parameters:
Name Type Attributes Description
arg0_dataframe Array.<Array.<any>>

The 1st dataframe to pass to the function.

arg1_dataframe Array.<Array.<any>>

The 2nd dataframe to pass to the function.

arg2_options Object <optional>
Name Type Attributes Description
equation string <optional>

The string literal to use as an equation (e.g. 'i + x*5'). If no equal sign is provided, this applies to every cell, regardless of column. Equations are split by semicolons.
-
As an example, x$D = i$B, replaces the D column of the 2nd dataframe with the B column of the 1st.
- 'i' represents the corresponding element of the first dataframe,
- 'i$Column' represents the selection of a 1st dataframe column named 'Column'.
- 'x' represents the corresponding element of the second dataframe,
- 'x$Column' represents the selection of a 2nd dataframe column named 'Column'.

Returns:
Type:
Array.<Array.<any>>

(static) moveElement(arg0_array, arg1_old_index, arg2_new_index) → {Array}

Moves an element within an array from an old index to a new index.

Source:
Parameters:
Name Type Description
arg0_array Array
arg1_old_index number
arg2_new_index number
Returns:
Type:
Array

(static) multiply(arg0_array, arg1_number, arg2_optionsopt) → {Array.<Array.<number>>}

Performs a multiplication operation on every valid element in an array, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<Array.<number>>

The array to pass to the function.

arg1_number number
arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<Array.<number>>

(static) multiplyMatrices(arg0_matrix, arg1_matrix) → {Array.<Array.<number>>}

Multiplies two matrices.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>
arg1_matrix Array.<Array.<number>>
Returns:
Type:
Array.<Array.<number>>

(static) operate(arg0_array, arg1_equation, arg2_optionsopt) → {Array.<any>}

Applies a mathematical equation to every element of an array, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<any>
arg1_equation string

The string literal to use as an equation.
- 'n' represents the current array element.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true

Whether to recursively operate on the given array.

Returns:
Type:
Array.<any>

(static) operateArrays(arg0_array, arg1_array, arg2_equation, arg3_optionsopt) → {Array.<number>}

Performs an operation when merging two arrays together, recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The first array to pass to operate on.

arg1_array Array.<number>

The second array to pass to operate with.

arg2_equation string

The string literal to use as an equation.
- 'i' represents the corresponding element of the first array,
- 'x' represents the corresponding element of the second array.

arg3_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>
  • The 1st array.

(static) operateDataframes(arg0_dataframe, arg1_dataframe, arg2_optionsopt) → {Object}

Operates on two dataframes by applying an equation string.

Source:
Parameters:
Name Type Attributes Description
arg0_dataframe Array.<Array.<any>>

The 1st dataframe to operate on as i.

arg1_dataframe Array.<Array.<any>>

The 2nd dataframe to operate on as x.

arg2_options Object <optional>
Name Type Attributes Description
equation string <optional>

The string literal to use as an equation (e.g. 'i + x*5'). If no equal sign is provided, this applies to every cell, regardless of column. Equations are split by semicolons.
-
As an example, x$D = i$B, replaces the D column of the 2nd dataframe with the B column of the 1st.
- 'i' represents the corresponding element of the first dataframe,
- 'i$Column' represents the selection of a 1st dataframe column named 'Column'.
- 'x' represents the corresponding element of the second dataframe,
- 'x$Column' represents the selection of a 2nd dataframe column named 'Column'.

Returns:
Type:
Object

(static) reverse(arg0_input_array) → {Array.<any>}

Reverses an input array.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
Returns:
Type:
Array.<any>

(static) root(arg0_array, arg1_number, arg2_optionsopt) → {Array.<number>}

Roots an array recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>
arg1_number number
arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) rootArrays(arg0_array, arg1_array, arg2_optionsopt) → {Array.<number>}

Roots two arrays recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>

The 1st array to pass to the function.

arg1_array Array.<number>

The 2nd array to pass to the function.

arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) selectColumn(arg0_dataframe, arg1_column_name, arg2_optionsopt) → {Array.<any>|boolean|number}

Selects a 2D array column (by header name).

Source:
Parameters:
Name Type Attributes Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

arg1_column_name string

The name of the variable/column to select.

arg2_options Object <optional>
Name Type Attributes Default Description
return_index boolean <optional>
false

Whether to return an index.

Returns:
Type:
Array.<any> | boolean | number

(static) selectRow(arg0_dataframe, arg1_row_index, arg2_optionsopt) → {Array.<any>}

Selects a 2D array row (by header name or index).

Source:
Parameters:
Name Type Attributes Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

arg1_row_index number

The row index to pass to the function.

arg2_options Object <optional>
Name Type Attributes Default Description
exclude_header boolean <optional>
false

Whether to exclude the header.

Returns:
Type:
Array.<any>

(static) setColumn(arg0_dataframe, arg1_column_name, arg2_values) → {Array.<any>}

Sets a 2D array column.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

arg1_column_name string

The name of the variable/column to set.

arg2_values Array.<any>

The list of values to set for this column.

Returns:
Type:
Array.<any>

(static) setHeader(arg0_dataframe, arg1_header_array) → {Array.<Array.<any>>}

Sets the upper header variables.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

arg1_header_array Array.<string>

The names of variables to set on the 0th row.

Returns:
Type:
Array.<Array.<any>>

(static) setRow(arg0_dataframe, arg1_row_index, arg2_values) → {Array.<any>}

Sets a 2D array row.

Source:
Parameters:
Name Type Description
arg0_dataframe Array.<Array.<any>>

The dataframe to pass to the function.

arg1_row_index number

The row index to pass to the function.

arg2_values Array.<any>

The list of values to set for this row.

Returns:
Type:
Array.<any>

(static) shuffle(arg0_input_array) → {Array.<any>}

Performs a Fisher-Yates shuffle on an input array and returns the shuffle.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
Returns:
Type:
Array.<any>

(static) sort(arg0_array, arg1_optionsopt) → {Array.<any>}

Sorts an array. Can be based on subkey values (recursive, e.g. 'population.size').

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<any>
arg1_options Object <optional>
Name Type Attributes Default Description
sort_key string <optional>
""

The sort subkey to specify. Empty (indicating the base index) by default.

mode string <optional>
"descending"

"alphabetical"/"ascending"/"descending".

recursive boolean <optional>
false

Whether the sort is recursive.

Returns:
Type:
Array.<any>

(static) subtract(arg0_array, arg1_number, arg2_optionsopt) → {Array.<number>}

Subtracts from an array recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>
arg1_number number
arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) subtractArrays(arg0_array, arg1_array, arg2_optionsopt) → {Array.<number>}

Subtract two arrays recursively.

Source:
Parameters:
Name Type Attributes Description
arg0_array Array.<number>
arg1_array Array.<number>
arg2_options Object <optional>
Name Type Attributes Default Description
recursive boolean <optional>
true
Returns:
Type:
Array.<number>

(static) subtractMatrices(arg0_matrix, arg1_matrix) → {Array.<Array.<number>>}

Subtracts one matrix from another.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>

The 1st base matrix to subtract from.

arg1_matrix Array.<Array.<number>>

The 2nd matrix to subtract with.

Returns:
Type:
Array.<Array.<number>>

(static) toArray(arg0_value) → {Array.<any>}

Returns a list/Array from a given input value.

Source:
Parameters:
Name Type Description
arg0_value any | Array.<any>
Returns:
Type:
Array.<any>

(static) toObject(arg0_array) → {Object}

Casts an array to object.

Source:
Parameters:
Name Type Description
arg0_array Array
Returns:
Type:
Object

(static) transposeMatrix(arg0_matrix) → {Array.<Array.<number>>}

Transposes a matrix.

Source:
Parameters:
Name Type Description
arg0_matrix Array.<Array.<number>>
Returns:
Type:
Array.<Array.<number>>

(static) truncate(arg0_input_array, arg1_length) → {*}

Truncates an array to a given length.

Source:
Parameters:
Name Type Description
arg0_input_array
arg1_length
Returns:
Type:
*

(static) unique(arg0_input_array) → {Array.<any>}

Removes any duplicate elements from an input array.

Source:
Parameters:
Name Type Description
arg0_input_array Array.<any>
Returns:
Type:
Array.<any>