matrix#
- swordfish.function.matrix()#
Generate a matrix.
- Parameters:
dataType (Constant) – The data type of the matrix. Data types other than INT128, UUID, IPADDR, POINT and DURATION are supported.
rows (Constant) – The number of rows.
cols (Constant) – The number of cols.
columnsCapacity (Constant) – The amount of memory (in terms of the number of columns) allocated to the matrix. When the number of columns exceeds columnsCapacity, the system will first allocate memory of 1.2~2 times of capacity, copy the data to the new memory space, and release the original memory.
defaultValue (Constant) – The default value for the elements of the matrix. Without specifying defaultValue, all elements in the matrix are 0s for integers/doubles and null values for symbols.