<commit_before>m.js
====

JavaScript matrix math library with numeric algorithms that uses typed arrays.

### Basic ideas
* Use typed arrays (e.g. ```Float32Array```) for matrix data.
* Encourage efficient usage patterns through API conventions.

### Matrix layout
For a matrix with 3 rows and 4 columns, the data is arranged like this in the array:
```
[ a11, a12, a13, a14,
  a21, a22, a23, a24
  a31, a32, a33, a34 ]
```

### Example
```js
var A = m.create(3,3);      // Create 3x3 matrix
var b = m.create(3,1);      // Create column vector, right-hand-side
m.ones(b);                  // Set RHS to ones
var x = m.cholsolve(A,b);   // Solve system
```<commit_msg>added example to readme<commit_after>m.js
====

JavaScript matrix math library with numeric algorithms that uses typed arrays.

### Basic ideas
* Use typed arrays (e.g. ```Float32Array```) for matrix data. This enables fast data passing to/from WebWorkers/WebGL.
* Encourage efficient usage patterns through API conventions.

### Matrix layout
For a matrix with 3 rows and 4 columns, the data is arranged like this in the array:
```
[ a11, a12, a13, a14,
  a21, a22, a23, a24
  a31, a32, a33, a34 ]
```

### Example
```js
var A = m.create(3,3);      // Create 3x3 matrix
var b = m.create(3,1);      // Create 1D column vector of length 3
m.identity(A);              // Set matrix A to identity
m.ones(b);                  // Set all elements in b to 1
var x = m.cholsolve(A,b);   // Solve system A*x=b using cholesky factorization
```
{'fraction_non_alphanumeric': 0.12658227848101267, 'fraction_numerical': 0.04730179880079947, 'mean_word_length': 3.115068493150685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6085736', 'n_tokens_mistral': 535, 'n_tokens_neox': 480, 'n_words': 198}