Array Functions - Math


The functions below perform statistical calculations on a lua table containing numeric values but no string values, string keys, or sub-tables. This type of table is called an array, or indexed array, since the elements may be accessed by their index, as in x[5]. Many of these functions also work with an argument list consisting of numbers and pixel data of a CImage object.

Also see Array Functions - Array Ops and Array Functions - Statistics.

Array Functions for Math

add

Adds a number to the members of a 1-dimensional array, CImage object, a single number.

div

Divides a number into the members of a 1-dimensional array, CImage object, or single number.

dot

Returns the dot product of two class objects or 1-dimensional arrays of numbers.

mul

Multiples each member of a 1-dimensional array, CImage object, or a number, by a specified number.

norm

Normalizes the numbers of a 1-dimensional array, CImage or CArray object, so their sum is 1.0.

sub

Subtracts a number from the members of a 1-dimensional array or number.

sum

Returns the sum of a 1-dimensional array or list of numbers.

Related Topics

Contents

Array Functions

Array Functions - Array Ops

Array Functions - Statistics.

Table and Array Functions

Table Functions

CArray Class

CStats Class

CImage Class

CHistogram class


Mira Pro x64 Script User's Guide, v.8.80 Copyright Ⓒ 2025 Mirametrics, Inc. All Rights Reserved.