Finished with Matrix (for now)

This commit is contained in:
Chris 2019-07-09 19:22:15 -07:00
parent 6e67ceb81b
commit 4caeddef72
No known key found for this signature in database
GPG Key ID: 37DAEF5F446370A4
18 changed files with 360 additions and 278 deletions

View File

@ -26,7 +26,7 @@ Check out the [documentation](https://watzon.github.io/apatite/) for usage examp
- [ ] Linear Algebra - [ ] Linear Algebra
- [x] Vector - [x] Vector
- [ ] Matrix (_in progress_) - [x] Matrix
- [ ] NDArray - [ ] NDArray
- [ ] Line - [ ] Line
- [ ] Plane - [ ] Plane

View File

@ -171,28 +171,28 @@ of Crystal.</p>
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L1" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L1" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra.cr#L6" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra.cr#L6" target="_blank">
apatite/linear_algebra.cr apatite/linear_algebra.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite.cr#L10" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite.cr#L10" target="_blank">
apatite.cr apatite.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/version.cr#L1" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/version.cr#L1" target="_blank">
apatite/version.cr apatite/version.cr
</a> </a>

View File

@ -163,49 +163,49 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L2" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L2" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L4" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L4" target="_blank">
apatite/linear_algebra/vector.cr apatite/linear_algebra/vector.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix/eigenvalue_decomposition.cr#L1" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix/eigenvalue_decomposition.cr#L1" target="_blank">
apatite/linear_algebra/matrix/eigenvalue_decomposition.cr apatite/linear_algebra/matrix/eigenvalue_decomposition.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix/lup_decomposition.cr#L1" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix/lup_decomposition.cr#L1" target="_blank">
apatite/linear_algebra/matrix/lup_decomposition.cr apatite/linear_algebra/matrix/lup_decomposition.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix.cr#L6" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix.cr#L5" target="_blank">
apatite/linear_algebra/matrix.cr apatite/linear_algebra/matrix.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra.cr#L7" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra.cr#L7" target="_blank">
apatite/linear_algebra.cr apatite/linear_algebra.cr
</a> </a>
<br/> <br/>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L1" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L1" target="_blank">
apatite/linear_algebra/ndarray.cr apatite/linear_algebra/ndarray.cr
</a> </a>
@ -271,7 +271,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra.cr#L15" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra.cr#L15" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -291,7 +291,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra.cr#L23" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra.cr#L23" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -151,7 +151,7 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L4" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L4" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>

View File

@ -151,7 +151,7 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L6" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L6" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>

View File

@ -151,7 +151,7 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L8" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L8" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>
@ -238,7 +238,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L9" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L9" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -164,7 +164,7 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L3" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L3" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>

File diff suppressed because it is too large Load Diff

View File

@ -163,7 +163,7 @@ equal to the eigenvalues and V is formed by the eigenvectors.</p>
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix/eigenvalue_decomposition.cr#L12" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix/eigenvalue_decomposition.cr#L12" target="_blank">
apatite/linear_algebra/matrix/eigenvalue_decomposition.cr apatite/linear_algebra/matrix/eigenvalue_decomposition.cr
</a> </a>
@ -230,7 +230,7 @@ equal to the eigenvalues and V is formed by the eigenvectors.</p>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix/eigenvalue_decomposition.cr#L13" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix/eigenvalue_decomposition.cr#L13" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -163,7 +163,7 @@ linear equations. This will fail if singular? returns true.</p>
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix/lup_decomposition.cr#L12" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix/lup_decomposition.cr#L12" target="_blank">
apatite/linear_algebra/matrix/lup_decomposition.cr apatite/linear_algebra/matrix/lup_decomposition.cr
</a> </a>
@ -230,7 +230,7 @@ linear equations. This will fail if singular? returns true.</p>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/matrix/lup_decomposition.cr#L13" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/matrix/lup_decomposition.cr#L13" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -162,7 +162,7 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L2" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L2" target="_blank">
apatite/linear_algebra/ndarray.cr apatite/linear_algebra/ndarray.cr
</a> </a>
@ -363,7 +363,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L18" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L18" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -386,7 +386,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -402,7 +402,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -418,7 +418,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L13" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L13" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -434,7 +434,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L12" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L12" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -450,7 +450,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L12" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L12" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -468,7 +468,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L24" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L24" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -486,7 +486,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L29" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L29" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -502,7 +502,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L9" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L9" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -518,7 +518,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -534,7 +534,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L16" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L16" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -550,7 +550,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L16" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L16" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -566,7 +566,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L15" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L15" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -582,7 +582,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L15" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L15" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -598,7 +598,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L14" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L14" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -614,7 +614,7 @@
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/ndarray.cr#L14" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/ndarray.cr#L14" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -167,7 +167,7 @@ of a <code><a href="../../Apatite/LinearAlgebra/Matrix.html">Matrix</a></code></
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L7" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L7" target="_blank">
apatite/linear_algebra/vector.cr apatite/linear_algebra/vector.cr
</a> </a>
@ -505,7 +505,7 @@ of a <code><a href="../../Apatite/LinearAlgebra/Matrix.html">Matrix</a></code></
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L22" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L22" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -523,7 +523,7 @@ of a <code><a href="../../Apatite/LinearAlgebra/Matrix.html">Matrix</a></code></
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L34" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L34" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -542,7 +542,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L28" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L28" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -560,7 +560,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L53" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L53" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -583,7 +583,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L60" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L60" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -601,7 +601,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L75" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L75" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -619,7 +619,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L90" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L90" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -637,7 +637,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L105" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L105" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -655,7 +655,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L129" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L129" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -673,7 +673,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L120" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L120" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -691,7 +691,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L138" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L138" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -709,7 +709,7 @@ whether the array itself or a copy is used internally.</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L147" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L147" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -728,7 +728,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L249" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L249" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -746,7 +746,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L193" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L193" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -764,7 +764,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L170" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L170" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -782,7 +782,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L207" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L207" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -798,7 +798,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L14" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L14" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -814,7 +814,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L14" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L14" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -832,7 +832,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L212" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L212" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -850,7 +850,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L198" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L198" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -866,7 +866,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L286" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L286" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -884,7 +884,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L221" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L221" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -900,7 +900,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L151" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L151" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -916,7 +916,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L156" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L156" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -934,7 +934,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L226" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L226" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -952,7 +952,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L231" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L231" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -970,7 +970,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L238" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L238" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -988,7 +988,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L243" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L243" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -1006,7 +1006,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L268" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L268" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -1024,7 +1024,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L273" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L273" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -1040,7 +1040,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L277" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L277" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -1056,7 +1056,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L290" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L290" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -1074,7 +1074,7 @@ in the matrix to another type. The type</p></div>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/vector.cr#L282" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L282" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -151,7 +151,7 @@
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/linear_algebra/error.cr#L5" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/error.cr#L5" target="_blank">
apatite/linear_algebra/error.cr apatite/linear_algebra/error.cr
</a> </a>

View File

@ -200,7 +200,7 @@ set <span class="o">&lt;&lt;</span> <span class="n">3</span></code></pre>
<h2>Defined in:</h2> <h2>Defined in:</h2>
<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/core_ext/array.cr#L1" target="_blank"> <a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/core_ext/array.cr#L1" target="_blank">
apatite/core_ext/array.cr apatite/core_ext/array.cr
</a> </a>
@ -334,7 +334,7 @@ set <span class="o">&lt;&lt;</span> <span class="n">3</span></code></pre>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/core_ext/array.cr#L3" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/core_ext/array.cr#L3" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -352,7 +352,7 @@ set <span class="o">&lt;&lt;</span> <span class="n">3</span></code></pre>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/core_ext/array.cr#L11" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/core_ext/array.cr#L11" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -370,7 +370,7 @@ set <span class="o">&lt;&lt;</span> <span class="n">3</span></code></pre>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/core_ext/array.cr#L19" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/core_ext/array.cr#L19" target="_blank">View source</a>]
</div> </div>
</div> </div>
@ -386,7 +386,7 @@ set <span class="o">&lt;&lt;</span> <span class="n">3</span></code></pre>
<br/> <br/>
<div> <div>
[<a href="https://github.com/watzon/apatite/blob/06bd6fa4ee11fe383cfa0fae10d396c06768c07e/src/apatite/core_ext/array.cr#L24" target="_blank">View source</a>] [<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/core_ext/array.cr#L24" target="_blank">View source</a>]
</div> </div>
</div> </div>

View File

@ -149,7 +149,7 @@
<h2>Roadmap</h2> <h2>Roadmap</h2>
<ul><li>[ ] Linear Algebra</li><li>[x] Vector</li><li>[ ] Matrix (_in progress_)</li><li>[ ] NDArray</li><li>[ ] Line</li><li>[ ] Plane</li><li>[ ] Polygon</li><li>[ ] LinkedList <ul><li>[ ] Linear Algebra</li><li>[x] Vector</li><li>[x] Matrix</li><li>[ ] NDArray</li><li>[ ] Line</li><li>[ ] Plane</li><li>[ ] Polygon</li><li>[ ] LinkedList
</li></ul> </li></ul>
<h2>Contributing</h2> <h2>Contributing</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,3 @@
require "json"
require "./vector" require "./vector"
require "./matrix/eigenvalue_decomposition" require "./matrix/eigenvalue_decomposition"
require "./matrix/lup_decomposition" require "./matrix/lup_decomposition"
@ -98,6 +97,7 @@ module Apatite::LinearAlgebra
new(rows) new(rows)
end end
# ditto
def self.diagonal(*values : T) def self.diagonal(*values : T)
diagonal(values, nil) diagonal(values, nil)
end end
@ -1367,6 +1367,36 @@ module Apatite::LinearAlgebra
Matrix.rows(rws) Matrix.rows(rws)
end end
# Returns an array of the row vectors of the matrix. See `Vector`.
def row_vectors
Array.new(row_count) {|i|
row(i)
}
end
# Returns an array of the column vectors of the matrix. See `Vector`.
def column_vectors
Array.new(column_count) {|i|
column(i)
}
end
# Returns an array of arrays that describe the rows of the matrix.
def to_a
@rows.clone
end
# Convert the matrix to a json array
def to_json(json : JSON::Builder)
json.array do
each &.to_json(json)
end
end
#--
# PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
def to_s(io) def to_s(io)
if empty? if empty?
"Matrix.empty(#{row_count}, #{column_count})" "Matrix.empty(#{row_count}, #{column_count})"
@ -1390,17 +1420,6 @@ module Apatite::LinearAlgebra
end end
end end
def to_json(json : JSON::Builder)
json.array do
each &.to_json(json)
end
end
# Returns this matrix as an `Array(Array(T))`
def to_a
@rows.clone
end
def unsafe_fetch(i) def unsafe_fetch(i)
@rows.unsafe_fetch(i) @rows.unsafe_fetch(i)
end end