Skip to content

Latest commit

 

History

History
66 lines (34 loc) · 928 Bytes

File metadata and controls

66 lines (34 loc) · 928 Bytes

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

MatrixBuilder.pascalSymmetric() method

Constructs a symmetric matrix whose entries are the binomial coefficients (i + j choose i)

Signature:

pascalSymmetric(size: number): M;

Parameters

Parameter

Type

Description

size

number

The size of the Pascal matrix

Returns:

M

Example

const pascalSymmetric = matrixBuilder.pascalSymmetric(4);

// [ 1  1  1  1  ]
// [ 1  2  3  4  ]
// [ 1  3  6  10 ]
// [ 1  4  10 20 ]