npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mmatrix

v2.0.5

Published

MMatrix class is used for processing matrix and creating different mathematical operations like summtions and subtractions

Readme

MMatrix

MMatrix (class for creating and processing matrix)

var Matrix=require("mmatrix");

var matrix = new Matrix(3, 5);

//CopyRowFromArray test console.log("%cMatrix after using CopyRowFromArray Test", "color:red;font-weight:bold;"); matrix.CopyRowFromArray(0, 1, 2, 3, 4, 5); matrix.CopyRowFromArray(1, 3, 7, 6, 8, 4); matrix.CopyRowFromArray(2, 2, 99, 9, 10, 4); console.log(matrix.toString());

//AddElement test console.log("%cSame previous Matrix after using AddElement Test", "color:red;font-weight:bold;"); matrix.AddElement(0, 0, 3); console.log(matrix.toString());

// Copy from another test using CopyFromAnother console.log("%cCopy previous Matrix with CopyFromAnother Test", "color:red;font-weight:bold;"); var copyMatrix = new Matrix(matrix.RowsLen, matrix.ColumnsLen); copyMatrix.CopyFromAnother(matrix); console.log(copyMatrix.toString());

// Copy from another test using CopyColumnFromArray console.log("%cPrevious Matrix with CopyColumnFromArray Test", "color:red;font-weight:bold;"); copyMatrix.CopyColumnFromArray(1, 44, 55, 66); console.log(copyMatrix.toString());

//GetColumnSum Test console.log("%cGetColumnSum Test", "color:red;font-weight:bold;"); console.log(Sum of elements in first column in previous matrix is ${copyMatrix.GetColumnSum(0)});

//GetRowsum Test console.log("%cGetRowsum Test", "color:red;font-weight:bold;"); console.log(Sum of elements in first row in previous matrix is ${copyMatrix.GetRowsum(0)});

//GetCopy Test console.log("%cMatrix with GetCopy Test", "color:red;font-weight:bold;"); console.log(This is a copy of previous matrix \n${copyMatrix.GetCopy()});

//GetCopyOfColumn Test console.log("%cMatrix with GetCopyOfColumn Test", "color:red;font-weight:bold;"); console.log(This is the first column of previous matrix \n${copyMatrix.GetCopyOfColumn(0)});

//GetCopyOfRow Test console.log("%cMatrix with GetCopyOfRow Test", "color:red;font-weight:bold;"); console.log(This is the second row of previous matrix \n${copyMatrix.GetCopyOfRow(1)});

//MultiplyRowBy Test console.log("%cMatrix with Multiply Test", "color:red;font-weight:bold;"); console.log(This is result of multply previous matrix by itself \n${copyMatrix.Multiply(copyMatrix)});

//MultiplyRowBy Test console.log("%cMatrix with MultiplyRowBy Test", "color:red;font-weight:bold;"); copyMatrix.MultiplyRowBy(1, 2); console.log(This is result of multply second row with 2 \n${copyMatrix});

//MultiplyColumnBy Test console.log("%cMatrix with MultiplyColumnBy Test", "color:red;font-weight:bold;"); copyMatrix.MultiplyColumnBy(1, 2); console.log(This is result of multply second column with 2 \n${copyMatrix});