{
  "name": "sylvester.js",
  "description": "node.js implementation of James Coglan's \"Sylvester\" matrix math library.",
  "version": "0.1.1",
  "engines": {
    "node": ">=0.2.6"
  },
  "author": {
    "name": "Chris Umbel",
    "email": "chris@chrisumbel.com"
  },
  "keywords": [
    "matrix",
    "vector",
    "linear",
    "line",
    "algebra",
    "matrices"
  ],
  "main": "./lib/index.js",
  "maintainers": [
    {
      "name": "chrisumbel",
      "email": "chris@chrisumbel.com"
    }
  ],
  "_npmUser": {
    "name": "chrisumbel",
    "email": "chris@chrisumbel.com"
  },
  "dependencies": {},
  "devDependencies": {},
  "directories": {},
  "readme": "\n= node-sylvester\n\nnode.js implementation of James Coglan's \"Sylvester\" matrix math library.\nThe original project can be found at http://sylvester.jcoglan.com/\n\nThis project is maintained by {Chris Umbel}[http://www.chrisumbel.com] & Rob Ellis\n\n= Documentation\n\nThe original documentation for \"Sylvester\" should help you through basic operations. An intro that contains node-specific features  can also be found {on Chris Umbel's blog}[http://www.chrisumbel.com/article/sylvester_node_js_matrix_vector_math]. We're looking for someone to help get the documentation situation under control.\n\n= Installation\n\n    npm install sylvester\n\n= Usage\n\n== New Stuff\n\nFirst I'd like to show some examples of features that aren't in the standard (non-node) Sylvester. I'll likely attempt to commit these back to Sylvester at some point soon.\n\nNote that the decompositions are all available in pure JavaScript, but if the {lapack}[https://github.com/NaturalNode/node-lapack] NPM is installed with LAPACK built as a shared library then efficient native code will be used. The LAPACK integration is still *highly* experimental.\n\n=== Vector\n\n    require('sylvester');\n    var a = $V([1, 2, 3]);\n\nelement-wise log:\n\n    console.log(a.log());\n\nnorm computation:\n\n    console.log(a.norm());\n\nelement-wise multiplication:\n\n    a.elementMultiply(vector);\n\nelement-wise division:\n\n    a.elementDivide(vector);\n\nremove first n nodes:\n\n    a.chomp(n);\n\nreturn vector with first n nodes:\n\n    a.top(n);\n\nadd all elements into a single scalar:\n\n    a.sum()\n        \nmultiply all elements into a single scalar:\n\n    a.product()\n\nreturn a vector with the elements parameter on the bottom:\n\n    a.augment(elements)\n\n=== Matrix\n\n    var A = $M([[1, 2, 3], [4, 5, 6]]);\n\nreturn subset of rows, columns:\n\n    // startRow, endRow, startCol, endCol\n    A.slice(2, 3, 2, 3);\n\ndivide matricies:\n\n    A.div($M([[0.5, 1], [1, 2], [2, 3]]));\n\nscalar addition/subtraction\n\n    A.add(1);\n    A.subtract(1);\n\nelement-wise log:\n\n    console.log(A.log());\n\nelement-wise multiplication:\n\n    A.elementMultiply(vector)\n\nadd all\telements into a\tsingle scalar:\n\n    A.sum()\n\nreturns a vector of the indexes of maximum values ([3 3]):\n\n    $M([[1, 2, 3], [5, 4, 6]]).maxColumnIndexes()\n\nreturns a vector of minimum column indexes ([1 2]):\n\n    $M([[1, 2, 3], [5, 4, 6]]).minColumnIndexes();\n\nreturns a vector of max values ([3 6]):\n\n    $M([[1, 2, 3], [5, 4, 6]]).maxColumns()\n\nreturns a vector of minimum values ([1 4]):\n\n    $M([[1, 2, 3], [5, 4, 6]]).minColumns()\n\ncreate a 2x3 matrix of ones:\n\n    var Ones = Matrix.One(2, 3);\n\nLU decomposition (with partial pivoting)\n\n   var lu = A.lu();\n   console.log(lu.L);\n   console.log(lu.U);\n   console.log(lu.P);\n\nQR decomposition (feature still inefficient and experimental, but uses pure javascript):\n\n    var qr = A.qr();\n    console.log(qr.Q);\n    console.log(qr.R);\n\nSVD decomposition (feature still inefficient and experimental, but uses pure javascript):\n\n    var svd = A.svd();\n    console.log(svd.U);\n    console.log(svd.S);\n    console.log(svd.V);\n\nPCA\n\n    var A = $M([[1, 2], [5, 7]]).pcaProject(1).eql($M([\n                [-2.2120098720461616],\n                [-8.601913944732665]\n            ]);\n    var pca = A.pcaProject(1);\n    var Z = pca.Z;\n    var A = Z.pcaRecover(pca.U);\n\nSolving systems of equations\n    \n    // sovle Ax = b for x\n    var A = $M([[2, 4], [2, 1]]);\n    var b = $V([1, 0]);\n    console.log(A.solve(b));\n\n== Old Stuff\n\nBelow is a basic illustration of standard matrix/vector math using the standard\nSylvester API. This documentation is rather incomplete and for further details please consult {the official sylvester API documentation}[http://sylvester.jcoglan.com/docs] at http://sylvester.jcoglan.com/docs.\n\n=== Vectors\n\n    require('sylvester');\n\ncreate two vectors:\n\n    var a = $V([1, 2, 3]);\n    var b = $V([2, 3, 4]);\n\ncompute the dot product:\n\n    var r = a.dot(b);\n\nadd two vectors:\n\n    var c = a.add(b);\n\nmultiply by scalar:\n\n    var d = a.x(2);\n\n=== Matrices\n\n    require('sylvester');\n\ncreate two matrices:\n\n    var A = $M([[1, 2], [3, 4]]);\n    var B = $M([[1, 2, 3], [4, 5, 6]]);\n\nmultiply the matrices:\n\n    var C = A.x(B);\n\ntranspose a matrix:\n\n    var B_T = B.transpose();\n    // B is 2x3, B_T is 3x2\n\n= License\n\nThis project is released under The MIT License\n\nCopyright (c) 2011, Chris Umbel, Rob Ellis, James Coglan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
  "readmeFilename": "README.rdoc",
  "_id": "sylvester.js@0.1.0",
  "scripts": {},
  "_shasum": "9090a5f7ef362df04b5eac1f254598994c66c298",
  "_from": "sylvester.js@*"
}
