Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 940 Bytes

vector.matrixbuilder.fromcolumnvectors.md

File metadata and controls

39 lines (23 loc) · 940 Bytes

Home > @josh-brown/vector > MatrixBuilder > fromColumnVectors

MatrixBuilder.fromColumnVectors() method

Builds a matrix from an array of column vectors

Signature:

fromColumnVectors(columns: Vector<S>[]): M;

Parameters

Parameter Type Description
columns Vector<S>[] The vectors to use as the columns of the new matrix

Returns:

M

Example

const firstColumn = vectorBuilder.fromArray([ 1, 2, 3 ]);
const secondColumn = vectorBuilder.fromArray([ 4, 5, 6 ]);

const matrix = matrixBuilder.fromColumnVectors([ firstColumn, secondColumn ]);

// [ 1 4 ]
// [ 2 5 ]
// [ 3 6 ]