matrixmul

    0.9.3 • Public • Published

    matrix

    矩阵相乘

    install

    npm install matrixmul

    同样可以用于前端,改写下就行。

    use

    var matrix=require("matrixmul")
            var m1=new matrix({
                data:[
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                ]
            })
            var m2=new matrix({
                data:[
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
                    [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
                ]
            })
         console.log(m2.mul(m1))
        

    Keywords

    none

    Install

    npm i matrixmul

    DownloadsWeekly Downloads

    0

    Version

    0.9.3

    License

    none

    Last publish

    Collaborators

    • yutou_cn