ml-matrix-convolution

1.0.0 • Public • Published

ml-matrix-convolution

NPM version build status Test coverage npm download

Matrix convolution.

Installation

npm i ml-matrix-convolution
const MatrixConvolution = require('ml-matrix-convolution');

let matrix = [
  [1, 1, 1, 1, 1],
  [1, 1, 1, 1, 1],
  [1, 1, 1, 1, 1],
  [1, 1, 1, 1, 1],
  [1, 1, 1, 1, 1],
];

let kernel = [
  [1, 1, 1],
  [1, 1, 1],
  [1, 1, 1],
];

let conv1 = MatrixConvolution.direct(matrix, kernel);

let conv2 = MatrixConvolution.fft(matrix, kerne11);

console.log({ conv1, conv2 }); // both should be equal

License

MIT

Package Sidebar

Install

npm i ml-matrix-convolution

Weekly Downloads

13,921

Version

1.0.0

License

MIT

Unpacked Size

16.7 kB

Total Files

12

Last publish

Collaborators

  • stropitek
  • targos
  • lpatiny
  • mljs-bot
  • cheminfo-bot
  • andcastillo