<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          VectoriousJavaScript 多維數(shù)組庫

          聯(lián)合創(chuàng)作 · 2023-09-22 08:09

          Vectorious 是一個 JavaScript 庫用來操作 N 維數(shù)組和向量。支持 Node.js 和瀏覽器。

          示例代碼:

          var vectorious = require('vectorious');
          
          var vector,
              matrix;
          
          vector = new vectorious.Vector();
          // { values: [], length: 0 }
          
          matrix = new vectorious.Matrix();
          // { rows: [] }
          
          vector = new vectorious.Vector().zeros(5);
          // { values: [0, 0, 0, 0, 0], length: 5 }
          
          vector = new vectorious.Vector(1, 2, 3, 4, 5);
          // { values: [1, 2, 3, 4, 5], length: 5 }
          
          matrix = new vectorious.Matrix(vector);
          // { rows: [ { values: [1, 2, 3, 4, 5], length: 5 } ] }
          
          matrix = new vectorious.Matrix().zeros(2, 2);
          /* {
            rows: [
              { values: [0, 0], length: 2 },
              { values: [0, 0], length: 2 }
            ]
          } */
          
          var input = [
            [1, 2],
            [3, 4]
          ];
          
          matrix = new vectorious.Matrix(input);
          /* {
            rows: [
              { values: [1, 2], length: 2 },
              { values: [3, 4], length: 2 }
            ]
          } */
          瀏覽 19
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  久久新视频 | 人妻夜夜爽天天爽4区 | 日本三级在线观看中文字串 | 久久AV免费观看 | 欧洲成人性爱视频 |