diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 37777948..b1e0b69b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -10,14 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js 14 - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2-beta with: - node-version: 14 - - name: npm install and test - run: | - npm install - npm run eslint + node-version: 14.x + - name: Install dependencies + run: npm install + - name: Run ESLint + run: npm run eslint test: runs-on: ubuntu-latest strategy: @@ -26,10 +25,12 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2-beta with: node-version: ${{ matrix.node-version }} - - name: npm install and test - run: | - npm install - npm run test-coverage + - name: Install dependencies + run: npm install + - name: Run tests + run: npm run test-coverage + - name: Send coverage report to Codecov + uses: codecov/codecov-action@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd09a30a..0b3c68e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,14 +12,14 @@ jobs: - uses: GoogleCloudPlatform/release-please-action@v2.5.3 id: release with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.BOT_TOKEN }} release-type: node package-name: ml-matrix bump-minor-pre-major: Yes - uses: actions/checkout@v2 # These if statements ensure that a publication only occurs when a new release is created if: ${{ steps.release.outputs.release_created }} - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2-beta with: node-version: 14 registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml new file mode 100644 index 00000000..1d7a33c3 --- /dev/null +++ b/.github/workflows/typedoc.yml @@ -0,0 +1,22 @@ +name: Deploy TypeDoc on GitHub pages + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build documentation + uses: zakodium/typedoc-action@v1 + with: + entry: 'matrix.d.ts' + - name: Deploy to GitHub pages + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + BRANCH: gh-pages + FOLDER: docs + CLEAN: true diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css deleted file mode 100644 index 959edd73..00000000 --- a/docs/assets/css/main.css +++ /dev/null @@ -1,2679 +0,0 @@ -/*! normalize.css v1.1.3 | MIT License | git.io/normalize */ -/* ========================================================================== - * * HTML5 display definitions - * * ========================================================================== */ -/** - * * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */ -article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { - display: block; -} - -/** - * * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */ -audio, canvas, video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -/** - * * Prevent modern browsers from displaying `audio` without controls. - * * Remove excess height in iOS 5 devices. */ -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. - * * Known issue: no IE 6 support. */ -[hidden] { - display: none; -} - -/* ========================================================================== - * * Base - * * ========================================================================== */ -/** - * * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using - * * `em` units. - * * 2. Prevent iOS text size adjust after orientation change, without disabling - * * user zoom. */ -html { - font-size: 100%; - /* 1 */ - -ms-text-size-adjust: 100%; - /* 2 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - font-family: sans-serif; -} - -/** - * * Address `font-family` inconsistency between `textarea` and other form - * * elements. */ -button, input, select, textarea { - font-family: sans-serif; -} - -/** - * * Address margins handled incorrectly in IE 6/7. */ -body { - margin: 0; -} - -/* ========================================================================== - * * Links - * * ========================================================================== */ -/** - * * Address `outline` inconsistency between Chrome and other browsers. */ -a:focus { - outline: thin dotted; -} -a:active, a:hover { - outline: 0; -} - -/** - * * Improve readability when focused and also mouse hovered in all browsers. */ -/* ========================================================================== - * * Typography - * * ========================================================================== */ -/** - * * Address font sizes and margins set differently in IE 6/7. - * * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, - * * and Chrome. */ -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -h2 { - font-size: 1.5em; - margin: 0.83em 0; -} - -h3 { - font-size: 1.17em; - margin: 1em 0; -} - -h4, .tsd-index-panel h3 { - font-size: 1em; - margin: 1.33em 0; -} - -h5 { - font-size: 0.83em; - margin: 1.67em 0; -} - -h6 { - font-size: 0.67em; - margin: 2.33em 0; -} - -/** - * * Address styling not present in IE 7/8/9, Safari 5, and Chrome. */ -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */ -b, strong { - font-weight: bold; -} - -blockquote { - margin: 1em 40px; -} - -/** - * * Address styling not present in Safari 5 and Chrome. */ -dfn { - font-style: italic; -} - -/** - * * Address differences between Firefox and other browsers. - * * Known issue: no IE 6/7 normalization. */ -hr { - box-sizing: content-box; - height: 0; -} - -/** - * * Address styling not present in IE 6/7/8/9. */ -mark { - background: #ff0; - color: #000; -} - -/** - * * Address margins set differently in IE 6/7. */ -p, pre { - margin: 1em 0; -} - -/** - * * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */ -code, kbd, pre, samp { - font-family: monospace, serif; - _font-family: "courier new", monospace; - font-size: 1em; -} - -/** - * * Improve readability of pre-formatted text in all browsers. */ -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -/** - * * Address CSS quotes not supported in IE 6/7. */ -q { - quotes: none; -} -q:before, q:after { - content: ""; - content: none; -} - -/** - * * Address `quotes` property not supported in Safari 4. */ -/** - * * Address inconsistent and variable font size in all browsers. */ -small { - font-size: 80%; -} - -/** - * * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ -sub { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* ========================================================================== - * * Lists - * * ========================================================================== */ -/** - * * Address margins set differently in IE 6/7. */ -dl, menu, ol, ul { - margin: 1em 0; -} - -dd { - margin: 0 0 0 40px; -} - -/** - * * Address paddings set differently in IE 6/7. */ -menu, ol, ul { - padding: 0 0 0 40px; -} - -/** - * * Correct list images handled incorrectly in IE 7. */ -nav ul, nav ol { - list-style: none; - list-style-image: none; -} - -/* ========================================================================== - * * Embedded content - * * ========================================================================== */ -/** - * * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. - * * 2. Improve image quality when scaled in IE 7. */ -img { - border: 0; - /* 1 */ - -ms-interpolation-mode: bicubic; -} - -/* 2 */ -/** - * * Correct overflow displayed oddly in IE 9. */ -svg:not(:root) { - overflow: hidden; -} - -/* ========================================================================== - * * Figures - * * ========================================================================== */ -/** - * * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */ -figure, form { - margin: 0; -} - -/* ========================================================================== - * * Forms - * * ========================================================================== */ -/** - * * Correct margin displayed oddly in IE 6/7. */ -/** - * * Define consistent border, margin, and padding. */ -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * * 1. Correct color not being inherited in IE 6/7/8/9. - * * 2. Correct text not wrapping in Firefox 3. - * * 3. Correct alignment displayed oddly in IE 6/7. */ -legend { - border: 0; - /* 1 */ - padding: 0; - white-space: normal; - /* 2 */ - *margin-left: -7px; -} - -/* 3 */ -/** - * * 1. Correct font size not being inherited in all browsers. - * * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, - * * and Chrome. - * * 3. Improve appearance and consistency in all browsers. */ -button, input, select, textarea { - font-size: 100%; - /* 1 */ - margin: 0; - /* 2 */ - vertical-align: baseline; - /* 3 */ - *vertical-align: middle; -} - -/* 3 */ -/** - * * Address Firefox 3+ setting `line-height` on `input` using `!important` in - * * the UA stylesheet. */ -button, input { - line-height: normal; -} - -/** - * * Address inconsistent `text-transform` inheritance for `button` and `select`. - * * All other form control elements do not inherit `text-transform` values. - * * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. - * * Correct `select` style inheritance in Firefox 4+ and Opera. */ -button, select { - text-transform: none; -} - -/** - * * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * * and `video` controls. - * * 2. Correct inability to style clickable `input` types in iOS. - * * 3. Improve usability and consistency of cursor style between image-type - * * `input` and others. - * * 4. Remove inner spacing in IE 7 without affecting normal text inputs. - * * Known issue: inner spacing remains in IE 6. */ -button, html input[type=button] { - -webkit-appearance: button; - /* 2 */ - cursor: pointer; - /* 3 */ - *overflow: visible; -} - -/* 4 */ -input[type=reset], input[type=submit] { - -webkit-appearance: button; - /* 2 */ - cursor: pointer; - /* 3 */ - *overflow: visible; -} - -/* 4 */ -/** - * * Re-set default cursor for disabled elements. */ -button[disabled], html input[disabled] { - cursor: default; -} - -/** - * * 1. Address box sizing set to content-box in IE 8/9. - * * 2. Remove excess padding in IE 8/9. - * * 3. Remove excess padding in IE 7. - * * Known issue: excess padding remains in IE 6. */ -input { - /* 3 */ -} -input[type=checkbox], input[type=radio] { - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 2 */ - *height: 13px; - /* 3 */ - *width: 13px; -} -input[type=search] { - -webkit-appearance: textfield; - /* 1 */ - /* 2 */ - box-sizing: content-box; -} -input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. - * * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome - * * (include `-moz` to future-proof). */ -/** - * * Remove inner padding and search cancel button in Safari 5 and Chrome - * * on OS X. */ -/** - * * Remove inner padding and border in Firefox 3+. */ -button::-moz-focus-inner, input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * * 1. Remove default vertical scrollbar in IE 6/7/8/9. - * * 2. Improve readability and alignment in all browsers. */ -textarea { - overflow: auto; - /* 1 */ - vertical-align: top; -} - -/* 2 */ -/* ========================================================================== - * * Tables - * * ========================================================================== */ -/** - * * Remove most spacing between table cells. */ -table { - border-collapse: collapse; - border-spacing: 0; -} - -/* * - * *Visual Studio-like style based on original C# coloring by Jason Diamond */ -.hljs { - display: inline-block; - padding: 0.5em; - background: white; - color: black; -} - -.hljs-comment, .hljs-annotation, .hljs-template_comment, .diff .hljs-header, .hljs-chunk, .apache .hljs-cbracket { - color: #008000; -} - -.hljs-keyword, .hljs-id, .hljs-built_in, .css .smalltalk .hljs-class, .hljs-winutils, .bash .hljs-variable, .tex .hljs-command, .hljs-request, .hljs-status, .nginx .hljs-title { - color: #00f; -} - -.xml .hljs-tag { - color: #00f; -} -.xml .hljs-tag .hljs-value { - color: #00f; -} - -.hljs-string, .hljs-title, .hljs-parent, .hljs-tag .hljs-value, .hljs-rules .hljs-value { - color: #a31515; -} - -.ruby .hljs-symbol { - color: #a31515; -} -.ruby .hljs-symbol .hljs-string { - color: #a31515; -} - -.hljs-template_tag, .django .hljs-variable, .hljs-addition, .hljs-flow, .hljs-stream, .apache .hljs-tag, .hljs-date, .tex .hljs-formula, .coffeescript .hljs-attribute { - color: #a31515; -} - -.ruby .hljs-string, .hljs-decorator, .hljs-filter .hljs-argument, .hljs-localvars, .hljs-array, .hljs-attr_selector, .hljs-pseudo, .hljs-pi, .hljs-doctype, .hljs-deletion, .hljs-envvar, .hljs-shebang, .hljs-preprocessor, .hljs-pragma, .userType, .apache .hljs-sqbracket, .nginx .hljs-built_in, .tex .hljs-special, .hljs-prompt { - color: #2b91af; -} - -.hljs-phpdoc, .hljs-javadoc, .hljs-xmlDocTag { - color: #808080; -} - -.vhdl .hljs-typename { - font-weight: bold; -} -.vhdl .hljs-string { - color: #666666; -} -.vhdl .hljs-literal { - color: #a31515; -} -.vhdl .hljs-attribute { - color: #00b0e8; -} - -.xml .hljs-attribute { - color: #f00; -} - -ul.tsd-descriptions > li > :first-child, .tsd-panel > :first-child, .col > :first-child, .col-11 > :first-child, .col-10 > :first-child, .col-9 > :first-child, .col-8 > :first-child, .col-7 > :first-child, .col-6 > :first-child, .col-5 > :first-child, .col-4 > :first-child, .col-3 > :first-child, .col-2 > :first-child, .col-1 > :first-child, -ul.tsd-descriptions > li > :first-child > :first-child, -.tsd-panel > :first-child > :first-child, -.col > :first-child > :first-child, -.col-11 > :first-child > :first-child, -.col-10 > :first-child > :first-child, -.col-9 > :first-child > :first-child, -.col-8 > :first-child > :first-child, -.col-7 > :first-child > :first-child, -.col-6 > :first-child > :first-child, -.col-5 > :first-child > :first-child, -.col-4 > :first-child > :first-child, -.col-3 > :first-child > :first-child, -.col-2 > :first-child > :first-child, -.col-1 > :first-child > :first-child, -ul.tsd-descriptions > li > :first-child > :first-child > :first-child, -.tsd-panel > :first-child > :first-child > :first-child, -.col > :first-child > :first-child > :first-child, -.col-11 > :first-child > :first-child > :first-child, -.col-10 > :first-child > :first-child > :first-child, -.col-9 > :first-child > :first-child > :first-child, -.col-8 > :first-child > :first-child > :first-child, -.col-7 > :first-child > :first-child > :first-child, -.col-6 > :first-child > :first-child > :first-child, -.col-5 > :first-child > :first-child > :first-child, -.col-4 > :first-child > :first-child > :first-child, -.col-3 > :first-child > :first-child > :first-child, -.col-2 > :first-child > :first-child > :first-child, -.col-1 > :first-child > :first-child > :first-child { - margin-top: 0; -} -ul.tsd-descriptions > li > :last-child, .tsd-panel > :last-child, .col > :last-child, .col-11 > :last-child, .col-10 > :last-child, .col-9 > :last-child, .col-8 > :last-child, .col-7 > :last-child, .col-6 > :last-child, .col-5 > :last-child, .col-4 > :last-child, .col-3 > :last-child, .col-2 > :last-child, .col-1 > :last-child, -ul.tsd-descriptions > li > :last-child > :last-child, -.tsd-panel > :last-child > :last-child, -.col > :last-child > :last-child, -.col-11 > :last-child > :last-child, -.col-10 > :last-child > :last-child, -.col-9 > :last-child > :last-child, -.col-8 > :last-child > :last-child, -.col-7 > :last-child > :last-child, -.col-6 > :last-child > :last-child, -.col-5 > :last-child > :last-child, -.col-4 > :last-child > :last-child, -.col-3 > :last-child > :last-child, -.col-2 > :last-child > :last-child, -.col-1 > :last-child > :last-child, -ul.tsd-descriptions > li > :last-child > :last-child > :last-child, -.tsd-panel > :last-child > :last-child > :last-child, -.col > :last-child > :last-child > :last-child, -.col-11 > :last-child > :last-child > :last-child, -.col-10 > :last-child > :last-child > :last-child, -.col-9 > :last-child > :last-child > :last-child, -.col-8 > :last-child > :last-child > :last-child, -.col-7 > :last-child > :last-child > :last-child, -.col-6 > :last-child > :last-child > :last-child, -.col-5 > :last-child > :last-child > :last-child, -.col-4 > :last-child > :last-child > :last-child, -.col-3 > :last-child > :last-child > :last-child, -.col-2 > :last-child > :last-child > :last-child, -.col-1 > :last-child > :last-child > :last-child { - margin-bottom: 0; -} - -.container { - max-width: 1200px; - margin: 0 auto; - padding: 0 40px; -} -@media (max-width: 640px) { - .container { - padding: 0 20px; - } -} - -.container-main { - padding-bottom: 200px; -} - -.row { - display: -ms-flexbox; - display: flex; - position: relative; - margin: 0 -10px; -} -.row:after { - visibility: hidden; - display: block; - content: ""; - clear: both; - height: 0; -} - -.col, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { - box-sizing: border-box; - float: left; - padding: 0 10px; -} - -.col-1 { - width: 8.3333333333%; -} - -.offset-1 { - margin-left: 8.3333333333%; -} - -.col-2 { - width: 16.6666666667%; -} - -.offset-2 { - margin-left: 16.6666666667%; -} - -.col-3 { - width: 25%; -} - -.offset-3 { - margin-left: 25%; -} - -.col-4 { - width: 33.3333333333%; -} - -.offset-4 { - margin-left: 33.3333333333%; -} - -.col-5 { - width: 41.6666666667%; -} - -.offset-5 { - margin-left: 41.6666666667%; -} - -.col-6 { - width: 50%; -} - -.offset-6 { - margin-left: 50%; -} - -.col-7 { - width: 58.3333333333%; -} - -.offset-7 { - margin-left: 58.3333333333%; -} - -.col-8 { - width: 66.6666666667%; -} - -.offset-8 { - margin-left: 66.6666666667%; -} - -.col-9 { - width: 75%; -} - -.offset-9 { - margin-left: 75%; -} - -.col-10 { - width: 83.3333333333%; -} - -.offset-10 { - margin-left: 83.3333333333%; -} - -.col-11 { - width: 91.6666666667%; -} - -.offset-11 { - margin-left: 91.6666666667%; -} - -.tsd-kind-icon { - display: block; - position: relative; - padding-left: 20px; - text-indent: -20px; -} -.tsd-kind-icon:before { - content: ""; - display: inline-block; - vertical-align: middle; - width: 17px; - height: 17px; - margin: 0 3px 2px 0; - background-image: url(../images/icons.png); -} -@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { - .tsd-kind-icon:before { - background-image: url(../images/icons@2x.png); - background-size: 238px 204px; - } -} - -.tsd-signature.tsd-kind-icon:before { - background-position: 0 -153px; -} - -.tsd-kind-object-literal > .tsd-kind-icon:before { - background-position: 0px -17px; -} -.tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -17px; -} -.tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -17px; -} - -.tsd-kind-class > .tsd-kind-icon:before { - background-position: 0px -34px; -} -.tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -34px; -} -.tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -34px; -} - -.tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { - background-position: 0px -51px; -} -.tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -51px; -} -.tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -51px; -} - -.tsd-kind-interface > .tsd-kind-icon:before { - background-position: 0px -68px; -} -.tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -68px; -} -.tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -68px; -} - -.tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { - background-position: 0px -85px; -} -.tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -85px; -} -.tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -85px; -} - -.tsd-kind-namespace > .tsd-kind-icon:before { - background-position: 0px -102px; -} -.tsd-kind-namespace.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -102px; -} -.tsd-kind-namespace.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -102px; -} - -.tsd-kind-module > .tsd-kind-icon:before { - background-position: 0px -102px; -} -.tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -102px; -} -.tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -102px; -} - -.tsd-kind-enum > .tsd-kind-icon:before { - background-position: 0px -119px; -} -.tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -119px; -} -.tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -119px; -} - -.tsd-kind-enum-member > .tsd-kind-icon:before { - background-position: 0px -136px; -} -.tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -136px; -} -.tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -136px; -} - -.tsd-kind-signature > .tsd-kind-icon:before { - background-position: 0px -153px; -} -.tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -153px; -} -.tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -153px; -} - -.tsd-kind-type-alias > .tsd-kind-icon:before { - background-position: 0px -170px; -} -.tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -170px; -} -.tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -170px; -} - -.tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before { - background-position: 0px -187px; -} -.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { - background-position: -17px -187px; -} -.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { - background-position: -34px -187px; -} - -.tsd-kind-variable > .tsd-kind-icon:before { - background-position: -136px -0px; -} -.tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -0px; -} -.tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -0px; -} -.tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -0px; -} -.tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -0px; -} -.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -0px; -} -.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -0px; -} -.tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -0px; -} -.tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -0px; -} -.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -0px; -} -.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -0px; -} -.tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -0px; -} -.tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -0px; -} - -.tsd-kind-property > .tsd-kind-icon:before { - background-position: -136px -0px; -} -.tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -0px; -} -.tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -0px; -} -.tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -0px; -} -.tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -0px; -} -.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -0px; -} -.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -0px; -} -.tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -0px; -} -.tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -0px; -} -.tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -0px; -} -.tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -0px; -} -.tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -0px; -} -.tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -0px; -} - -.tsd-kind-get-signature > .tsd-kind-icon:before { - background-position: -136px -17px; -} -.tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -17px; -} -.tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -17px; -} -.tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -17px; -} - -.tsd-kind-set-signature > .tsd-kind-icon:before { - background-position: -136px -34px; -} -.tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -34px; -} -.tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -34px; -} -.tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -34px; -} - -.tsd-kind-accessor > .tsd-kind-icon:before { - background-position: -136px -51px; -} -.tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -51px; -} -.tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -51px; -} -.tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -51px; -} - -.tsd-kind-function > .tsd-kind-icon:before { - background-position: -136px -68px; -} -.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -68px; -} -.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -68px; -} -.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -68px; -} -.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -68px; -} -.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -68px; -} -.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -68px; -} -.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -68px; -} -.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -68px; -} -.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -68px; -} - -.tsd-kind-method > .tsd-kind-icon:before { - background-position: -136px -68px; -} -.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -68px; -} -.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -68px; -} -.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -68px; -} -.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -68px; -} -.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -68px; -} -.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -68px; -} -.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -68px; -} -.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -68px; -} -.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -68px; -} - -.tsd-kind-call-signature > .tsd-kind-icon:before { - background-position: -136px -68px; -} -.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -68px; -} -.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -68px; -} -.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -68px; -} - -.tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { - background-position: -136px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -85px; -} -.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -85px; -} - -.tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { - background-position: -136px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -85px; -} -.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -85px; -} - -.tsd-kind-constructor > .tsd-kind-icon:before { - background-position: -136px -102px; -} -.tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -102px; -} -.tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -102px; -} -.tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -102px; -} - -.tsd-kind-constructor-signature > .tsd-kind-icon:before { - background-position: -136px -102px; -} -.tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -102px; -} -.tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -102px; -} -.tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -102px; -} - -.tsd-kind-index-signature > .tsd-kind-icon:before { - background-position: -136px -119px; -} -.tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -119px; -} -.tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -119px; -} -.tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -119px; -} - -.tsd-kind-event > .tsd-kind-icon:before { - background-position: -136px -136px; -} -.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -136px; -} -.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -136px; -} -.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -136px; -} -.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -136px; -} -.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -136px; -} -.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -136px; -} -.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -136px; -} -.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -136px; -} -.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -136px; -} -.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -136px; -} -.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -136px; -} -.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -136px; -} - -.tsd-is-static > .tsd-kind-icon:before { - background-position: -136px -153px; -} -.tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -153px; -} -.tsd-is-static.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -153px; -} -.tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -153px; -} -.tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -153px; -} -.tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -153px; -} -.tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -153px; -} -.tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -153px; -} -.tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -153px; -} -.tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -153px; -} -.tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -153px; -} -.tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -153px; -} -.tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -153px; -} - -.tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { - background-position: -136px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -170px; -} -.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -170px; -} - -.tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { - background-position: -136px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -170px; -} -.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -170px; -} - -.tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { - background-position: -136px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -170px; -} -.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -170px; -} - -.tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { - background-position: -136px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { - background-position: -153px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { - background-position: -51px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -68px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { - background-position: -85px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -102px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { - background-position: -170px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { - background-position: -187px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { - background-position: -119px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { - background-position: -204px -187px; -} -.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { - background-position: -221px -187px; -} - -@keyframes fade-in { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -@keyframes fade-out { - from { - opacity: 1; - visibility: visible; - } - to { - opacity: 0; - } -} -@keyframes fade-in-delayed { - 0% { - opacity: 0; - } - 33% { - opacity: 0; - } - 100% { - opacity: 1; - } -} -@keyframes fade-out-delayed { - 0% { - opacity: 1; - visibility: visible; - } - 66% { - opacity: 0; - } - 100% { - opacity: 0; - } -} -@keyframes shift-to-left { - from { - transform: translate(0, 0); - } - to { - transform: translate(-25%, 0); - } -} -@keyframes unshift-to-left { - from { - transform: translate(-25%, 0); - } - to { - transform: translate(0, 0); - } -} -@keyframes pop-in-from-right { - from { - transform: translate(100%, 0); - } - to { - transform: translate(0, 0); - } -} -@keyframes pop-out-to-right { - from { - transform: translate(0, 0); - visibility: visible; - } - to { - transform: translate(100%, 0); - } -} -body { - background: #fdfdfd; - font-family: "Segoe UI", sans-serif; - font-size: 16px; - color: #222; -} - -a { - color: #4da6ff; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} - -code, pre { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - padding: 0.2em; - margin: 0; - font-size: 14px; - background-color: rgba(0, 0, 0, 0.04); -} - -pre { - padding: 10px; -} -pre code { - padding: 0; - font-size: 100%; - background-color: transparent; -} - -.tsd-typography { - line-height: 1.333em; -} -.tsd-typography ul { - list-style: square; - padding: 0 0 0 20px; - margin: 0; -} -.tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 { - font-size: 1em; - margin: 0; -} -.tsd-typography h5, .tsd-typography h6 { - font-weight: normal; -} -.tsd-typography p, .tsd-typography ul, .tsd-typography ol { - margin: 1em 0; -} - -@media (min-width: 901px) and (max-width: 1024px) { - html.default .col-content { - width: 72%; - } - html.default .col-menu { - width: 28%; - } - html.default .tsd-navigation { - padding-left: 10px; - } -} -@media (max-width: 900px) { - html.default .col-content { - float: none; - width: 100%; - } - html.default .col-menu { - position: fixed !important; - overflow: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - width: 100%; - padding: 20px 20px 0 0; - max-width: 450px; - visibility: hidden; - background-color: #fff; - transform: translate(100%, 0); - } - html.default .col-menu > *:last-child { - padding-bottom: 20px; - } - html.default .overlay { - content: ""; - display: block; - position: fixed; - z-index: 1023; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.75); - visibility: hidden; - } - html.default.to-has-menu .overlay { - animation: fade-in 0.4s; - } - html.default.to-has-menu header, -html.default.to-has-menu footer, -html.default.to-has-menu .col-content { - animation: shift-to-left 0.4s; - } - html.default.to-has-menu .col-menu { - animation: pop-in-from-right 0.4s; - } - html.default.from-has-menu .overlay { - animation: fade-out 0.4s; - } - html.default.from-has-menu header, -html.default.from-has-menu footer, -html.default.from-has-menu .col-content { - animation: unshift-to-left 0.4s; - } - html.default.from-has-menu .col-menu { - animation: pop-out-to-right 0.4s; - } - html.default.has-menu body { - overflow: hidden; - } - html.default.has-menu .overlay { - visibility: visible; - } - html.default.has-menu header, -html.default.has-menu footer, -html.default.has-menu .col-content { - transform: translate(-25%, 0); - } - html.default.has-menu .col-menu { - visibility: visible; - transform: translate(0, 0); - } -} - -.tsd-page-title { - padding: 70px 0 20px 0; - margin: 0 0 40px 0; - background: #fff; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); -} -.tsd-page-title h1 { - margin: 0; -} - -.tsd-breadcrumb { - margin: 0; - padding: 0; - color: #808080; -} -.tsd-breadcrumb a { - color: #808080; - text-decoration: none; -} -.tsd-breadcrumb a:hover { - text-decoration: underline; -} -.tsd-breadcrumb li { - display: inline; -} -.tsd-breadcrumb li:after { - content: " / "; -} - -html.minimal .container { - margin: 0; -} -html.minimal .container-main { - padding-top: 50px; - padding-bottom: 0; -} -html.minimal .content-wrap { - padding-left: 300px; -} -html.minimal .tsd-navigation { - position: fixed !important; - overflow: auto; - -webkit-overflow-scrolling: touch; - box-sizing: border-box; - z-index: 1; - left: 0; - top: 40px; - bottom: 0; - width: 300px; - padding: 20px; - margin: 0; -} -html.minimal .tsd-member .tsd-member { - margin-left: 0; -} -html.minimal .tsd-page-toolbar { - position: fixed; - z-index: 2; -} -html.minimal #tsd-filter .tsd-filter-group { - right: 0; - transform: none; -} -html.minimal footer { - background-color: transparent; -} -html.minimal footer .container { - padding: 0; -} -html.minimal .tsd-generator { - padding: 0; -} -@media (max-width: 900px) { - html.minimal .tsd-navigation { - display: none; - } - html.minimal .content-wrap { - padding-left: 0; - } -} - -dl.tsd-comment-tags { - overflow: hidden; -} -dl.tsd-comment-tags dt { - float: left; - padding: 1px 5px; - margin: 0 10px 0 0; - border-radius: 4px; - border: 1px solid #808080; - color: #808080; - font-size: 0.8em; - font-weight: normal; -} -dl.tsd-comment-tags dd { - margin: 0 0 10px 0; -} -dl.tsd-comment-tags dd:before, dl.tsd-comment-tags dd:after { - display: table; - content: " "; -} -dl.tsd-comment-tags dd pre, dl.tsd-comment-tags dd:after { - clear: both; -} -dl.tsd-comment-tags p { - margin: 0; -} - -.tsd-panel.tsd-comment .lead { - font-size: 1.1em; - line-height: 1.333em; - margin-bottom: 2em; -} -.tsd-panel.tsd-comment .lead:last-child { - margin-bottom: 0; -} - -.toggle-protected .tsd-is-private { - display: none; -} - -.toggle-public .tsd-is-private, -.toggle-public .tsd-is-protected, -.toggle-public .tsd-is-private-protected { - display: none; -} - -.toggle-inherited .tsd-is-inherited { - display: none; -} - -.toggle-only-exported .tsd-is-not-exported { - display: none; -} - -.toggle-externals .tsd-is-external { - display: none; -} - -#tsd-filter { - position: relative; - display: inline-block; - height: 40px; - vertical-align: bottom; -} -.no-filter #tsd-filter { - display: none; -} -#tsd-filter .tsd-filter-group { - display: inline-block; - height: 40px; - vertical-align: bottom; - white-space: nowrap; -} -#tsd-filter input { - display: none; -} -@media (max-width: 900px) { - #tsd-filter .tsd-filter-group { - display: block; - position: absolute; - top: 40px; - right: 20px; - height: auto; - background-color: #fff; - visibility: hidden; - transform: translate(50%, 0); - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); - } - .has-options #tsd-filter .tsd-filter-group { - visibility: visible; - } - .to-has-options #tsd-filter .tsd-filter-group { - animation: fade-in 0.2s; - } - .from-has-options #tsd-filter .tsd-filter-group { - animation: fade-out 0.2s; - } - #tsd-filter label, -#tsd-filter .tsd-select { - display: block; - padding-right: 20px; - } -} - -footer { - border-top: 1px solid #eee; - background-color: #fff; -} -footer.with-border-bottom { - border-bottom: 1px solid #eee; -} -footer .tsd-legend-group { - font-size: 0; -} -footer .tsd-legend { - display: inline-block; - width: 25%; - padding: 0; - font-size: 16px; - list-style: none; - line-height: 1.333em; - vertical-align: top; -} -@media (max-width: 900px) { - footer .tsd-legend { - width: 50%; - } -} - -.tsd-hierarchy { - list-style: square; - padding: 0 0 0 20px; - margin: 0; -} -.tsd-hierarchy .target { - font-weight: bold; -} - -.tsd-index-panel .tsd-index-content { - margin-bottom: -30px !important; -} -.tsd-index-panel .tsd-index-section { - margin-bottom: 30px !important; -} -.tsd-index-panel h3 { - margin: 0 -20px 10px -20px; - padding: 0 20px 10px 20px; - border-bottom: 1px solid #eee; -} -.tsd-index-panel ul.tsd-index-list { - -moz-column-count: 3; - -ms-column-count: 3; - -o-column-count: 3; - column-count: 3; - -moz-column-gap: 20px; - -ms-column-gap: 20px; - -o-column-gap: 20px; - column-gap: 20px; - padding: 0; - list-style: none; - line-height: 1.333em; -} -@media (max-width: 900px) { - .tsd-index-panel ul.tsd-index-list { - -moz-column-count: 1; - -ms-column-count: 1; - -o-column-count: 1; - column-count: 1; - } -} -@media (min-width: 901px) and (max-width: 1024px) { - .tsd-index-panel ul.tsd-index-list { - -moz-column-count: 2; - -ms-column-count: 2; - -o-column-count: 2; - column-count: 2; - } -} -.tsd-index-panel ul.tsd-index-list li { - -webkit-page-break-inside: avoid; - -moz-page-break-inside: avoid; - -ms-page-break-inside: avoid; - -o-page-break-inside: avoid; - page-break-inside: avoid; -} -.tsd-index-panel a, -.tsd-index-panel .tsd-parent-kind-module a { - color: #9600ff; -} -.tsd-index-panel .tsd-parent-kind-interface a { - color: #7da01f; -} -.tsd-index-panel .tsd-parent-kind-enum a { - color: #cc9900; -} -.tsd-index-panel .tsd-parent-kind-class a { - color: #4da6ff; -} -.tsd-index-panel .tsd-kind-module a { - color: #9600ff; -} -.tsd-index-panel .tsd-kind-interface a { - color: #7da01f; -} -.tsd-index-panel .tsd-kind-enum a { - color: #cc9900; -} -.tsd-index-panel .tsd-kind-class a { - color: #4da6ff; -} -.tsd-index-panel .tsd-is-private a { - color: #808080; -} - -.tsd-flag { - display: inline-block; - padding: 1px 5px; - border-radius: 4px; - color: #fff; - background-color: #808080; - text-indent: 0; - font-size: 14px; - font-weight: normal; -} - -.tsd-anchor { - position: absolute; - top: -100px; -} - -.tsd-member { - position: relative; -} -.tsd-member .tsd-anchor + h3 { - margin-top: 0; - margin-bottom: 0; - border-bottom: none; -} - -.tsd-navigation { - margin: 0 0 0 40px; -} -.tsd-navigation a { - display: block; - padding-top: 2px; - padding-bottom: 2px; - border-left: 2px solid transparent; - color: #222; - text-decoration: none; - transition: border-left-color 0.1s; -} -.tsd-navigation a:hover { - text-decoration: underline; -} -.tsd-navigation ul { - margin: 0; - padding: 0; - list-style: none; -} -.tsd-navigation li { - padding: 0; -} - -.tsd-navigation.primary { - padding-bottom: 40px; -} -.tsd-navigation.primary a { - display: block; - padding-top: 6px; - padding-bottom: 6px; -} -.tsd-navigation.primary ul li a { - padding-left: 5px; -} -.tsd-navigation.primary ul li li a { - padding-left: 25px; -} -.tsd-navigation.primary ul li li li a { - padding-left: 45px; -} -.tsd-navigation.primary ul li li li li a { - padding-left: 65px; -} -.tsd-navigation.primary ul li li li li li a { - padding-left: 85px; -} -.tsd-navigation.primary ul li li li li li li a { - padding-left: 105px; -} -.tsd-navigation.primary > ul { - border-bottom: 1px solid #eee; -} -.tsd-navigation.primary li { - border-top: 1px solid #eee; -} -.tsd-navigation.primary li.current > a { - font-weight: bold; -} -.tsd-navigation.primary li.label span { - display: block; - padding: 20px 0 6px 5px; - color: #808080; -} -.tsd-navigation.primary li.globals + li > span, .tsd-navigation.primary li.globals + li > a { - padding-top: 20px; -} - -.tsd-navigation.secondary { - max-height: calc(100vh - 1rem - 40px); - overflow: auto; - position: -webkit-sticky; - position: sticky; - top: calc(.5rem + 40px); - transition: 0.3s; -} -.tsd-navigation.secondary.tsd-navigation--toolbar-hide { - max-height: calc(100vh - 1rem); - top: 0.5rem; -} -.tsd-navigation.secondary ul { - transition: opacity 0.2s; -} -.tsd-navigation.secondary ul li a { - padding-left: 25px; -} -.tsd-navigation.secondary ul li li a { - padding-left: 45px; -} -.tsd-navigation.secondary ul li li li a { - padding-left: 65px; -} -.tsd-navigation.secondary ul li li li li a { - padding-left: 85px; -} -.tsd-navigation.secondary ul li li li li li a { - padding-left: 105px; -} -.tsd-navigation.secondary ul li li li li li li a { - padding-left: 125px; -} -.tsd-navigation.secondary ul.current a { - border-left-color: #eee; -} -.tsd-navigation.secondary li.focus > a, -.tsd-navigation.secondary ul.current li.focus > a { - border-left-color: #000; -} -.tsd-navigation.secondary li.current { - margin-top: 20px; - margin-bottom: 20px; - border-left-color: #eee; -} -.tsd-navigation.secondary li.current > a { - font-weight: bold; -} - -@media (min-width: 901px) { - .menu-sticky-wrap { - position: static; - } -} - -.tsd-panel { - margin: 20px 0; - padding: 20px; - background-color: #fff; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); -} -.tsd-panel:empty { - display: none; -} -.tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 { - margin: 1.5em -20px 10px -20px; - padding: 0 20px 10px 20px; - border-bottom: 1px solid #eee; -} -.tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature { - margin-bottom: 0; - border-bottom: 0; -} -.tsd-panel table { - display: block; - width: 100%; - overflow: auto; - margin-top: 10px; - word-break: normal; - word-break: keep-all; -} -.tsd-panel table th { - font-weight: bold; -} -.tsd-panel table th, .tsd-panel table td { - padding: 6px 13px; - border: 1px solid #ddd; -} -.tsd-panel table tr { - background-color: #fff; - border-top: 1px solid #ccc; -} -.tsd-panel table tr:nth-child(2n) { - background-color: #f8f8f8; -} - -.tsd-panel-group { - margin: 60px 0; -} -.tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 { - padding-left: 20px; - padding-right: 20px; -} - -#tsd-search { - transition: background-color 0.2s; -} -#tsd-search .title { - position: relative; - z-index: 2; -} -#tsd-search .field { - position: absolute; - left: 0; - top: 0; - right: 40px; - height: 40px; -} -#tsd-search .field input { - box-sizing: border-box; - position: relative; - top: -50px; - z-index: 1; - width: 100%; - padding: 0 10px; - opacity: 0; - outline: 0; - border: 0; - background: transparent; - color: #222; -} -#tsd-search .field label { - position: absolute; - overflow: hidden; - right: -40px; -} -#tsd-search .field input, -#tsd-search .title { - transition: opacity 0.2s; -} -#tsd-search .results { - position: absolute; - visibility: hidden; - top: 40px; - width: 100%; - margin: 0; - padding: 0; - list-style: none; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); -} -#tsd-search .results li { - padding: 0 10px; - background-color: #fdfdfd; -} -#tsd-search .results li:nth-child(even) { - background-color: #fff; -} -#tsd-search .results li.state { - display: none; -} -#tsd-search .results li.current, -#tsd-search .results li:hover { - background-color: #eee; -} -#tsd-search .results a { - display: block; -} -#tsd-search .results a:before { - top: 10px; -} -#tsd-search .results span.parent { - color: #808080; - font-weight: normal; -} -#tsd-search.has-focus { - background-color: #eee; -} -#tsd-search.has-focus .field input { - top: 0; - opacity: 1; -} -#tsd-search.has-focus .title { - z-index: 0; - opacity: 0; -} -#tsd-search.has-focus .results { - visibility: visible; -} -#tsd-search.loading .results li.state.loading { - display: block; -} -#tsd-search.failure .results li.state.failure { - display: block; -} - -.tsd-signature { - margin: 0 0 1em 0; - padding: 10px; - border: 1px solid #eee; - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - font-size: 14px; - overflow-x: auto; -} -.tsd-signature.tsd-kind-icon { - padding-left: 30px; -} -.tsd-signature.tsd-kind-icon:before { - top: 10px; - left: 10px; -} -.tsd-panel > .tsd-signature { - margin-left: -20px; - margin-right: -20px; - border-width: 1px 0; -} -.tsd-panel > .tsd-signature.tsd-kind-icon { - padding-left: 40px; -} -.tsd-panel > .tsd-signature.tsd-kind-icon:before { - left: 20px; -} - -.tsd-signature-symbol { - color: #808080; - font-weight: normal; -} - -.tsd-signature-type { - font-style: italic; - font-weight: normal; -} - -.tsd-signatures { - padding: 0; - margin: 0 0 1em 0; - border: 1px solid #eee; -} -.tsd-signatures .tsd-signature { - margin: 0; - border-width: 1px 0 0 0; - transition: background-color 0.1s; -} -.tsd-signatures .tsd-signature:first-child { - border-top-width: 0; -} -.tsd-signatures .tsd-signature.current { - background-color: #eee; -} -.tsd-signatures.active > .tsd-signature { - cursor: pointer; -} -.tsd-panel > .tsd-signatures { - margin-left: -20px; - margin-right: -20px; - border-width: 1px 0; -} -.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { - padding-left: 40px; -} -.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { - left: 20px; -} -.tsd-panel > a.anchor + .tsd-signatures { - border-top-width: 0; - margin-top: -20px; -} - -ul.tsd-descriptions { - position: relative; - overflow: hidden; - padding: 0; - list-style: none; -} -ul.tsd-descriptions.active > .tsd-description { - display: none; -} -ul.tsd-descriptions.active > .tsd-description.current { - display: block; -} -ul.tsd-descriptions.active > .tsd-description.fade-in { - animation: fade-in-delayed 0.3s; -} -ul.tsd-descriptions.active > .tsd-description.fade-out { - animation: fade-out-delayed 0.3s; - position: absolute; - display: block; - top: 0; - left: 0; - right: 0; - opacity: 0; - visibility: hidden; -} -ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { - font-size: 16px; - margin: 1em 0 0.5em 0; -} - -ul.tsd-parameters, -ul.tsd-type-parameters { - list-style: square; - margin: 0; - padding-left: 20px; -} -ul.tsd-parameters > li.tsd-parameter-signature, -ul.tsd-type-parameters > li.tsd-parameter-signature { - list-style: none; - margin-left: -20px; -} -ul.tsd-parameters h5, -ul.tsd-type-parameters h5 { - font-size: 16px; - margin: 1em 0 0.5em 0; -} -ul.tsd-parameters .tsd-comment, -ul.tsd-type-parameters .tsd-comment { - margin-top: -0.5em; -} - -.tsd-sources { - font-size: 14px; - color: #808080; - margin: 0 0 1em 0; -} -.tsd-sources a { - color: #808080; - text-decoration: underline; -} -.tsd-sources ul, .tsd-sources p { - margin: 0 !important; -} -.tsd-sources ul { - list-style: none; - padding: 0; -} - -.tsd-page-toolbar { - position: fixed; - z-index: 1; - top: 0; - left: 0; - width: 100%; - height: 40px; - color: #333; - background: #fff; - border-bottom: 1px solid #eee; - transition: transform 0.3s linear; -} -.tsd-page-toolbar a { - color: #333; - text-decoration: none; -} -.tsd-page-toolbar a.title { - font-weight: bold; -} -.tsd-page-toolbar a.title:hover { - text-decoration: underline; -} -.tsd-page-toolbar .table-wrap { - display: table; - width: 100%; - height: 40px; -} -.tsd-page-toolbar .table-cell { - display: table-cell; - position: relative; - white-space: nowrap; - line-height: 40px; -} -.tsd-page-toolbar .table-cell:first-child { - width: 100%; -} - -.tsd-page-toolbar--hide { - transform: translateY(-100%); -} - -.tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { - content: ""; - display: inline-block; - width: 40px; - height: 40px; - margin: 0 -8px 0 0; - background-image: url(../images/widgets.png); - background-repeat: no-repeat; - text-indent: -1024px; - vertical-align: bottom; -} -@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { - .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { - background-image: url(../images/widgets@2x.png); - background-size: 320px 40px; - } -} - -.tsd-widget { - display: inline-block; - overflow: hidden; - opacity: 0.6; - height: 40px; - transition: opacity 0.1s, background-color 0.2s; - vertical-align: bottom; - cursor: pointer; -} -.tsd-widget:hover { - opacity: 0.8; -} -.tsd-widget.active { - opacity: 1; - background-color: #eee; -} -.tsd-widget.no-caption { - width: 40px; -} -.tsd-widget.no-caption:before { - margin: 0; -} -.tsd-widget.search:before { - background-position: 0 0; -} -.tsd-widget.menu:before { - background-position: -40px 0; -} -.tsd-widget.options:before { - background-position: -80px 0; -} -.tsd-widget.options, .tsd-widget.menu { - display: none; -} -@media (max-width: 900px) { - .tsd-widget.options, .tsd-widget.menu { - display: inline-block; - } -} -input[type=checkbox] + .tsd-widget:before { - background-position: -120px 0; -} -input[type=checkbox]:checked + .tsd-widget:before { - background-position: -160px 0; -} - -.tsd-select { - position: relative; - display: inline-block; - height: 40px; - transition: opacity 0.1s, background-color 0.2s; - vertical-align: bottom; - cursor: pointer; -} -.tsd-select .tsd-select-label { - opacity: 0.6; - transition: opacity 0.2s; -} -.tsd-select .tsd-select-label:before { - background-position: -240px 0; -} -.tsd-select.active .tsd-select-label { - opacity: 0.8; -} -.tsd-select.active .tsd-select-list { - visibility: visible; - opacity: 1; - transition-delay: 0s; -} -.tsd-select .tsd-select-list { - position: absolute; - visibility: hidden; - top: 40px; - left: 0; - margin: 0; - padding: 0; - opacity: 0; - list-style: none; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); - transition: visibility 0s 0.2s, opacity 0.2s; -} -.tsd-select .tsd-select-list li { - padding: 0 20px 0 0; - background-color: #fdfdfd; -} -.tsd-select .tsd-select-list li:before { - background-position: 40px 0; -} -.tsd-select .tsd-select-list li:nth-child(even) { - background-color: #fff; -} -.tsd-select .tsd-select-list li:hover { - background-color: #eee; -} -.tsd-select .tsd-select-list li.selected:before { - background-position: -200px 0; -} -@media (max-width: 900px) { - .tsd-select .tsd-select-list { - top: 0; - left: auto; - right: 100%; - margin-right: -5px; - } - .tsd-select .tsd-select-label:before { - background-position: -280px 0; - } -} - -img { - max-width: 100%; -} \ No newline at end of file diff --git a/docs/assets/images/icons.png b/docs/assets/images/icons.png deleted file mode 100644 index 3836d5fe..00000000 Binary files a/docs/assets/images/icons.png and /dev/null differ diff --git a/docs/assets/images/icons@2x.png b/docs/assets/images/icons@2x.png deleted file mode 100644 index 5a209e2f..00000000 Binary files a/docs/assets/images/icons@2x.png and /dev/null differ diff --git a/docs/assets/images/widgets.png b/docs/assets/images/widgets.png deleted file mode 100644 index c7380532..00000000 Binary files a/docs/assets/images/widgets.png and /dev/null differ diff --git a/docs/assets/images/widgets@2x.png b/docs/assets/images/widgets@2x.png deleted file mode 100644 index 4bbbd572..00000000 Binary files a/docs/assets/images/widgets@2x.png and /dev/null differ diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js deleted file mode 100644 index 39a80669..00000000 --- a/docs/assets/js/main.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.7",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return null==e?"":e.toString()},e.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){for(var t,r;47<(r=(t=this.next()).charCodeAt(0))&&r<58;);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos=this.scrollTop||0===this.scrollTop,isShown!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.secondaryNav.classList.toggle("tsd-navigation--toolbar-hide")),this.lastY=this.scrollTop},Viewport}(typedoc.EventTarget);typedoc.Viewport=Viewport,typedoc.registerService(Viewport,"viewport")}(typedoc||(typedoc={})),function(typedoc){function Component(options){this.el=options.el}typedoc.Component=Component}(typedoc||(typedoc={})),function(typedoc){typedoc.pointerDown="mousedown",typedoc.pointerMove="mousemove",typedoc.pointerUp="mouseup",typedoc.pointerDownPosition={x:0,y:0},typedoc.preventNextClick=!1,typedoc.isPointerDown=!1,typedoc.isPointerTouch=!1,typedoc.hasPointerMoved=!1,typedoc.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),document.documentElement.classList.add(typedoc.isMobile?"is-mobile":"not-mobile"),typedoc.isMobile&&"ontouchstart"in document.documentElement&&(typedoc.isPointerTouch=!0,typedoc.pointerDown="touchstart",typedoc.pointerMove="touchmove",typedoc.pointerUp="touchend"),document.addEventListener(typedoc.pointerDown,function(e){typedoc.isPointerDown=!0,typedoc.hasPointerMoved=!1;var t="touchstart"==typedoc.pointerDown?e.targetTouches[0]:e;typedoc.pointerDownPosition.y=t.pageY||0,typedoc.pointerDownPosition.x=t.pageX||0}),document.addEventListener(typedoc.pointerMove,function(e){if(typedoc.isPointerDown&&!typedoc.hasPointerMoved){var t="touchstart"==typedoc.pointerDown?e.targetTouches[0]:e,x=typedoc.pointerDownPosition.x-(t.pageX||0),y=typedoc.pointerDownPosition.y-(t.pageY||0);typedoc.hasPointerMoved=10scrollTop;)index-=1;for(;index"+match+""}),parent=row.parent||"";(parent=parent.replace(new RegExp(this.query,"i"),function(match){return""+match+""}))&&(name=''+parent+"."+name);var item=document.createElement("li");item.classList.value=row.classes,item.innerHTML='\n '+name+"\n ",this.results.appendChild(item)}}},Search.prototype.setLoadingState=function(value){this.loadingState!=value&&(this.el.classList.remove(SearchLoadingState[this.loadingState].toLowerCase()),this.loadingState=value,this.el.classList.add(SearchLoadingState[this.loadingState].toLowerCase()),this.updateResults())},Search.prototype.setHasFocus=function(value){this.hasFocus!=value&&(this.hasFocus=value,this.el.classList.toggle("has-focus"),value?(this.setQuery(""),this.field.value=""):this.field.value=this.query)},Search.prototype.setQuery=function(value){this.query=value.trim(),this.updateResults()},Search.prototype.setCurrentResult=function(dir){var current=this.results.querySelector(".current");if(current){var rel=1==dir?current.nextElementSibling:current.previousElementSibling;rel&&(current.classList.remove("current"),rel.classList.add("current"))}else(current=this.results.querySelector(1==dir?"li:first-child":"li:last-child"))&¤t.classList.add("current")},Search.prototype.gotoCurrentResult=function(){var current=this.results.querySelector(".current");if(current||(current=this.results.querySelector("li:first-child")),current){var link=current.querySelector("a");link&&(window.location.href=link.href),this.field.blur()}},Search.prototype.bindEvents=function(){var _this=this;this.results.addEventListener("mousedown",function(){_this.resultClicked=!0}),this.results.addEventListener("mouseup",function(){_this.resultClicked=!1,_this.setHasFocus(!1)}),this.field.addEventListener("focusin",function(){_this.setHasFocus(!0),_this.loadIndex()}),this.field.addEventListener("focusout",function(){_this.resultClicked?_this.resultClicked=!1:setTimeout(function(){return _this.setHasFocus(!1)},100)}),this.field.addEventListener("input",function(){_this.setQuery(_this.field.value)}),this.field.addEventListener("keydown",function(e){13==e.keyCode||27==e.keyCode||38==e.keyCode||40==e.keyCode?(_this.preventPress=!0,e.preventDefault(),13==e.keyCode?_this.gotoCurrentResult():27==e.keyCode?_this.field.blur():38==e.keyCode?_this.setCurrentResult(-1):40==e.keyCode&&_this.setCurrentResult(1)):_this.preventPress=!1}),this.field.addEventListener("keypress",function(e){_this.preventPress&&e.preventDefault()}),document.body.addEventListener("keydown",function(e){e.altKey||e.ctrlKey||e.metaKey||!_this.hasFocus&&47this.groups.length-1&&(index=this.groups.length-1),this.index!=index){var to=this.groups[index];if(-1 - - - - - AbstractMatrix | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class AbstractMatrix

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- -
    -
  • - -
    -
    -

    Adds the values of a vector to each column.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

addRowVector

- -
    -
  • - -
    -
    -

    Adds the values of a vector to each row.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- -
    -
  • - -
    -
    -

    Creates an exact and independent copy of the matrix.

    -
    -
    -

    Returns Matrix

    -
  • -
-
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
-
    -
  • - -
    -
    -

    Computes the cumulative sum of the matrix elements (in place, row by row).

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- -
    -
  • - -
    -
    -

    Divides the values of each column by those of a vector.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

divRowVector

- -
    -
  • - -
    -
    -

    Divides the values of each row by those of a vector.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

divide

- - -
-
- -

dot

- -
    -
  • - -
    -
    -

    Computes the dot (scalar) product between the matrix and another.

    -
    -
    -

    Parameters

    - -

    Returns number

    -
  • -
-
-
- -

echelonForm

- -
    -
  • - -
    -
    -

    Returns the row echelon form of the matrix computed using gaussian - elimination.

    -
    -
    -

    Returns Matrix

    -
  • -
-
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new column vector with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix has one column.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is in row echelon form.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is in reduced row echelon form.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix has one row.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix has the same number of rows and columns.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix has one row or one column.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of the matrix.

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value.

    -
    -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- -
    -
  • - -
    -
    -

    Returns the mean of all elements of the matrix.

    -
    -
    -

    Returns number

    -
  • -
  • - -
    -
    -

    Returns the mean by the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns number[]

    -
  • -
-
-
- -

min

-
    -
  • min(): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of the matrix.

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value.

    -
    -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- -
    -
  • - -
    -
    -

    Returns the matrix product between this and other.

    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- -
    -
  • - -
    -
    -

    Multiplies the values of a vector with each column.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- -
    -
  • - -
    -
    -

    Multiplies the values of a vector with each row.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- -
    -
  • - -
    -
    -

    Returns the product of all elements of the matrix.

    -
    -
    -

    Returns number

    -
  • -
  • - -
    -
    -

    Returns the product by the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns number[]

    -
  • -
-
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns the reduced row echelon form of the matrix computed using - gaussian elimination.

    -
    -
    -

    Returns Matrix

    -
  • -
-
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- -
    -
  • - -
    -
    -

    Returns a new row-by-row scaled matrix.

    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- -
    -
  • - -
    -
    -

    Returns the standard deviation of all elements of the matrix.

    -
    -
    -

    Parameters

    - -

    Returns number

    -
  • -
  • - -
    -
    -

    Returns the standard deviation by the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns number[]

    -
  • -
-
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- -
    -
  • - -
    -
    -

    Subtracts the values of a vector from each column.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- -
    -
  • - -
    -
    -

    Subtracts the values of a vector from each row.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

subtract

- - -
-
- -

sum

- -
    -
  • - -
    -
    -

    Returns the sum of all elements of the matrix.

    -
    -
    -

    Returns number

    -
  • -
  • - -
    -
    -

    Returns the sum by the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns number[]

    -
  • -
-
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new 1D array filled row by row with the matrix values.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
-
    -
  • - -
    -
    -

    Returns a 2D array containing a copy of the matrix data.

    -
    -
    -

    Returns number[][]

    -
  • -
-
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- -
    -
  • - -
    -
    -

    Transposes the matrix and returns a new one containing the result.

    -
    -
    -

    Returns Matrix

    -
  • -
-
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- -
    -
  • - -
    -
    -

    Returns the variance of all elements of the matrix.

    -
    -
    -

    Parameters

    - -

    Returns number

    -
  • -
  • - -
    -
    -

    Returns the variance by the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns number[]

    -
  • -
-
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Alias for AbstractMatrix.eye.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
    • -
    • -
      Optional columns: number
      -
    • -
    • -
      Optional value: number
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- -
    -
  • - -
    -
    -

    Returns a matrix whose elements are the maximum between matrix1 and matrix2.

    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

Static min

- -
    -
  • - -
    -
    -

    Returns a matrix whose elements are the minimum between matrix1 and matrix2.

    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/choleskydecomposition.html b/docs/classes/choleskydecomposition.html deleted file mode 100644 index 6ae885c6..00000000 --- a/docs/classes/choleskydecomposition.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - CholeskyDecomposition | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class CholeskyDecomposition

-
-
-
-
-
-
-
- -
-
-

Hierarchy

-
    -
  • - CholeskyDecomposition -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly lowerTriangularMatrix

-
lowerTriangularMatrix: Matrix
- -
-
-
-

Methods

-
- -

isPositiveDefinite

-
    -
  • isPositiveDefinite(): boolean
  • -
- -
-
- -

solve

- - -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/eigenvaluedecomposition.html b/docs/classes/eigenvaluedecomposition.html deleted file mode 100644 index cf5d3457..00000000 --- a/docs/classes/eigenvaluedecomposition.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - EigenvalueDecomposition | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class EigenvalueDecomposition

-
-
-
-
-
-
-
- -
-
-

Hierarchy

-
    -
  • - EigenvalueDecomposition -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly diagonalMatrix

-
diagonalMatrix: Matrix
- -
-
- -

Readonly eigenvectorMatrix

-
eigenvectorMatrix: Matrix
- -
-
- -

Readonly imaginaryEigenvalues

-
imaginaryEigenvalues: number[]
- -
-
- -

Readonly realEigenvalues

-
realEigenvalues: number[]
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/ludecomposition.html b/docs/classes/ludecomposition.html deleted file mode 100644 index 1eb6bad5..00000000 --- a/docs/classes/ludecomposition.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - LuDecomposition | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class LuDecomposition

-
-
-
-
-
-
-
- -
-
-

Hierarchy

-
    -
  • - LuDecomposition -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly determinant

-
determinant: number
- -
-
- -

Readonly lowerTriangularMatrix

-
lowerTriangularMatrix: Matrix
- -
-
- -

Readonly pivotPermutationVector

-
pivotPermutationVector: number[]
- -
-
- -

Readonly upperTriangularMatrix

-
upperTriangularMatrix: Matrix
- -
-
-
-

Methods

-
- -

isSingular

-
    -
  • isSingular(): boolean
  • -
- -
-
- -

solve

- - -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrix.html b/docs/classes/matrix.html deleted file mode 100644 index a87d5a80..00000000 --- a/docs/classes/matrix.html +++ /dev/null @@ -1,6571 +0,0 @@ - - - - - - Matrix | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class Matrix

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumn

-
    -
  • addColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Adds a new column to the matrix (in place).

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index. Default: this.columns.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Column to add.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

addColumnVector

- - -
-
- -

addRow

- -
    -
  • - -
    -
    -

    Adds a new row to the matrix (in place).

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index. Default: this.rows.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Row to add.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

removeColumn

-
    -
  • removeColumn(index: number): this
  • -
-
    -
  • - -
    -
    -

    Removes a column from the matrix (in place).

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

removeRow

-
    -
  • removeRow(index: number): this
  • -
-
    -
  • - -
    -
    -

    Removes a row from the matrix (in place).

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixcolumnselectionview.html b/docs/classes/matrixcolumnselectionview.html deleted file mode 100644 index 106091d9..00000000 --- a/docs/classes/matrixcolumnselectionview.html +++ /dev/null @@ -1,6389 +0,0 @@ - - - - - - MatrixColumnSelectionView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixColumnSelectionView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixcolumnview.html b/docs/classes/matrixcolumnview.html deleted file mode 100644 index 18ff5fd0..00000000 --- a/docs/classes/matrixcolumnview.html +++ /dev/null @@ -1,6389 +0,0 @@ - - - - - - MatrixColumnView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixColumnView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixflipcolumnview.html b/docs/classes/matrixflipcolumnview.html deleted file mode 100644 index f655f712..00000000 --- a/docs/classes/matrixflipcolumnview.html +++ /dev/null @@ -1,6386 +0,0 @@ - - - - - - MatrixFlipColumnView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixFlipColumnView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixfliprowview.html b/docs/classes/matrixfliprowview.html deleted file mode 100644 index 0a5f6a2f..00000000 --- a/docs/classes/matrixfliprowview.html +++ /dev/null @@ -1,6386 +0,0 @@ - - - - - - MatrixFlipRowView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixFlipRowView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixrowselectionview.html b/docs/classes/matrixrowselectionview.html deleted file mode 100644 index 1f3b8897..00000000 --- a/docs/classes/matrixrowselectionview.html +++ /dev/null @@ -1,6389 +0,0 @@ - - - - - - MatrixRowSelectionView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixRowSelectionView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixrowview.html b/docs/classes/matrixrowview.html deleted file mode 100644 index 4ff40f2d..00000000 --- a/docs/classes/matrixrowview.html +++ /dev/null @@ -1,6389 +0,0 @@ - - - - - - MatrixRowView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixRowView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixselectionview.html b/docs/classes/matrixselectionview.html deleted file mode 100644 index 77eeeb9a..00000000 --- a/docs/classes/matrixselectionview.html +++ /dev/null @@ -1,6392 +0,0 @@ - - - - - - MatrixSelectionView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixSelectionView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixsubview.html b/docs/classes/matrixsubview.html deleted file mode 100644 index f5a0aef9..00000000 --- a/docs/classes/matrixsubview.html +++ /dev/null @@ -1,6398 +0,0 @@ - - - - - - MatrixSubView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixSubView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

-
    -
  • new MatrixSubView(matrix: AbstractMatrix, startRow: number, endRow: number, startColumn: number, endColumn: number): MatrixSubView
  • -
- -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/matrixtransposeview.html b/docs/classes/matrixtransposeview.html deleted file mode 100644 index 67a7a776..00000000 --- a/docs/classes/matrixtransposeview.html +++ /dev/null @@ -1,6386 +0,0 @@ - - - - - - MatrixTransposeView | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class MatrixTransposeView

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/nipals.html b/docs/classes/nipals.html deleted file mode 100644 index 1e2dd18e..00000000 --- a/docs/classes/nipals.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - Nipals | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class Nipals

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - Nipals -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-
-
-
-

Constructors

-
- -

constructor

- -
    -
  • - -
    -
    -

    Implementation of the NIPALS algorithm. - Geladi, P and Kowalski, B.R. (1986) - Partial least squares and regression: - a tutorial. - Analytica Chimica Acta 185, 1-17.

    -
    -
    -

    Parameters

    - -

    Returns Nipals

    -
  • -
-
-
-
-

Properties

-
- -

betas

-
betas: number
- -
-
- -

p

- - -
-
- -

q

- - -
-
- -

s

- - -
-
- -

t

-
t: number
- -
-
- -

u

-
u: number
- -
-
- -

w

- - -
-
- -

xResidual

-
xResidual: Matrix
- -
-
- -

yResidual

-
yResidual: Matrix
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/qrdecomposition.html b/docs/classes/qrdecomposition.html deleted file mode 100644 index 4d716e92..00000000 --- a/docs/classes/qrdecomposition.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - QrDecomposition | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class QrDecomposition

-
-
-
-
-
-
-
- -
-
-

Hierarchy

-
    -
  • - QrDecomposition -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly orthogonalMatrix

-
orthogonalMatrix: Matrix
- -
-
- -

Readonly upperTriangularMatrix

-
upperTriangularMatrix: Matrix
- -
-
-
-

Methods

-
- -

isFullRank

-
    -
  • isFullRank(): boolean
  • -
- -
-
- -

solve

- -
    -
  • - -
    -
    -

    Solve a problem of least square (Ax=b) by using the QR decomposition. Useful when A is rectangular, but not working when A is singular. - Example : We search to approximate x, with A matrix shape m*n, x vector size n, b vector size m (m > n). We will use : - var qr = QrDecomposition(A); - var x = qr.solve(b);

    -
    -
    -

    Parameters

    -
      -
    • -
      value: Matrix
      -
      -

      Matrix 1D which is the vector b (in the equation Ax = b).

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The vector x.
    • -
    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/singularvaluedecomposition.html b/docs/classes/singularvaluedecomposition.html deleted file mode 100644 index 3dfbdf9e..00000000 --- a/docs/classes/singularvaluedecomposition.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - SingularValueDecomposition | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class SingularValueDecomposition

-
-
-
-
-
-
-
- -
-
-

Hierarchy

-
    -
  • - SingularValueDecomposition -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly condition

-
condition: number
- -
-
- -

Readonly diagonal

-
diagonal: number[]
- -
-
- -

Readonly diagonalMatrix

-
diagonalMatrix: Matrix
- -
-
- -

Readonly leftSingularVectors

-
leftSingularVectors: Matrix
- -
-
- -

Readonly norm2

-
norm2: number
- -
-
- -

Readonly rank

-
rank: number
- -
-
- -

Readonly rightSingularVectors

-
rightSingularVectors: Matrix
- -
-
- -

Readonly threshold

-
threshold: number
- -
-
-
-

Methods

-
- -

inverse

- -
    -
  • - -
    -
    -

    Get the inverse of the matrix. We compute the inverse of a matrix using SVD when this matrix is singular or ill-conditioned. Example : - var svd = SingularValueDecomposition(A); - var inverseA = svd.inverse();

    -
    -
    -

    Returns Matrix

    -
      -
    • The approximation of the inverse of the matrix.
    • -
    -
  • -
-
-
- -

solve

- -
    -
  • - -
    -
    -

    Solve a problem of least square (Ax=b) by using the SVD. Useful when A is singular. When A is not singular, it would be better to use qr.solve(value). - Example : We search to approximate x, with A matrix shape m*n, x vector size n, b vector size m (m > n). We will use : - var svd = SingularValueDecomposition(A); - var x = svd.solve(b);

    -
    -
    -

    Parameters

    -
      -
    • -
      value: Matrix
      -
      -

      Matrix 1D which is the vector b (in the equation Ax = b).

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The vector x.
    • -
    -
  • -
-
-
- -

solveForDiagonal

-
    -
  • solveForDiagonal(value: number[]): Matrix
  • -
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/wrappermatrix1d.html b/docs/classes/wrappermatrix1d.html deleted file mode 100644 index fbffd2d2..00000000 --- a/docs/classes/wrappermatrix1d.html +++ /dev/null @@ -1,6389 +0,0 @@ - - - - - - WrapperMatrix1D | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class WrapperMatrix1D

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/classes/wrappermatrix2d.html b/docs/classes/wrappermatrix2d.html deleted file mode 100644 index e9dcec09..00000000 --- a/docs/classes/wrappermatrix2d.html +++ /dev/null @@ -1,6386 +0,0 @@ - - - - - - WrapperMatrix2D | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class WrapperMatrix2D

-
-
-
-
-
-
-
-

Hierarchy

- -
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Readonly columns

-
columns: number
- -
-
-

Number of columns of the matrix.

-
-
-
-
- -

Readonly rows

-
rows: number
- -
-
-

Number of rows of the matrix.

-
-
-
-
- -

Readonly size

-
size: number
- -
-
-

Total number of elements in the matrix.

-
-
-
-
-
-

Methods

-
- -

abs

-
    -
  • abs(): this
  • -
- -
-
- -

acos

-
    -
  • acos(): this
  • -
- -
-
- -

acosh

-
    -
  • acosh(): this
  • -
- -
-
- -

add

- - -
-
- -

addColumnVector

- - -
-
- -

addRowVector

- - -
-
- -

and

- - -
-
- -

apply

-
    -
  • apply(callback: (row: number, column: number) => void): this
  • -
-
    -
  • - -
    -
    -

    Applies a callback for each element of the matrix. The function is called in the matrix (this) context.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (row: number, column: number) => void
      -
      -

      Function that will be called for each element in the matrix.

      -
      -
        -
      • -
          -
        • (row: number, column: number): void
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            row: number
            -
          • -
          • -
            column: number
            -
          • -
          -

          Returns void

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

asin

-
    -
  • asin(): this
  • -
- -
-
- -

asinh

-
    -
  • asinh(): this
  • -
- -
-
- -

atan

-
    -
  • atan(): this
  • -
- -
-
- -

atanh

-
    -
  • atanh(): this
  • -
- -
-
- -

cbrt

-
    -
  • cbrt(): this
  • -
- -
-
- -

ceil

-
    -
  • ceil(): this
  • -
- -
-
- -

center

- -
    -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean value of the matrix is - subtracted from every value.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Center the matrix in-place. By default, the mean values in the give - dimension are subtracted from the values.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

clone

- - -
-
- -

clz32

-
    -
  • clz32(): this
  • -
- -
-
- -

cos

-
    -
  • cos(): this
  • -
- -
-
- -

cosh

-
    -
  • cosh(): this
  • -
- -
-
- -

cumulativeSum

-
    -
  • cumulativeSum(): this
  • -
- -
-
- -

diag

-
    -
  • diag(): number[]
  • -
-
    -
  • - -
    -
    -

    Returns an array containing the diagonal values of the matrix.

    -
    -
    -

    Returns number[]

    -
  • -
-
-
- -

diagonal

-
    -
  • diagonal(): number[]
  • -
- -
-
- -

div

- - -
-
- -

divColumnVector

- - -
-
- -

divRowVector

- - -
-
- -

divide

- - -
-
- -

dot

- - -
-
- -

echelonForm

- - -
-
- -

exp

-
    -
  • exp(): this
  • -
- -
-
- -

expm1

-
    -
  • expm1(): this
  • -
- -
-
- -

fill

-
    -
  • fill(value: number): this
  • -
-
    -
  • - -
    -
    -

    Fills the matrix with a given value. All elements will be set to this value.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: number
      -
      -

      New value.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

flipColumns

-
    -
  • flipColumns(): this
  • -
- -
-
- -

flipRows

-
    -
  • flipRows(): this
  • -
- -
-
- -

floor

-
    -
  • floor(): this
  • -
- -
-
- -

fround

-
    -
  • fround(): this
  • -
- -
-
- -

get

-
    -
  • get(rowIndex: number, columnIndex: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the value of the given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    -

    Returns number

    -
      -
    • The value of the element.
    • -
    -
  • -
-
-
- -

getColumn

-
    -
  • getColumn(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given column index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getColumnVector

-
    -
  • getColumnVector(index: number): Matrix
  • -
- -
-
- -

getRow

-
    -
  • getRow(index: number): number[]
  • -
-
    -
  • - -
    -
    -

    Returns a new array with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number[]

    -
  • -
-
-
- -

getRowVector

-
    -
  • getRowVector(index: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a new row vector with the values from the given row index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

isColumnVector

-
    -
  • isColumnVector(): boolean
  • -
- -
-
- -

isEchelonForm

-
    -
  • isEchelonForm(): boolean
  • -
- -
-
- -

isReducedEchelonForm

-
    -
  • isReducedEchelonForm(): boolean
  • -
- -
-
- -

isRowVector

-
    -
  • isRowVector(): boolean
  • -
- -
-
- -

isSquare

-
    -
  • isSquare(): boolean
  • -
- -
-
- -

isSymmetric

-
    -
  • isSymmetric(): boolean
  • -
-
    -
  • - -
    -
    -

    Returns whether the matrix is square and has the same values on both sides of the diagonal.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isVector

-
    -
  • isVector(): boolean
  • -
- -
-
- -

kroneckerProduct

- - -
-
- -

leftShift

- - -
-
- -

log

-
    -
  • log(): this
  • -
- -
-
- -

log10

-
    -
  • log10(): this
  • -
- -
-
- -

log1p

-
    -
  • log1p(): this
  • -
- -
-
- -

log2

-
    -
  • log2(): this
  • -
- -
-
- -

max

-
    -
  • max(): number
  • -
- -
-
- -

maxColumn

-
    -
  • maxColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxColumnIndex

-
    -
  • maxColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

maxIndex

-
    -
  • maxIndex(): [number, number]
  • -
- -
-
- -

maxRow

-
    -
  • maxRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

maxRowIndex

-
    -
  • maxRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mean

- - -
-
- -

min

-
    -
  • min(): number
  • -
- -
-
- -

minColumn

-
    -
  • minColumn(column: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minColumnIndex

-
    -
  • minColumnIndex(column: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the minimum value of one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      column: number
      -
      -

      Column index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

minIndex

-
    -
  • minIndex(): [number, number]
  • -
- -
-
- -

minRow

-
    -
  • minRow(row: number): number
  • -
-
    -
  • - -
    -
    -

    Returns the minimum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

minRowIndex

-
    -
  • minRowIndex(row: number): [number, number]
  • -
-
    -
  • - -
    -
    -

    Returns the index of the maximum value of one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      row: number
      -
      -

      Row index.

      -
      -
    • -
    -

    Returns [number, number]

    -
  • -
-
-
- -

mmul

- - -
-
- -

mmulStrassen

- - -
-
- -

mod

- - -
-
- -

modulus

- - -
-
- -

mul

- - -
-
- -

mulColumn

-
    -
  • mulColumn(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a column with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulColumnVector

- - -
-
- -

mulRow

-
    -
  • mulRow(index: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Multiplies the values of a row with a scalar.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      value: number
      -
      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

mulRowVector

- - -
-
- -

multiply

- - -
-
- -

neg

-
    -
  • neg(): this
  • -
-
    -
  • - -
    -
    -

    Negates the matrix. All elements will be multiplied by -1.

    -
    -
    -

    Returns this

    -
  • -
-
-
- -

negate

-
    -
  • negate(): this
  • -
- -
-
- -

norm

-
    -
  • norm(type: "frobenius" | "max"): number
  • -
-
    -
  • - -
    -
    -

    Returns the norm of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      type: "frobenius" | "max"
      -
      -

      Norm type. Default: 'frobenius'.

      -
      -
    • -
    -

    Returns number

    -
  • -
-
-
- -

not

-
    -
  • not(): this
  • -
- -
-
- -

or

- - -
-
- -

pow

- - -
-
- -

product

- - -
-
- -

reducedEchelonForm

-
    -
  • reducedEchelonForm(): Matrix
  • -
- -
-
- -

repeat

- -
    -
  • - -
    -
    -

    Creates a new matrix that is a repetition of the current matrix. New matrix has rows times the number of - rows of the original matrix, and columns times the number of columns of the original matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2]]); - matrix.repeat({ rows: 2 }); // [[1, 2], [1, 2]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

rightShift

- - -
-
- -

round

-
    -
  • round(): this
  • -
- -
-
- -

scale

- -
    -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by their - standard deviation.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
  • - -
    -
    -

    Scale the matrix in-place. By default, values are divided by the - standard deviation in the given dimension.

    -
    -
    -

    Parameters

    - -

    Returns this

    -
  • -
-
-
- -

scaleColumns

- -
    -
  • - -
    -
    -

    Returns a new column-by-column scaled matrix.

    -
    -
    -
    example
    -

    var matrix = new Matrix([[1, 2], [-1, 0]]); - var scaledMatrix = matrix.scaleColumns(); // [[1, 1], [0, 0]]

    -
    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
  • -
-
-
- -

scaleRows

- - -
-
- -

selection

-
    -
  • selection(rowIndices: number[], columnIndices: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Return a new matrix based on a selection of rows and columns. - Order of the indices matters and the same index can be used more than once.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndices: number[]
      -
      -

      The row indices to select.

      -
      -
    • -
    • -
      columnIndices: number[]
      -
      -

      The column indices to select.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

set

-
    -
  • set(rowIndex: number, columnIndex: number, value: number): this
  • -
-
    -
  • - -
    -
    -

    Sets a given element of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      rowIndex: number
      -
      -

      Index of the element's row.

      -
      -
    • -
    • -
      columnIndex: number
      -
      -

      Index of the element's column.

      -
      -
    • -
    • -
      value: number
      -
      -

      The new value for the element.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setColumn

-
    -
  • setColumn(index: number, array: number[] | AbstractMatrix): this
  • -
-
    -
  • - -
    -
    -

    Sets a column at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Column index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setRow

- -
    -
  • - -
    -
    -

    Sets a row at the given index.

    -
    -
    -

    Parameters

    -
      -
    • -
      index: number
      -
      -

      Row index.

      -
      -
    • -
    • -
      array: number[] | AbstractMatrix
      -
      -

      Array or vector to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

setSubMatrix

-
    -
  • setSubMatrix(matrix: MaybeMatrix | number[], startRow: number, startColumn: number): this
  • -
-
    -
  • - -
    -
    -

    Set a part of the matrix to the given sub-matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix | number[]
      -
      -

      The source matrix from which to extract values.

      -
      -
    • -
    • -
      startRow: number
      -
      -

      The index of the first row to set.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      The index of the first column to set.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sign

-
    -
  • sign(): this
  • -
- -
-
- -

signPropagatingRightShift

- - -
-
- -

sin

-
    -
  • sin(): this
  • -
- -
-
- -

sinh

-
    -
  • sinh(): this
  • -
- -
-
- -

sortColumns

-
    -
  • sortColumns(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the columns in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sortRows

-
    -
  • sortRows(compareFunction?: (a: number, b: number) => number): this
  • -
-
    -
  • - -
    -
    -

    Sorts the rows in-place.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional compareFunction: (a: number, b: number) => number
      -
      -
      -
        -
      • -
          -
        • (a: number, b: number): number
        • -
        -
          -
        • -

          Parameters

          -
            -
          • -
            a: number
            -
          • -
          • -
            b: number
            -
          • -
          -

          Returns number

          -
        • -
        -
      • -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

sqrt

-
    -
  • sqrt(): this
  • -
- -
-
- -

standardDeviation

- - -
-
- -

strassen2x2

- - -
-
- -

strassen3x3

- - -
-
- -

sub

- - -
-
- -

subColumnVector

- - -
-
- -

subMatrix

-
    -
  • subMatrix(startRow: number, endRow: number, startColumn: number, endColumn: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      startRow: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      endRow: number
      -
      -

      Last row index.

      -
      -
    • -
    • -
      startColumn: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      endColumn: number
      -
      -

      Last column index.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixColumn

-
    -
  • subMatrixColumn(indices: number[], startRow?: number, endRow?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of column indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the column indices.

      -
      -
    • -
    • -
      Optional startRow: number
      -
      -

      First row index. Default: 0.

      -
      -
    • -
    • -
      Optional endRow: number
      -
      -

      Last row index. Default: this.rows - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subMatrixRow

-
    -
  • subMatrixRow(indices: number[], startColumn?: number, endColumn?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Returns a subset of the matrix based on an array of row indices.

    -
    -
    -

    Parameters

    -
      -
    • -
      indices: number[]
      -
      -

      Array containing the row indices.

      -
      -
    • -
    • -
      Optional startColumn: number
      -
      -

      First column index. Default: 0.

      -
      -
    • -
    • -
      Optional endColumn: number
      -
      -

      Last column index. Default: this.columns - 1.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

subRowVector

- - -
-
- -

subtract

- - -
-
- -

sum

- - -
-
- -

swapColumns

-
    -
  • swapColumns(column1: number, column2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two columns.

    -
    -
    -

    Parameters

    -
      -
    • -
      column1: number
      -
      -

      First column index.

      -
      -
    • -
    • -
      column2: number
      -
      -

      Second column index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

swapRows

-
    -
  • swapRows(row1: number, row2: number): this
  • -
-
    -
  • - -
    -
    -

    Swap two rows.

    -
    -
    -

    Parameters

    -
      -
    • -
      row1: number
      -
      -

      First row index.

      -
      -
    • -
    • -
      row2: number
      -
      -

      Second row index.

      -
      -
    • -
    -

    Returns this

    -
  • -
-
-
- -

tan

-
    -
  • tan(): this
  • -
- -
-
- -

tanh

-
    -
  • tanh(): this
  • -
- -
-
- -

tensorProduct

- - -
-
- -

to1DArray

-
    -
  • to1DArray(): number[]
  • -
- -
-
- -

to2DArray

-
    -
  • to2DArray(): number[][]
  • -
- -
-
- -

toJSON

-
    -
  • toJSON(): number[][]
  • -
- -
-
- -

toString

- - -
-
- -

trace

-
    -
  • trace(): number
  • -
-
    -
  • - -
    -
    -

    Returns the trace of the matrix (sum of the diagonal elements).

    -
    -
    -

    Returns number

    -
  • -
-
-
- -

transpose

- - -
-
- -

trunc

-
    -
  • trunc(): this
  • -
- -
-
- -

variance

- - -
-
- -

xor

- - -
-
- -

zeroFillRightShift

- - -
-
- -

Static abs

- - -
-
- -

Static acos

- - -
-
- -

Static acosh

- - -
-
- -

Static add

- - -
-
- -

Static and

- - -
-
- -

Static asin

- - -
-
- -

Static asinh

- - -
-
- -

Static atan

- - -
-
- -

Static atanh

- - -
-
- -

Static cbrt

- - -
-
- -

Static ceil

- - -
-
- -

Static checkMatrix

-
    -
  • checkMatrix(value: any): Matrix
  • -
-
    -
  • - -
    -
    -

    Check that the provided value is a Matrix and tries to instantiate one if not.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

Static clz32

- - -
-
- -

Static columnVector

-
    -
  • columnVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a column vector, a matrix with only one column.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static cos

- - -
-
- -

Static cosh

- - -
-
- -

Static diag

-
    -
  • diag(data: number[], rows?: number, columns?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a diagonal matrix based on the given array.

    -
    -
    -

    Parameters

    -
      -
    • -
      data: number[]
      -
      -

      Array containing the data for the diagonal.

      -
      -
    • -
    • -
      Optional rows: number
      -
      -

      Number of rows. Default: data.length.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new diagonal matrix.
    • -
    -
  • -
-
-
- -

Static diagonal

-
    -
  • diagonal(data: number[], rows?: number, columns?: number): Matrix
  • -
- -
-
- -

Static div

- - -
-
- -

Static divide

- - -
-
- -

Static exp

- - -
-
- -

Static expm1

- - -
-
- -

Static eye

-
    -
  • eye(rows: number, columns?: number, value?: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates an identity matrix with the given dimension. Values of the diagonal will be 1 and others will be 0.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      Optional columns: number
      -
      -

      Number of columns. Default: rows.

      -
      -
    • -
    • -
      Optional value: number
      -
      -

      Value to fill the diagonal with. Default: 1.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new identity matrix.
    • -
    -
  • -
-
-
- -

Static floor

- - -
-
- -

Static from1DArray

-
    -
  • from1DArray(newRows: number, newColumns: number, newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Constructs a matrix with the chosen dimensions from a 1D array.

    -
    -
    -

    Parameters

    -
      -
    • -
      newRows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      newColumns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the matrix.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static fround

- - -
-
- -

Static identity

-
    -
  • identity(rows: number, columns?: number, value?: number): Matrix
  • -
- -
-
- -

Static isMatrix

-
    -
  • isMatrix(value: any): value is AbstractMatrix
  • -
-
    -
  • - -
    -
    -

    Returns whether value is a Matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      value: any
      -
      -

      The value to check.

      -
      -
    • -
    -

    Returns value is AbstractMatrix

    -
  • -
-
-
- -

Static leftShift

- - -
-
- -

Static log

- - -
-
- -

Static log10

- - -
-
- -

Static log1p

- - -
-
- -

Static log2

- - -
-
- -

Static max

- - -
-
- -

Static min

- - -
-
- -

Static mod

- - -
-
- -

Static modulus

- - -
-
- -

Static mul

- - -
-
- -

Static multiply

- - -
-
- -

Static not

- - -
-
- -

Static ones

-
    -
  • ones(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to one.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static or

- - -
-
- -

Static pow

- - -
-
- -

Static rand

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be randomly set.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomOptions
      -
      -

      Options object.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static randInt

- -
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be random integers.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    • -
      Optional options: IRandomIntOptions
      -
    • -
    -

    Returns Matrix

    -
      -
    • The new matrix.
    • -
    -
  • -
-
-
- -

Static random

- - -
-
- -

Static rightShift

- - -
-
- -

Static round

- - -
-
- -

Static rowVector

-
    -
  • rowVector(newData: number[]): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a row vector, a matrix with only one row.

    -
    -
    -

    Parameters

    -
      -
    • -
      newData: number[]
      -
      -

      A 1D array containing data for the vector.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
- -

Static sign

- - -
-
- -

Static signPropagatingRightShift

- - -
-
- -

Static sin

- - -
-
- -

Static sinh

- - -
-
- -

Static sqrt

- - -
-
- -

Static sub

- - -
-
- -

Static subtract

- - -
-
- -

Static tan

- - -
-
- -

Static tanh

- - -
-
- -

Static trunc

- - -
-
- -

Static xor

- - -
-
- -

Static zeroFillRightShift

- - -
-
- -

Static zeros

-
    -
  • zeros(rows: number, columns: number): Matrix
  • -
-
    -
  • - -
    -
    -

    Creates a matrix with the given dimensions. Values will be set to zero. - This is equivalent to calling the Matrix constructor.

    -
    -
    -

    Parameters

    -
      -
    • -
      rows: number
      -
      -

      Number of rows.

      -
      -
    • -
    • -
      columns: number
      -
      -

      Number of columns.

      -
      -
    • -
    -

    Returns Matrix

    -

    The new matrix.

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/globals.html b/docs/globals.html deleted file mode 100644 index ba07f3b4..00000000 --- a/docs/globals.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

ml-matrix

-
-
-
-
-
-
-
-

Index

-
- -
-
-
-

Type aliases

-
- -

MatrixDimension

-
MatrixDimension: "row" | "column"
- -
-
- -

MaybeMatrix

-
MaybeMatrix: AbstractMatrix | number[][]
- -
-
- -

ScalarOrMatrix

-
ScalarOrMatrix: number | MaybeMatrix
- -
-
-
-

Functions

-
- -

correlation

- - -
-
- -

covariance

- - -
-
- -

determinant

- -
    -
  • - -
    -
    -

    Calculates and returns the determinant of a matrix.

    -
    -
    -

    Parameters

    - -

    Returns number

    -
  • -
-
-
- -

inverse

- -
    -
  • - -
    -
    -

    Computes the inverse of a matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix
      -
      -

      Matrix to invert.

      -
      -
    • -
    • -
      Optional useSVD: boolean
      -
      -

      Use the singular value decomposition to compute the inverse. Default: false.

      -
      -
    • -
    -

    Returns Matrix

    -
  • -
-
-
- -

linearDependencies

- -
    -
  • - -
    -
    -

    Creates a matrix which represents the dependencies between rows. - If a row is a linear combination of others rows, the result will be a row with the coefficients of this combination. - For example : for A = [[2, 0, 0, 1], [0, 1, 6, 0], [0, 3, 0, 1], [0, 0, 1, 0], [0, 1, 2, 0]], the result will be [[0, 0, 0, 0, 0], [0, 0, 0, 4, 1], [0, 0, 0, 0, 0], [0, 0.25, 0, 0, -0.25], [0, 1, 0, -4, 0]]

    -
    -
    -

    Parameters

    - -

    Returns Matrix

    -
      -
    • The matrix which represents the dependencies between rows.
    • -
    -
  • -
-
-
- -

pseudoInverse

- -
    -
  • - -
    -
    -

    Returns inverse of a matrix if it exists or the pseudoinverse.

    -
    -
    -

    Parameters

    -
      -
    • -
      matrix: MaybeMatrix
      -
    • -
    • -
      Optional threshold: number
      -
      -

      Threshold for taking inverse of singular values. Default: Number.EPSILON.

      -
      -
    • -
    -

    Returns Matrix

    -
      -
    • The (pseudo)inverted matrix.
    • -
    -
  • -
-
-
- -

solve

- - -
-
- -

wrap

- - -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 103a6ee2..00000000 --- a/docs/index.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

ml-matrix

-
-
-
-
-
-
-
- -

ml-matrix

-
-

NPM version - build status - npm download

-

Matrix manipulation and computation library.

- -

Installation

-
-

$ npm install ml-matrix

- -

Usage

-
- -

As an ES module

-
-
import { Matrix } from 'ml-matrix';
-
-const matrix = Matrix.ones(5, 5);
- -

As a CommonJS module

-
-
const { Matrix } = require('ml-matrix');
-
-const matrix = Matrix.ones(5, 5);
- -

API Documentation

- - -

Examples

-
- -

Standard operations

-
-
const { Matrix } = require('ml-matrix');
-
-var A = new Matrix([[1, 1], [2, 2]]);
-var B = new Matrix([[3, 3], [1, 1]]);
-var C = new Matrix([[3, 3], [1, 1]]);
-
-// ============================
-// Operations with the matrix :
-// =============================
-
-// operations :
-const addition = Matrix.add(A, B); // addition = Matrix [[4, 4], [3, 3], rows: 2, columns: 2]
-const substraction = Matrix.sub(A, B); // substraction = Matrix [[-2, -2], [1, 1], rows: 2, columns: 2]
-const multiplication = A.mmul(B); // multiplication = Matrix [[4, 4], [8, 8], rows: 2, columns: 2]
-const mulByNumber = Matrix.mul(A, 10); // mulByNumber = Matrix [[10, 10], [20, 20], rows: 2, columns: 2]
-const divByNumber = Matrix.div(A, 10); // divByNumber = Matrix [[0.1, 0.1], [0.2, 0.2], rows: 2, columns: 2]
-const modulo = Matrix.mod(B, 2); // modulo = Matrix [[ 1, 1], [1, 1], rows: 2, columns: 2]
-const maxMatrix = Matrix.max(A, B); // max = Matrix [[3, 3], [2, 2], rows: 2, columns: 2]
-const minMatrix = Matrix.min(A, B); // max = Matrix [[1, 1], [1, 1], rows: 2, columns: 2]
-
-// Inplace operations : (consider that Cinit = C before all the operations below)
-C.add(A); // => C = Cinit + A
-C.sub(A); // => C = Cinit
-C.mul(10); // => C = 10 * Cinit
-C.div(10); // => C = Cinit
-C.mod(2); // => C = Cinit % 2
-
-// Standard Math operations : (abs, cos, round, etc.)
-var A = new Matrix([[1, 1], [-1, -1]]);
-var expon = Matrix.exp(A); // expon = Matrix [[Math.exp(1), Math.exp(1)], [Math.exp(-1), Math.exp(-1)], rows: 2, columns: 2].
-var cosinus = Matrix.cos(A); // cosinus = Matrix [[Math.cos(1), Math.cos(1)], [Math.cos(-1), Math.cos(-1)], rows: 2, columns: 2].
-var absolute = Matrix.abs(A); // expon = absolute [[1, 1], [1, 1], rows: 2, columns: 2].
-// you can use 'abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'cbrt', 'ceil', 'clz32', 'cos', 'cosh', 'exp', 'expm1', 'floor', 'fround', 'log', 'log1p', 'log10', 'log2', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc'
-// Note : you can do it inplace too as A.abs()
-
-// ============================
-// Manipulation of the matrix :
-// =============================
-
-var numberRows = A.rows; // A has 2 rows
-var numberCols = A.columns; // A has 2 columns
-var firstValue = A.get(0, 0); // get(rows, columns)
-var numberElements = A.size; // 2 * 2 = 4 elements
-var isRow = A.isRowVector(); // false because A has more that 1 row
-var isColumn = A.isColumnVector(); // false because A has more that 1 column
-var isSquare = A.isSquare(); // true, because A is 2 * 2 matrix
-var isSym = A.isSymmetric(); // false, because A is not symmetric
-// remember : A = Matrix [[1, 1], [-1, -1], rows: 2, columns: 2]
-A.set(1, 0, 10); // A = Matrix [[1, 1], [10, -1], rows: 2, columns: 2]. We have change the second row and the first column
-var diag = A.diag(); // diag = [1, -1], i.e values in the diagonal.
-var m = A.mean(); // m = 2.75
-var product = A.prod(); // product = -10, i.e product of all values of the matrix
-var norm = A.norm(); // norm = 10.14889156509222, i.e Frobenius norm of the matrix
-var transpose = A.transpose(); // tranpose = Matrix [[1, 10], [1, -1], rows: 2, columns: 2]
-
-// ============================
-// Instanciation of matrix :
-// =============================
-
-var z = Matrix.zeros(3, 2); // z = Matrix [[0, 0], [0, 0], [0, 0], rows: 3, columns: 2]
-var z = Matrix.ones(2, 3); // z = Matrix [[1, 1, 1], [1, 1, 1], rows: 2, columns: 3]
-var z = Matrix.eye(3, 4); // Matrix [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], rows: 3, columns: 4]. there are 1 only in the diagonal
- -

Maths

-
-
const {
-  Matrix,
-  inverse,
-  solve,
-  linearDependencies,
-  QrDecomposition,
-  LuDecomposition,
-  CholeskyDecomposition,
-} = require('ml-matrix');
-
-//===========================
-// inverse and pseudo-inverse
-//===========================
-
-var A = new Matrix([[2, 3, 5], [4, 1, 6], [1, 3, 0]]);
-var inverseA = inverse(A);
-var B = A.mmul(inverseA); // B = A * inverse(A), so B ~= Identity
-
-// if A is singular, you can use SVD :
-var A = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); // A is singular, so the standard computation of inverse won't work (you can test if you don't trust me^^)
-var inverseA = inverse(A, (useSVD = true)); // inverseA is only an approximation of the inverse, by using the Singular Values Decomposition
-var B = A.mmul(inverseA); // B = A * inverse(A), but inverse(A) is only an approximation, so B doesn't really be identity.
-
-// if you want the pseudo-inverse of a matrix :
-var A = new Matrix([[1, 2], [3, 4], [5, 6]]);
-var pseudoInverseA = A.pseudoInverse();
-var B = A.mmul(pseudoInverseA).mmul(A); // with pseudo inverse, A*pseudo-inverse(A)*A ~= A. It's the case here
-
-//=============
-// Least square
-//=============
-
-// Least square is the following problem : We search x, such as A.x = b (A, x and b are matrix or vectors).
-// Below, how to solve least square with our function
-
-// If A is non singular :
-var A = new Matrix([[3, 1], [4.25, 1], [5.5, 1], [8, 1]]);
-var b = Matrix.columnVector([4.5, 4.25, 5.5, 5.5]);
-var x = solve(A, b);
-var error = Matrix.sub(b, A.mmul(x)); // The error enables to evaluate the solution x found.
-
-// If A is non singular :
-var A = new Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
-var b = Matrix.columnVector([8, 20, 32]);
-var x = solve(A, b, (useSVD = true)); // there are many solutions. x can be [1, 2, 1].transpose(), or [1.33, 1.33, 1.33].transpose(), etc.
-var error = Matrix.sub(b, A.mmul(x)); // The error enables to evaluate the solution x found.
-
-//===============
-// Decompositions
-//===============
-
-// QR Decomposition
-
-var A = new Matrix([[2, 3, 5], [4, 1, 6], [1, 3, 0]]);
-var QR = new QrDecomposition(A);
-var Q = QR.orthogonalMatrix;
-var R = QR.upperTriangularMatrix;
-// So you have the QR decomposition. If you multiply Q by R, you'll see that A = Q.R, with Q orthogonal and R upper triangular
-
-// LU Decomposition
-
-var A = new Matrix([[2, 3, 5], [4, 1, 6], [1, 3, 0]]);
-var LU = new LuDecomposition(A);
-var L = LU.lowerTriangularMatrix;
-var U = LU.upperTriangularMatrix;
-var P = LU.pivotPermutationVector;
-// So you have the LU decomposition. P includes the permutation of the matrix. Here P = [1, 2, 0], i.e the first row of LU is the second row of A, the second row of LU is the third row of A and the third row of LU is the first row of A.
-
-// Cholesky Decomposition
-
-var A = new Matrix([[2, 3, 5], [4, 1, 6], [1, 3, 0]]);
-var cholesky = new CholeskyDecomposition(A);
-var L = cholesky.lowerTriangularMatrix;
-
-// Eigenvalues & eigenvectors
-
-var A = new Matrix([[2, 3, 5], [4, 1, 6], [1, 3, 0]]);
-var e = new EigenvalueDecomposition(A);
-var real = e.realEigenvalues;
-var imaginary = e.imaginaryEigenvalues;
-var vectors = e.eigenvectorMatrix;
-
-//=======
-// Others
-//=======
-
-// Linear dependencies
-var A = new Matrix([
-  [2, 0, 0, 1],
-  [0, 1, 6, 0],
-  [0, 3, 0, 1],
-  [0, 0, 1, 0],
-  [0, 1, 2, 0],
-]);
-var dependencies = linearDependencies(A); // dependencies is a matrix with the dependencies of the rows. When we look row by row, we see that the first row is [0, 0, 0, 0, 0], so it means that the first row is independent, and the second row is [ 0, 0, 0, 4, 1 ], i.e the second row = 4 times the 4th row + the 5th row.
- -

License

-
-

MIT

-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/icenterbyoptions.html b/docs/interfaces/icenterbyoptions.html deleted file mode 100644 index 5e3df567..00000000 --- a/docs/interfaces/icenterbyoptions.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - ICenterByOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface ICenterByOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - ICenterByOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional center

-
center: number[]
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/icenteroptions.html b/docs/interfaces/icenteroptions.html deleted file mode 100644 index 31517f3d..00000000 --- a/docs/interfaces/icenteroptions.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - ICenterOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface ICenterOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - ICenterOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional center

-
center: number
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/icorrelationoptions.html b/docs/interfaces/icorrelationoptions.html deleted file mode 100644 index 068ebbdd..00000000 --- a/docs/interfaces/icorrelationoptions.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - ICorrelationOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface ICorrelationOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - ICorrelationOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional center

-
center: boolean
- -
-
-
default
-

true

-
-
-
-
-
- -

Optional scale

-
scale: boolean
- -
-
-
default
-

true

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/icovarianceoptions.html b/docs/interfaces/icovarianceoptions.html deleted file mode 100644 index 48f60c9e..00000000 --- a/docs/interfaces/icovarianceoptions.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - ICovarianceOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface ICovarianceOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - ICovarianceOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional center

-
center: boolean
- -
-
-
default
-

true

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/ievdoptions.html b/docs/interfaces/ievdoptions.html deleted file mode 100644 index d4424a7b..00000000 --- a/docs/interfaces/ievdoptions.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - IEVDOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IEVDOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IEVDOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional assumeSymmetric

-
assumeSymmetric: boolean
- -
-
-
default
-

false

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/ilineardependenciesoptions.html b/docs/interfaces/ilineardependenciesoptions.html deleted file mode 100644 index de4710c8..00000000 --- a/docs/interfaces/ilineardependenciesoptions.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - ILinearDependenciesOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface ILinearDependenciesOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - ILinearDependenciesOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional thresholdError

-
thresholdError: number
- -
-
-

If the error is inferior to that threshold, the linear combination found is accepted and the row is dependent from other rows.

-
-
-
default
-

10e-10

-
-
-
-
-
- -

Optional thresholdValue

-
thresholdValue: number
- -
-
-

If an absolute value is inferior to this threshold, it will equals zero.

-
-
-
default
-

10e-10

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/inipalsoptions.html b/docs/interfaces/inipalsoptions.html deleted file mode 100644 index e3d49773..00000000 --- a/docs/interfaces/inipalsoptions.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - INipalsOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface INipalsOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - INipalsOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional Y

-
Y: MaybeMatrix | number[]
- -
-
-

A column vector of length X.rows that contains known labels for supervised PLS.

-
-
-
-
- -

Optional maxIterations

-
maxIterations: boolean
- -
-
-

The maximum number of allowed iterations before beraking the loop if convergence is not achieved.

-
-
-
default
-

1000

-
-
-
-
-
- -

Optional terminationCriteria

-
terminationCriteria: number
- -
-
-

Termination criteria

-
-
-
default
-

1e-10

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/irandomintoptions.html b/docs/interfaces/irandomintoptions.html deleted file mode 100644 index b6c4608c..00000000 --- a/docs/interfaces/irandomintoptions.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - IRandomIntOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IRandomIntOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IRandomIntOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

max

-
max: number
- -
-
-

Maximum value.

-
-
-
default
-

1000

-
-
-
-
-
- -

min

-
min: number
- -
-
-

Minimum value.

-
-
-
default
-

0

-
-
-
-
-
- -

random

-
random: () => number
- -
-
-

Random number generator.

-
-
-
default
-

Math.random

-
-
-
-
-

Type declaration

-
    -
  • -
      -
    • (): number
    • -
    -
      -
    • -

      Returns number

      -
    • -
    -
  • -
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/irandomoptions.html b/docs/interfaces/irandomoptions.html deleted file mode 100644 index dee5d754..00000000 --- a/docs/interfaces/irandomoptions.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - IRandomOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IRandomOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IRandomOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

random

-
random: () => number
- -
-
-

Random number generator.

-
-
-
default
-

Math.random

-
-
-
-
-

Type declaration

-
    -
  • -
      -
    • (): number
    • -
    -
      -
    • -

      Returns number

      -
    • -
    -
  • -
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/irepeatoptions.html b/docs/interfaces/irepeatoptions.html deleted file mode 100644 index a4b2cee2..00000000 --- a/docs/interfaces/irepeatoptions.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - IRepeatOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IRepeatOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IRepeatOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional columns

-
columns: number
- -
-
-

Number of times the columns should be repeated.

-
-
-
default
-

1

-
-
-
-
-
- -

Optional rows

-
rows: number
- -
-
-

Number of times the rows should be repeated.

-
-
-
default
-

1

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/iscalebyoptions.html b/docs/interfaces/iscalebyoptions.html deleted file mode 100644 index 817fa2bc..00000000 --- a/docs/interfaces/iscalebyoptions.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - IScaleByOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IScaleByOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IScaleByOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional scale

-
scale: number[]
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/iscaleoptions.html b/docs/interfaces/iscaleoptions.html deleted file mode 100644 index 04a77ed0..00000000 --- a/docs/interfaces/iscaleoptions.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - IScaleOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IScaleOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IScaleOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional max

-
max: number
- -
-
-

Maximum scaled value.

-
-
-
default
-

1

-
-
-
-
-
- -

Optional min

-
min: number
- -
-
-

Minimum scaled value.

-
-
-
default
-

0

-
-
-
-
-
- -

Optional scale

-
scale: number
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/isvdoptions.html b/docs/interfaces/isvdoptions.html deleted file mode 100644 index 36a87979..00000000 --- a/docs/interfaces/isvdoptions.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - ISVDOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface ISVDOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - ISVDOptions -
  • -
-
-
-

Index

-
- -
-
-
-

Properties

-
- -

Optional autoTranspose

-
autoTranspose: boolean
- -
-
-
default
-

false

-
-
-
-
-
- -

Optional computeLeftSingularVectors

-
computeLeftSingularVectors: boolean
- -
-
-
default
-

true

-
-
-
-
-
- -

Optional computeRightSingularVectors

-
computeRightSingularVectors: boolean
- -
-
-
default
-

true

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/itostringoptions.html b/docs/interfaces/itostringoptions.html deleted file mode 100644 index 9fd5a29f..00000000 --- a/docs/interfaces/itostringoptions.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - IToStringOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IToStringOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IToStringOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional maxColumns

-
maxColumns: number
- -
-
-

Maximum number of printed columns.

-
-
-
default
-

10

-
-
-
-
-
- -

Optional maxNumSize

-
maxNumSize: number
- -
-
-

Maximum size (number of characters) of printed numbers.

-
-
-
default
-

8

-
-
-
-
-
- -

Optional maxRows

-
maxRows: number
- -
-
-

Maximum number of printed rows.

-
-
-
default
-

15

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/ivariancebyoptions.html b/docs/interfaces/ivariancebyoptions.html deleted file mode 100644 index df96bddf..00000000 --- a/docs/interfaces/ivariancebyoptions.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - IVarianceByOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IVarianceByOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IVarianceByOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional mean

-
mean: number[]
- -
-
- -

Optional unbiased

-
unbiased: boolean
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/ivarianceoptions.html b/docs/interfaces/ivarianceoptions.html deleted file mode 100644 index 9b2eaaf0..00000000 --- a/docs/interfaces/ivarianceoptions.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - IVarianceOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IVarianceOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IVarianceOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional mean

-
mean: number
- -
-
- -

Optional unbiased

-
unbiased: boolean
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/iwrap1doptions.html b/docs/interfaces/iwrap1doptions.html deleted file mode 100644 index 28874fdd..00000000 --- a/docs/interfaces/iwrap1doptions.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - IWrap1DOptions | ml-matrix - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface IWrap1DOptions

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - IWrap1DOptions -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

Optional rows

-
rows: number
- -
-
-
default:
-

1

-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Inherited property
  • -
  • Inherited method
  • -
-
    -
  • Property
  • -
-
    -
  • Static method
  • -
-
-
-
-
- - - \ No newline at end of file diff --git a/package.json b/package.json index 03a592fa..cbb96430 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "src" ], "scripts": { - "build-docs": "typedoc --out docs --name \"ml-matrix\" --mode file --includeDeclarations --excludeExternals --hideGenerator --excludePrivate --moduleResolution node matrix.d.ts", "compile": "rollup -c", "eslint": "eslint benchmark src testUtils.js", "eslint-fix": "npm run eslint -- --fix", @@ -56,25 +55,23 @@ "homepage": "https://github.com/mljs/matrix", "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.10.4", - "@rollup/plugin-commonjs": "^14.0.0", - "@rollup/plugin-node-resolve": "^8.4.0", + "@rollup/plugin-commonjs": "^15.1.0", + "@rollup/plugin-node-resolve": "^9.0.0", "benchmark": "^2.1.4", - "csv-parse": "^4.11.1", - "eslint": "^7.10.0", + "csv-parse": "^4.12.0", + "eslint": "^7.11.0", "eslint-config-cheminfo": "^5.2.2", - "jest": "^26.1.0", + "jest": "^26.5.2", "jest-matcher-deep-close-to": "^2.0.1", - "mathjs": "^7.1.0", + "mathjs": "^7.5.1", "ml-dataset-iris": "^1.1.1", "numeric": "^1.2.6", - "prettier": "^2.0.5", + "prettier": "^2.1.2", "pretty-hrtime": "^1.0.3", - "rollup": "^2.23.0", - "rollup-plugin-terser": "^6.1.0", - "typedoc": "^0.17.8", - "typescript": "^3.9.7" + "rollup": "^2.29.0", + "rollup-plugin-terser": "^7.0.2" }, "dependencies": { - "ml-array-rescale": "^1.3.1" + "ml-array-rescale": "^1.3.2" } } diff --git a/src/matrix.js b/src/matrix.js index a675710c..2eb59732 100644 --- a/src/matrix.js +++ b/src/matrix.js @@ -1427,6 +1427,7 @@ export default class Matrix extends AbstractMatrix { constructor(nRows, nColumns) { super(); if (Matrix.isMatrix(nRows)) { + // eslint-disable-next-line no-constructor-return return nRows.clone(); } else if (Number.isInteger(nRows) && nRows > 0) { // Create an empty matrix @@ -1462,7 +1463,6 @@ export default class Matrix extends AbstractMatrix { } this.rows = nRows; this.columns = nColumns; - return this; } set(rowIndex, columnIndex, value) {