Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
noahwillcrow committed Feb 16, 2019
1 parent 8e07243 commit 66439c2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ A simple script to implement linear algebra functions not provided by the Lua st
Documentation
---

### Matrix Functions
#### Matrix Instantiation Functions

<details>
<summary><code>linalg.matrix.new = function(rows)</code></summary>

Expand Down Expand Up @@ -85,6 +88,8 @@ An n-length array whose entries will be set as the diagonal entries

</details>

#### Matrix Classification Functions

<details>
<summary><code>linalg.matrix.isDiagonal = function(mat)</code></summary>

Expand Down Expand Up @@ -134,6 +139,8 @@ True if the matrix is lower triangular, false otherwise

</details>

#### Basic Matrix Operation Functions

<details>
<summary><code>linalg.matrix.transpose = function(mat)</code></summary>

Expand Down Expand Up @@ -167,6 +174,23 @@ The matrix exponential approximation

</details>

### Vector Functions
#### Vector Instantiation Functions

<details>
<summary><code>linalg.vector.new = function(values)</code></summary>

Creates a new column vector

**Parameters:**
- `values` (`array<number>`)
The values to have for the column vector

**Returns:**
[t:(n x 1) matrix] The new column vector

</details>

<details>
<summary><code>linalg.vector.e = function(i, n)</code></summary>

Expand All @@ -184,6 +208,8 @@ The dimensionality of the vector

</details>

#### Vector Norm Functions

<details>
<summary><code>linalg.vector.norm.l1 = function(v)</code></summary>

Expand Down Expand Up @@ -232,6 +258,8 @@ The resulting value

</details>

#### Vector Inner Product Functions

<details>
<summary><code>linalg.vector.ip.dot = function(v1, v2)</code></summary>

Expand All @@ -250,6 +278,8 @@ The result

</details>

#### Basic Vector Operation Functions

<details>
<summary><code>linalg.vector.project = function (v, u, innerProductFunc, normFunc)</code></summary>

Expand Down Expand Up @@ -304,6 +334,8 @@ The angle to rotate by (in radians)

</details>

#### Vector Space Functions

<details>
<summary><code>linalg.gramSchmidt = function (u, epsilon, dim, innerProductFunc, normFunc)</code></summary>

Expand Down
7 changes: 7 additions & 0 deletions lib/linalg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,13 @@ end
-- VECTOR FUNCTIONS
linalg.vector = {}

--[[**
Creates a new column vector
@param [t:array<number>] values The values to have for the column vector
@returns [t:(n x 1) matrix] The new column vector
**--]]
linalg.vector.new = function(values)
local rows = {}

Expand Down

0 comments on commit 66439c2

Please sign in to comment.