You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Create a dense matrix from vectors as individual rows. If you pass column vectors, they will be transposed (but not conjugated!)
1333
+
* @param rows - a multi-dimensional number array or matrix
1334
+
*/
1335
+
matrixFromRows(...rows: Matrix[]): Matrix
1336
+
matrixFromRows<TextendsMathScalarType>(
1337
+
...rows: (T[]|[T][]|Matrix)[]
1338
+
): T[][]
1339
+
1340
+
/**
1341
+
* Create a dense matrix from vectors as individual columns. If you pass row vectors, they will be transposed (but not conjugated!)
1342
+
* @param cols - a multi-dimensional number array or matrix
1343
+
*/
1344
+
matrixFromColumns(...cols: Matrix[]): Matrix
1345
+
matrixFromColumns<TextendsMathScalarType>(
1346
+
...cols: (T[]|[T][]|Matrix)[]
1347
+
): T[][]
1348
+
/**
1349
+
* Create a matrix by evaluating a generating function at each index. The simplest overload returns a multi-dimensional array as long as size is an array. Passing size as a Matrix or specifying a format will result in returning a Matrix.
1350
+
* @param size - the size of the matrix to be created
1351
+
* @param fn - Callback function invoked for every entry in the matrix
1352
+
* @param format - The Matrix storage format, either 'dense' or 'sparse'
1353
+
* @param datatype - Type of the values
1354
+
*/
1355
+
matrixFromFunction<TextendsMathScalarType>(
1356
+
size: [number],
1357
+
fn: MatrixFromFunctionCallback<T>
1358
+
): T[]
1359
+
matrixFromFunction<TextendsMathScalarType>(
1360
+
size: [number,number],
1361
+
fn: MatrixFromFunctionCallback<T>
1362
+
): T[][]
1363
+
matrixFromFunction<TextendsMathScalarType>(
1364
+
size: number[],
1365
+
fn: MatrixFromFunctionCallback<T>
1366
+
): MathArray<T>
1367
+
matrixFromFunction(
1368
+
size: Matrix<number>,
1369
+
fn: MatrixFromFunctionCallback<MathScalarType>
1370
+
): Matrix
1371
+
matrixFromFunction(
1372
+
size: number[]|Matrix<number>,
1373
+
fn: MatrixFromFunctionCallback<MathScalarType>,
1374
+
format: MatrixStorageFormat,
1375
+
datatype?: string
1376
+
): Matrix
1377
+
matrixFromFunction(
1378
+
size: number[]|Matrix<number>,
1379
+
format: MatrixStorageFormat,
1380
+
fn: MatrixFromFunctionCallback<MathScalarType>,
1381
+
datatype?: string
1382
+
): Matrix
1325
1383
/**
1326
1384
* Calculate the least common multiple for two or more values or arrays.
1327
1385
* lcm is defined as: lcm(a, b) = abs(a * b) / gcd(a, b) For matrices,
0 commit comments