|
| 1 | + |
| 2 | +return { |
| 3 | + // lalolibbase.js |
| 4 | + // constants? |
| 5 | + laloprint: laloprint, |
| 6 | + //plot: plot, |
| 7 | + //colorplot: colorplot, |
| 8 | + //plot3: plot3, |
| 9 | + //image: image, |
| 10 | + lalo: lalo, |
| 11 | + Lalolab: Lalolab, |
| 12 | + load_data: load_data, |
| 13 | + |
| 14 | + /* laloplots.js (not available in module because need access to global scope and html document) |
| 15 | + Diagram: Diagram, |
| 16 | + Plot: Plot, |
| 17 | + ColorPlot: ColorPlot, |
| 18 | + Plot2D: Plot2D, |
| 19 | + Plot3D: Plot3D, |
| 20 | + */ |
| 21 | + |
| 22 | + // Constants in linalg.js |
| 23 | + LALOLIB_ERROR: LALOLIB_ERROR, |
| 24 | + EPS: EPS, |
| 25 | + |
| 26 | + |
| 27 | + // linalg.js |
| 28 | + isZero: isZero, |
| 29 | + tic: tic, |
| 30 | + toc: toc, |
| 31 | + type: type, |
| 32 | + isArrayOfNumbers: isArrayOfNumbers, |
| 33 | + isScalar: isScalar, |
| 34 | + printVector: printVector, |
| 35 | + Matrix: Matrix, |
| 36 | + array2mat: array2mat, |
| 37 | + array2vec: array2vec, |
| 38 | + size: size, |
| 39 | + ones: ones, |
| 40 | + zeros: zeros, |
| 41 | + eye: eye, |
| 42 | + diag: diag, |
| 43 | + vec: vec, |
| 44 | + matrixCopy: matrixCopy, |
| 45 | + vectorCopy: vectorCopy, |
| 46 | + vectorCopyInto: vectorCopyInto, |
| 47 | + arrayCopy: arrayCopy, |
| 48 | + appendRow: appendRow, |
| 49 | + reshape: reshape, |
| 50 | + get: get, |
| 51 | + getSubMatrix: getSubMatrix, |
| 52 | + getRows: getRows, |
| 53 | + getCols: getCols, |
| 54 | + getSubVector: getSubVector, |
| 55 | + getSubArray: getSubArray, |
| 56 | + getrowref: getrowref, |
| 57 | + set: set, |
| 58 | + setVectorScalar: setVectorScalar, |
| 59 | + setVectorVector: setVectorVector, |
| 60 | + setMatrixScalar: setMatrixScalar, |
| 61 | + setMatrixMatrix: setMatrixMatrix, |
| 62 | + setMatrixColVector: setMatrixColVector, |
| 63 | + setMatrixRowVector: setMatrixRowVector, |
| 64 | + setRows: setRows, |
| 65 | + setCols: setCols, |
| 66 | + dense: dense, |
| 67 | + supp: supp, |
| 68 | + range: range, |
| 69 | + swaprows: swaprows, |
| 70 | + swapcols: swapcols, |
| 71 | + randnScalar: randnScalar, |
| 72 | + randn: randn, |
| 73 | + randVector: randVector, |
| 74 | + randMatrix: randMatrix, |
| 75 | + rand: rand, |
| 76 | + randnsparse: randnsparse, |
| 77 | + randsparse: randsparse, |
| 78 | + randperm: randperm, |
| 79 | + // missing: MathFunctions + MathFunctionsVector... |
| 80 | + apply: apply, |
| 81 | + aaplyVector: applyVector, |
| 82 | + applyMatrix: applyMatrix, |
| 83 | + applyComplexVector: applyComplexVector, |
| 84 | + applyComplexMatrix: applyComplexMatrix, |
| 85 | + mul: mul, |
| 86 | + mulScalarVector: mulScalarVector, |
| 87 | + mulScalarMatrix: mulScalarMatrix, |
| 88 | + dot: dot, |
| 89 | + mulMatrixVector: mulMatrixVector, |
| 90 | + mulMatrixTransVector: mulMatrixTransVector, |
| 91 | + mulMatrixMatrix: mulMatrixMatrix, |
| 92 | + entrywisemulVector: entrywisemulVector, |
| 93 | + entrywisemulMatrix: entrywisemulMatrix, |
| 94 | + entrywisemul: entrywisemul, |
| 95 | + saxpy: saxpy, |
| 96 | + gaxpy: gaxpy, |
| 97 | + divVectorScalar: divVectorScalar, |
| 98 | + divScalarVector: divScalarVector, |
| 99 | + divVectors: divVectors, |
| 100 | + divMatrixScalar: divMatrixScalar, |
| 101 | + divScalarMatrix: divScalarMatrix, |
| 102 | + divMatrices: divMatrices, |
| 103 | + entrywisediv: entrywisediv, |
| 104 | + outerprodVectors: outerprodVectors, |
| 105 | + outerprod: outerprod, |
| 106 | + addScalarVector: addScalarVector, |
| 107 | + addScalarMatrix: addScalarMatrix, |
| 108 | + addVectors: addVectors, |
| 109 | + addMatrices: addMatrices, |
| 110 | + add: add, |
| 111 | + subScalarVector: subScalarVector, |
| 112 | + subVectorScalar: subVectorScalar, |
| 113 | + subScalarMatrix: subScalarMatrix, |
| 114 | + subMatrixScalar: subMatrixScalar, |
| 115 | + subVectors: subVectors, |
| 116 | + subMatrices: subMatrices, |
| 117 | + sub: sub, |
| 118 | + pow: pow, |
| 119 | + minus: minus, |
| 120 | + minusVector: minusVector, |
| 121 | + minusMatrix: minusMatrix, |
| 122 | + minVector: minVector, |
| 123 | + minMatrix: minMatrix, |
| 124 | + minVectorScalar: minVectorScalar, |
| 125 | + minMatrixScalar: minMatrixScalar, |
| 126 | + minMatrixRows: minMatrixRows, |
| 127 | + minMatrixCols: minMatrixCols, |
| 128 | + minVectorVector: minVectorVector, |
| 129 | + minMatrixMatrix: minMatrixMatrix, |
| 130 | + min: min, |
| 131 | + maxVector: maxVector, |
| 132 | + maxMatrix: maxMatrix, |
| 133 | + maxVectorScalar: maxVectorScalar, |
| 134 | + maxMatrixScalar: maxMatrixScalar, |
| 135 | + maxMatrixRows: maxMatrixRows, |
| 136 | + maxMatrixCols: maxMatrixCols, |
| 137 | + maxVectorVector: maxVectorVector, |
| 138 | + maxMatrixMatrix: maxMatrixMatrix, |
| 139 | + max: max, |
| 140 | + transposeMatrix: transposeMatrix, |
| 141 | + transposeVector: transposeVector, |
| 142 | + transpose: transpose, |
| 143 | + det: det, |
| 144 | + trace: trace, |
| 145 | + triiu: triu, |
| 146 | + tril: tril, |
| 147 | + issymmetric: issymmetric, |
| 148 | + mat: mat, |
| 149 | + isEqual: isEqual, |
| 150 | + isNotEqual: isNotEqual, |
| 151 | + isGreater: isGreater, |
| 152 | + isGreaterOrEqual: isGreaterOrEqual, |
| 153 | + isLower: isLower, |
| 154 | + isLowerOrEqual: isLowerOrEqual, |
| 155 | + find: find, |
| 156 | + argmax: argmax, |
| 157 | + findmax: findmax, |
| 158 | + argmin: argmin, |
| 159 | + findmin: findmin, |
| 160 | + sort: sort, |
| 161 | + sumVector: sumVector, |
| 162 | + sumMatrix: sumMatrix, |
| 163 | + sumMatrixRows: sumMatrixRows, |
| 164 | + sumMatrixCols: sumMatrixCols, |
| 165 | + sum: sum, |
| 166 | + prodVector: prodVector, |
| 167 | + prodMatrix: prodMatrix, |
| 168 | + prodMatrixRows: prodMatrixRows, |
| 169 | + prodMatrixCols: prodMatrixCols, |
| 170 | + prod: prod, |
| 171 | + mean: mean, |
| 172 | + variance: variance, |
| 173 | + std: std, |
| 174 | + cov: cov, |
| 175 | + xtx: xtx, |
| 176 | + norm: norm, |
| 177 | + norm1: norm1, |
| 178 | + norminf: norminf, |
| 179 | + normp: normp, |
| 180 | + normnuc: normnuc, |
| 181 | + norm0: norm0, |
| 182 | + norm0Vector: norm0Vector, |
| 183 | + solve: solve, |
| 184 | + cholsolve: cholsolve, |
| 185 | + // solveQR... |
| 186 | + inv: inv, |
| 187 | + chol: chol, |
| 188 | + ldlsymmetricpivoting: ldlsymmetricpivoting, |
| 189 | + qr: qr, |
| 190 | + solvecg: solvecg, |
| 191 | + cgnr: cgnr, |
| 192 | + eig: eig, |
| 193 | + eigs: eigs, |
| 194 | + svd: svd, |
| 195 | + rank: rank, |
| 196 | + nullspace: nullspace, |
| 197 | + orth: orth, |
| 198 | + |
| 199 | + // stats.js |
| 200 | + nchoosek: nchoosek, |
| 201 | + mvnrnd: mvnrnd, |
| 202 | + Distribution: Distribution, |
| 203 | + Uniform: Uniform, |
| 204 | + Gaussian: Gaussian, |
| 205 | + mvGaussian: mvGaussian, |
| 206 | + Bernoulli: Bernoulli, |
| 207 | + Poisson: Poisson, |
| 208 | + |
| 209 | + // sparse.js |
| 210 | + spVector: spVector, |
| 211 | + spMatrix: spMatrix, |
| 212 | + spgetRows: spgetRows, |
| 213 | + fullVector: fullVector, |
| 214 | + fullMatrix: fullMatrix, |
| 215 | + full: full, |
| 216 | + sparseVector: sparseVector, |
| 217 | + sparseMatrix: sparseMatrix, |
| 218 | + sparseMatrixRowMajor: sparseMatrixRowMajor, |
| 219 | + sparse: sparse, |
| 220 | + speye: speye, |
| 221 | + spdiag: spdiag, |
| 222 | + transposespVector: transposespVector, |
| 223 | + transposespMatrix: transposespMatrix, |
| 224 | + spmat: spmat, |
| 225 | + mulScalarspVector: mulScalarspVector, |
| 226 | + mulScalarspMatrix: mulScalarspMatrix, |
| 227 | + spdot: spdot, |
| 228 | + dotspVectorVector: dotspVectorVector, |
| 229 | + mulMatrixspVector: mulMatrixspVector, |
| 230 | + mulspMatrixVector: mulspMatrixVector, |
| 231 | + mulspMatrixTransVector: mulspMatrixTransVector, |
| 232 | + mulspMatrixspVector: mulspMatrixspVector, |
| 233 | + mulspMatrixTransspVector: mulspMatrixTransspVector, |
| 234 | + mulspMatrixspMatrix: mulspMatrixspMatrix, |
| 235 | + mulMatrixspMatrix: mulMatrixspMatrix, |
| 236 | + mulspMatrixMatrix: mulspMatrixMatrix, |
| 237 | + entrywisemulspVectors: entrywisemulspVectors, |
| 238 | + entrywisemulspVectorVector: entrywisemulspVectorVector, |
| 239 | + entrywisemulspMatrices: entrywisemulspMatrices, |
| 240 | + entrywisemulspMatrixMatrix: entrywisemulspMatrixMatrix, |
| 241 | + addScalarspVector: addScalarspVector, |
| 242 | + addVectorspVector: addVectorspVector, |
| 243 | + addspVectors: addspVectors, |
| 244 | + addScalarspMatrix: addScalarspMatrix, |
| 245 | + addMatrixspMatrix: addMatrixspMatrix, |
| 246 | + addspMatrices: addspMatrices, |
| 247 | + spsaxpy: spsaxpy, |
| 248 | + subScalarspVector: subScalarspVector, |
| 249 | + subVectorspVector: subVectorspVector, |
| 250 | + subspVectorVector: subspVectorVector, |
| 251 | + subspVectors: subspVectors, |
| 252 | + subScalarspMatrix: subScalarspMatrix, |
| 253 | + subspMatrixMatrix: subspMatrixMatrix, |
| 254 | + subMatrixspMatrix: subMatrixspMatrix, |
| 255 | + subspMatrices: subspMatrices, |
| 256 | + applyspVector: applyspVector, |
| 257 | + applyspMatrix: applyspMatrix, |
| 258 | + sumspVector: sumspVector, |
| 259 | + sumspMatrix: sumspMatrix, |
| 260 | + sumspMatrixRows: sumspMatrixRows, |
| 261 | + sumspMatrixCols: sumspMatrixCols, |
| 262 | + prodspMatrixRows: prodspMatrixRows, |
| 263 | + prodspMatrixCols: prodspMatrixCols, |
| 264 | + |
| 265 | + // complex.js |
| 266 | + Complex: Complex, |
| 267 | + addComplex: addComplex, |
| 268 | + addComplexReal: addComplexReal, |
| 269 | + subComplex: subComplex, |
| 270 | + minusComplex: minusComplex, |
| 271 | + mulComplex: mulComplex, |
| 272 | + mulComplexReal: mulComplexReal, |
| 273 | + divComplex: divComplex, |
| 274 | + conj: conj, |
| 275 | + modulus: modulus, |
| 276 | + absComplex: absComplex, |
| 277 | + expComplex: expComplex, |
| 278 | + ComplexVector: ComplexVector, |
| 279 | + ComplexMatrix: ComplexMatrix, |
| 280 | + real: real, |
| 281 | + imag: imag, |
| 282 | + transposeComplexMatrix: transposeComplexMatrix, |
| 283 | + addComplexVectors: addComplexVectors, |
| 284 | + subComplexVectors: subComplexVectors, |
| 285 | + addComplexMatrices: addComplexMatrices, |
| 286 | + subComplexMatrices: subComplexMatrices, |
| 287 | + addComplexVectorVector: addComplexVectorVector, |
| 288 | + subComplexVectorVector: subComplexVectorVector, |
| 289 | + addComplexMatrixMatrix: addComplexMatrixMatrix, |
| 290 | + subComplexMatrixMatrix: subComplexMatrixMatrix, |
| 291 | + addScalarComplexVector: addScalarComplexVector, |
| 292 | + subScalarComplexVector: subScalarComplexVector, |
| 293 | + addScalarComplexMatrix: addScalarComplexMatrix, |
| 294 | + entrywisemulComplexVectors: entrywisemulComplexVectors, |
| 295 | + entrywisedivComplexVectors: entrywisedivComplexVectors, |
| 296 | + entrywisemulComplexMatrices: entrywisemulComplexMatrices, |
| 297 | + entrywisedivComplexMatrices: entrywisedivComplexMatrices, |
| 298 | + entrywisemulComplexVectorVector: entrywisemulComplexVectorVector, |
| 299 | + entrywisemulComplexMatrixMatrix: entrywisemulComplexMatrixMatrix, |
| 300 | + minusComplexVector: minusComplexVector, |
| 301 | + minusComplexMatrix: minusComplexMatrix, |
| 302 | + sumComplexVector: sumComplexVector, |
| 303 | + sumComplexMatrix: sumComplexMatrix, |
| 304 | + norm1ComplexVector: norm1ComplexVector, |
| 305 | + norm2ComplexVector: norm2ComplexVector, |
| 306 | + normFroComplexMatrix: normFroComplexMatrix, |
| 307 | + dotComplexVectors: dotComplexVectors, |
| 308 | + dotComplexVectorVector: dotComplexVectorVector, |
| 309 | + mulScalarComplexVector: mulScalarComplexVector, |
| 310 | + mulComplexComplexVector: mulComplexComplexVector, |
| 311 | + mulComplexVector: mulComplexVector, |
| 312 | + mulScalarComplexMatrix: mulScalarComplexMatrix, |
| 313 | + mulComplexComplexMatrix: mulComplexComplexMatrix, |
| 314 | + mulComplexMatrix: mulComplexMatrix, |
| 315 | + mulComplexMatrixVector: mulComplexMatrixVector, |
| 316 | + mulComplexMatrixComplexVector: mulComplexMatrixComplexVector, |
| 317 | + mulComplexMatrices: mulComplexMatrices, |
| 318 | + mulComplexMatrixMatrix: mulComplexMatrixMatrix, |
| 319 | + fft: fft, |
| 320 | + ifft: ifft, |
| 321 | + dft: dft, |
| 322 | + idft: idft, |
| 323 | + spectrum: spectrum, |
| 324 | + |
| 325 | + |
| 326 | + // laloglpk.js |
| 327 | + lp: lp, |
| 328 | + linprog: linprog, |
| 329 | + minl1: minl1, |
| 330 | + minl0: minl0, |
| 331 | + qp: qp, |
| 332 | + quadprog: quadprog, |
| 333 | + minimize: minimize, |
| 334 | + secant: secant, |
| 335 | + steepestdescent: steepestdescent, |
| 336 | + bfgs: bfgs |
| 337 | + |
| 338 | +} |
| 339 | +})(); |
0 commit comments