Add docs
This commit is contained in:
parent
6c8ee1fded
commit
bb0f2c4332
|
@ -0,0 +1,529 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="generator" content="Crystal Docs 0.29.0">
|
||||||
|
|
||||||
|
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="js/doc.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDoc.base_path = "";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta id="repository-name" content="github.com/watzon/apatite">
|
||||||
|
<title>Apatite - github.com/watzon/apatite</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="repository-links">
|
||||||
|
<a href="index.html">README</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" class="hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="github.com/watzon/apatite/Apatite" data-name="apatite">
|
||||||
|
<a href="Apatite.html">Apatite</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra" data-name="apatite::linearalgebra">
|
||||||
|
<a href="Apatite/LinearAlgebra.html">LinearAlgebra</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix" data-name="apatite::linearalgebra::matrix">
|
||||||
|
<a href="Apatite/LinearAlgebra/Matrix.html">Matrix</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/NDArray" data-name="apatite::linearalgebra::ndarray">
|
||||||
|
<a href="Apatite/LinearAlgebra/NDArray.html">NDArray</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Vector" data-name="apatite::linearalgebra::vector">
|
||||||
|
<a href="Apatite/LinearAlgebra/Vector.html">Vector</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Array" data-name="array(t)">
|
||||||
|
<a href="Array.html">Array</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">module</span> Apatite
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Overview</h2>
|
||||||
|
|
||||||
|
<p>Apatite is a fundimental package for scientific computing in Crystal. If that
|
||||||
|
sounds like a modified version of the first line from the NumPy homepage,
|
||||||
|
that's because it is. Apatite has (ok, will have) all of the goodness
|
||||||
|
of NumPy sitting atop the blazing speed and beautiful syntax
|
||||||
|
of Crystal.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Included Modules</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type"><a href="Apatite/LinearAlgebra.html">Apatite::LinearAlgebra</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Extended Modules</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type"><a href="Apatite.html">Apatite</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Defined in:</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L1" target="_blank">
|
||||||
|
apatite/linear_algebra/ndarray.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra.cr#L5" target="_blank">
|
||||||
|
apatite/linear_algebra.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L10" target="_blank">
|
||||||
|
apatite.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/version.cr#L1" target="_blank">
|
||||||
|
apatite/version.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Constant Summary</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt class="entry-const" id="I">
|
||||||
|
<strong>I</strong> = <code><span class="t">Vector</span><span class="t">::</span><span class="t">I</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd class="entry-const-doc">
|
||||||
|
<p>Cartesian unit vector I</p>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="J">
|
||||||
|
<strong>J</strong> = <code><span class="t">Vector</span><span class="t">::</span><span class="t">J</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd class="entry-const-doc">
|
||||||
|
<p>Cartesian unit vector J</p>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="K">
|
||||||
|
<strong>K</strong> = <code><span class="t">Vector</span><span class="t">::</span><span class="t">K</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<dd class="entry-const-doc">
|
||||||
|
<p>Cartesian unit vector K</p>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="VERSION">
|
||||||
|
<strong>VERSION</strong> = <code><span class="s">"0.1.0"</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Class Method Summary</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#approx_precision-class-method" class="signature"><strong>.approx_precision</strong></a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#approx_precision%3D%28approx_precision%29-class-method" class="signature"><strong>.approx_precision=</strong>(approx_precision)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#precision-class-method" class="signature"><strong>.precision</strong></a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#precision%3D%28precision%29-class-method" class="signature"><strong>.precision=</strong>(precision)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Summary</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#as_vector%28input%3AIndexable%29-instance-method" class="signature"><strong>#as_vector</strong>(input : Indexable)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Creates a new vector from the given <code>input</code>.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#basis%28size%2Cindex%29-instance-method" class="signature"><strong>#basis</strong>(size, index)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns a standard basis-n vector of the given <code>size</code> and <code>index</code>.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#empty-instance-method" class="signature"><strong>#empty</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns a new empty <code><a href="Apatite/LinearAlgebra/Vector.html">Vector</a></code></p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#full%28n%2Ci%29-instance-method" class="signature"><strong>#full</strong>(n, i)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns a new vector of size <code>n</code> filled with <code>i</code></p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#ones%28n%29-instance-method" class="signature"><strong>#ones</strong>(n)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns a new vector filled with <code>n</code> ones.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#vector%28n%2C%26block%29-instance-method" class="signature"><strong>#vector</strong>(n, &block)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Creates a new vector of size <code>n</code>, and invokes the block once for each index of <code>self</code>, assigning the block's value in that index.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#zeros%28n%29-instance-method" class="signature"><strong>#zeros</strong>(n)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns a new vector filled with <code>n</code> zeros.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Instance methods inherited from module <code><a href="Apatite/LinearAlgebra.html">Apatite::LinearAlgebra</a></code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="Apatite/LinearAlgebra.html#sigmoid%28input%3ANumber%29-instance-method" class="tooltip">
|
||||||
|
<span>sigmoid(input : Number)</span>
|
||||||
|
sigmoid</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="Apatite/LinearAlgebra.html#sigmoid_d%28input%3ANumber%29-instance-method" class="tooltip">
|
||||||
|
<span>sigmoid_d(input : Number)</span>
|
||||||
|
sigmoid_d</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Class Method Detail</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="approx_precision-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>approx_precision</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#approx_precision-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L17" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="approx_precision=(approx_precision)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>approx_precision=</strong>(approx_precision)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#approx_precision%3D%28approx_precision%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L21" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="precision-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>precision</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#precision-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L16" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="precision=(precision)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>precision=</strong>(precision)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#precision%3D%28precision%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L20" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Detail</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="as_vector(input:Indexable)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>as_vector</strong>(input : Indexable)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#as_vector%28input%3AIndexable%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Creates a new vector from the given <code>input</code>. Input can be any
|
||||||
|
<code>Indexable</code> type.</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L58" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="basis(size,index)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>basis</strong>(size, index)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#basis%28size%2Cindex%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns a standard basis-n vector of the given <code>size</code> and <code>index</code>.</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L63" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="empty-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>empty</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#empty-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns a new empty <code><a href="Apatite/LinearAlgebra/Vector.html">Vector</a></code></p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L31" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="full(n,i)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>full</strong>(n, i)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#full%28n%2Ci%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns a new vector of size <code>n</code> filled with <code>i</code></p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L46" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="ones(n)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>ones</strong>(n)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#ones%28n%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns a new vector filled with <code>n</code> ones.</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L36" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="vector(n,&block)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>vector</strong>(n, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#vector%28n%2C%26block%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Creates a new vector of size <code>n</code>, and invokes the block once
|
||||||
|
for each index of <code>self</code>, assigning the block's value in that index.</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L52" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="zeros(n)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>zeros</strong>(n)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#zeros%28n%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns a new vector filled with <code>n</code> zeros.</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite.cr#L41" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,245 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="generator" content="Crystal Docs 0.29.0">
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDoc.base_path = "../";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta id="repository-name" content="github.com/watzon/apatite">
|
||||||
|
<title>Apatite::LinearAlgebra - github.com/watzon/apatite</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="repository-links">
|
||||||
|
<a href="../index.html">README</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" class="hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="github.com/watzon/apatite/Apatite" data-name="apatite">
|
||||||
|
<a href="../Apatite.html">Apatite</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="github.com/watzon/apatite/Apatite/LinearAlgebra" data-name="apatite::linearalgebra">
|
||||||
|
<a href="../Apatite/LinearAlgebra.html">LinearAlgebra</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix" data-name="apatite::linearalgebra::matrix">
|
||||||
|
<a href="../Apatite/LinearAlgebra/Matrix.html">Matrix</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/NDArray" data-name="apatite::linearalgebra::ndarray">
|
||||||
|
<a href="../Apatite/LinearAlgebra/NDArray.html">NDArray</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Vector" data-name="apatite::linearalgebra::vector">
|
||||||
|
<a href="../Apatite/LinearAlgebra/Vector.html">Vector</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Array" data-name="array(t)">
|
||||||
|
<a href="../Array.html">Array</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">module</span> Apatite::LinearAlgebra
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Extended Modules</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type"><a href="../Apatite/LinearAlgebra.html">Apatite::LinearAlgebra</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Direct including types</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type"><a href="../Apatite.html">Apatite</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Defined in:</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L1" target="_blank">
|
||||||
|
apatite/linear_algebra/ndarray.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/vector.cr#L1" target="_blank">
|
||||||
|
apatite/linear_algebra/vector.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/matrix.cr#L3" target="_blank">
|
||||||
|
apatite/linear_algebra/matrix.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra.cr#L6" target="_blank">
|
||||||
|
apatite/linear_algebra.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Summary</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#sigmoid%28input%3ANumber%29-instance-method" class="signature"><strong>#sigmoid</strong>(input : Number)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Calculates the sigmoid curve for a numeric input.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#sigmoid_d%28input%3ANumber%29-instance-method" class="signature"><strong>#sigmoid_d</strong>(input : Number)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Calculates the derivative sigmoid curve for a numeric input.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Detail</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="sigmoid(input:Number)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>sigmoid</strong>(input : Number)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#sigmoid%28input%3ANumber%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Calculates the sigmoid curve for a numeric input.</p>
|
||||||
|
|
||||||
|
<p>f(x) = 1/(1 + e^-x)</p>
|
||||||
|
|
||||||
|
<p>See also: <a href="https://www.wikiwand.com/en/Sigmoid_function" target="_blank">Sigmoid function [WikiWand</a></p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra.cr#L14" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="sigmoid_d(input:Number)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>sigmoid_d</strong>(input : Number)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#sigmoid_d%28input%3ANumber%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Calculates the derivative sigmoid curve for a numeric input.</p>
|
||||||
|
|
||||||
|
<p>f'(x) = f(x)(1 - f(x)),</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra.cr#L22" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,589 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="generator" content="Crystal Docs 0.29.0">
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../../css/style.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../../js/doc.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDoc.base_path = "../../";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta id="repository-name" content="github.com/watzon/apatite">
|
||||||
|
<title>Apatite::LinearAlgebra::NDArray - github.com/watzon/apatite</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="repository-links">
|
||||||
|
<a href="../../index.html">README</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" class="hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="github.com/watzon/apatite/Apatite" data-name="apatite">
|
||||||
|
<a href="../../Apatite.html">Apatite</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="github.com/watzon/apatite/Apatite/LinearAlgebra" data-name="apatite::linearalgebra">
|
||||||
|
<a href="../../Apatite/LinearAlgebra.html">LinearAlgebra</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix" data-name="apatite::linearalgebra::matrix">
|
||||||
|
<a href="../../Apatite/LinearAlgebra/Matrix.html">Matrix</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/NDArray" data-name="apatite::linearalgebra::ndarray">
|
||||||
|
<a href="../../Apatite/LinearAlgebra/NDArray.html">NDArray</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Vector" data-name="apatite::linearalgebra::vector">
|
||||||
|
<a href="../../Apatite/LinearAlgebra/Vector.html">Vector</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Array" data-name="array(t)">
|
||||||
|
<a href="../../Array.html">Array</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">class</span> Apatite::LinearAlgebra::NDArray
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../../Apatite/LinearAlgebra/NDArray.html">Apatite::LinearAlgebra::NDArray</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Included Modules</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type">Comparable(<a href="../../Apatite/LinearAlgebra/NDArray.html">Apatite::LinearAlgebra::NDArray</a>)</li>
|
||||||
|
|
||||||
|
<li class="other-type">Enumerable(Float64)</li>
|
||||||
|
|
||||||
|
<li class="other-type">Indexable(Float64)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Defined in:</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L2" target="_blank">
|
||||||
|
apatite/linear_algebra/ndarray.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Constructors</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28data%3AArray%28Number%29%2Cshape%3AArray%28Int32%29%3F%3Dnil%29-class-method" class="signature"><strong>.new</strong>(data : Array(Number), shape : Array(Int32)? = <span class="n">nil</span>)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Summary</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#%5B%5D%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#[]</strong>(*args, **options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#%5B%5D%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#[]</strong>(*args, **options, &block)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#%5B%5D%3D%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#[]=</strong>(*args, **options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#%5B%5D%3F%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#[]?</strong>(*args, **options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#%5B%5D%3F%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#[]?</strong>(*args, **options, &block)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#abs-instance-method" class="signature"><strong>#abs</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns the absolute value of every item in the array</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#acos-instance-method" class="signature"><strong>#acos</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns the arccosine of each element in the current array.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#data%3AArray%28Float64%29-instance-method" class="signature"><strong>#data</strong> : Array(Float64)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#shape%3AArray%28Int32%29-instance-method" class="signature"><strong>#shape</strong> : Array(Int32)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#size</strong>(*args, **options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#size</strong>(*args, **options, &block)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#to_unsafe%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#to_unsafe</strong>(*args, **options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#to_unsafe%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#to_unsafe</strong>(*args, **options, &block)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#unsafe_fetch%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#unsafe_fetch</strong>(*args, **options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#unsafe_fetch%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#unsafe_fetch</strong>(*args, **options, &block)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Constructor Detail</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(data:Array(Number),shape:Array(Int32)?=nil)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(data : <a href="../../Array.html">Array</a>(Number), shape : <a href="../../Array.html">Array</a>(Int32)? = <span class="n">nil</span>)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28data%3AArray%28Number%29%2Cshape%3AArray%28Int32%29%3F%3Dnil%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L18" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Detail</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="[](*args,**options)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>[]</strong>(*args, **options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#%5B%5D%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="[](*args,**options,&block)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>[]</strong>(*args, **options, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#%5B%5D%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="[]=(*args,**options)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>[]=</strong>(*args, **options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#%5B%5D%3D%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L13" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="[]?(*args,**options)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>[]?</strong>(*args, **options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#%5B%5D%3F%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L12" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="[]?(*args,**options,&block)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>[]?</strong>(*args, **options, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#%5B%5D%3F%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L12" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="abs-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>abs</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#abs-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns the absolute value of every item in the array</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L24" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="acos-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>acos</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#acos-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Returns the arccosine of each element in the current array.</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L29" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="data:Array(Float64)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>data</strong> : <a href="../../Array.html">Array</a>(Float64)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#data%3AArray%28Float64%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L9" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="shape:Array(Int32)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>shape</strong> : <a href="../../Array.html">Array</a>(Int32)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#shape%3AArray%28Int32%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L11" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="size(*args,**options)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>size</strong>(*args, **options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L16" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="size(*args,**options,&block)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>size</strong>(*args, **options, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L16" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="to_unsafe(*args,**options)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>to_unsafe</strong>(*args, **options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#to_unsafe%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L15" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="to_unsafe(*args,**options,&block)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>to_unsafe</strong>(*args, **options, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#to_unsafe%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L15" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="unsafe_fetch(*args,**options)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>unsafe_fetch</strong>(*args, **options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#unsafe_fetch%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L14" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="unsafe_fetch(*args,**options,&block)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>unsafe_fetch</strong>(*args, **options, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#unsafe_fetch%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/linear_algebra/ndarray.cr#L14" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,361 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="generator" content="Crystal Docs 0.29.0">
|
||||||
|
|
||||||
|
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="js/doc.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDoc.base_path = "";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta id="repository-name" content="github.com/watzon/apatite">
|
||||||
|
<title>Array(T) - github.com/watzon/apatite</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="repository-links">
|
||||||
|
<a href="index.html">README</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" class="hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="github.com/watzon/apatite/Apatite" data-name="apatite">
|
||||||
|
<a href="Apatite.html">Apatite</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra" data-name="apatite::linearalgebra">
|
||||||
|
<a href="Apatite/LinearAlgebra.html">LinearAlgebra</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix" data-name="apatite::linearalgebra::matrix">
|
||||||
|
<a href="Apatite/LinearAlgebra/Matrix.html">Matrix</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/NDArray" data-name="apatite::linearalgebra::ndarray">
|
||||||
|
<a href="Apatite/LinearAlgebra/NDArray.html">NDArray</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Vector" data-name="apatite::linearalgebra::vector">
|
||||||
|
<a href="Apatite/LinearAlgebra/Vector.html">Vector</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="github.com/watzon/apatite/Array" data-name="array(t)">
|
||||||
|
<a href="Array.html">Array</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">class</span> Array(T)
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="Array.html">Array(T)</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Overview</h2>
|
||||||
|
|
||||||
|
<p>An <code><a href="Array.html">Array</a></code> is an ordered, integer-indexed collection of objects of type T.</p>
|
||||||
|
|
||||||
|
<p>Array indexing starts at 0. A negative index is assumed to be
|
||||||
|
relative to the end of the array: -1 indicates the last element,
|
||||||
|
-2 is the next to last element, and so on.</p>
|
||||||
|
|
||||||
|
<p>An <code><a href="Array.html">Array</a></code> can be created using the usual <code>new</code> method (several are provided), or with an array literal:</p>
|
||||||
|
|
||||||
|
<pre><code><span class="t">Array</span>(<span class="t">Int32</span>).<span class="k">new</span> <span class="c"># => []</span>
|
||||||
|
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>] <span class="c"># Array(Int32)</span>
|
||||||
|
[<span class="n">1</span>, <span class="s">"hello"</span>, <span class="s">'x'</span>] <span class="c"># Array(Int32 | String | Char)</span></code></pre>
|
||||||
|
|
||||||
|
<p>An <code><a href="Array.html">Array</a></code> can have mixed types, meaning T will be a union of types, but these are determined
|
||||||
|
when the array is created, either by specifying T or by using an array literal. In the latter
|
||||||
|
case, T will be set to the union of the array literal elements' types.</p>
|
||||||
|
|
||||||
|
<p>When creating an empty array you must always specify T:</p>
|
||||||
|
|
||||||
|
<pre><code><span class="o">[]</span> <span class="k">of</span> <span class="t">Int32</span> <span class="c"># same as Array(Int32)</span>
|
||||||
|
<span class="o">[]</span> <span class="c"># syntax error</span></code></pre>
|
||||||
|
|
||||||
|
<p>An <code><a href="Array.html">Array</a></code> is implemented using an internal buffer of some capacity
|
||||||
|
and is reallocated when elements are pushed to it when more capacity
|
||||||
|
is needed. This is normally known as a <a href="http://en.wikipedia.org/wiki/Dynamic_array" target="_blank">dynamic array</a>.</p>
|
||||||
|
|
||||||
|
<p>You can use a special array literal syntax with other types too, as long as they define an argless
|
||||||
|
<code>new</code> method and a <code><<</code> method. <code>Set</code> is one such type:</p>
|
||||||
|
|
||||||
|
<pre><code>set <span class="o">=</span> <span class="t">Set</span>{<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>} <span class="c"># => Set{1, 2, 3}</span>
|
||||||
|
set.<span class="k">class</span> <span class="c"># => Set(Int32)</span></code></pre>
|
||||||
|
|
||||||
|
<p>The above is the same as this:</p>
|
||||||
|
|
||||||
|
<pre><code>set <span class="o">=</span> <span class="t">Set</span>(<span class="k">typeof</span>(<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>)).<span class="k">new</span>
|
||||||
|
set <span class="o"><<</span> <span class="n">1</span>
|
||||||
|
set <span class="o"><<</span> <span class="n">2</span>
|
||||||
|
set <span class="o"><<</span> <span class="n">3</span></code></pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Included Modules</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type">Comparable(<a href="Array.html">Array(T)</a>)</li>
|
||||||
|
|
||||||
|
<li class="other-type">Indexable(T)</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Defined in:</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/core_ext/array.cr#L1" target="_blank">
|
||||||
|
apatite/core_ext/array.cr
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Summary</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#all%3F-instance-method" class="signature"><strong>#all?</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Tests whether all elements evaluate to true</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#any%3F-instance-method" class="signature"><strong>#any?</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Tests whether any of the elements evaluate to true</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#shape-instance-method" class="signature"><strong>#shape</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Get the array's dimensions</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#to_vec-instance-method" class="signature"><strong>#to_vec</strong></a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Instance Method Detail</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="all?-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>all?</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#all%3F-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Tests whether all elements evaluate to true</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/core_ext/array.cr#L3" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="any?-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>any?</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#any%3F-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Tests whether any of the elements evaluate to true</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/core_ext/array.cr#L11" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="shape-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>shape</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#shape-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc"><p>Get the array's dimensions</p></div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/core_ext/array.cr#L19" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="to_vec-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>to_vec</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#to_vec-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
[<a href="https://github.com/watzon/apatite/blob/6c8ee1fded2782d2cc9fcd30ca82bd149f6eb9a3/src/apatite/core_ext/array.cr#L24" target="_blank">View source</a>]
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,629 @@
|
||||||
|
html, body {
|
||||||
|
background: #FFFFFF;
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "Avenir", "Tahoma", "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #263F6C;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #112750;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin: 35px 0 25px;
|
||||||
|
color: #444444;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.type-name {
|
||||||
|
color: #47266E;
|
||||||
|
margin: 20px 0 30px;
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border: 1px solid #EBEBEB;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
border-bottom: 1px solid #E6E6E6;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar, .main-content {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
width: 30em;
|
||||||
|
color: #F8F4FD;
|
||||||
|
background-color: #2E1052;
|
||||||
|
padding: 0 0 30px;
|
||||||
|
box-shadow: inset -3px 0 4px rgba(0,0,0,.35);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .search-box {
|
||||||
|
padding: 8px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input {
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px;
|
||||||
|
font: inherit;
|
||||||
|
font-family: inherit;
|
||||||
|
line-height: 1.2;
|
||||||
|
width: 100%;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 0px 3px 5px rgba(0,0,0,.25);
|
||||||
|
transition: box-shadow .12s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:focus {
|
||||||
|
box-shadow: 0px 5px 6px rgba(0,0,0,.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
||||||
|
color: #C8C8C8;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input::-moz-placeholder { /* Firefox 19+ */
|
||||||
|
color: #C8C8C8;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:-ms-input-placeholder { /* IE 10+ */
|
||||||
|
color: #C8C8C8;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:-moz-placeholder { /* Firefox 18- */
|
||||||
|
color: #C8C8C8;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none outside;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar li {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
transition: color .14s;
|
||||||
|
}
|
||||||
|
.types-list a {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 15px 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar a:focus {
|
||||||
|
outline: 1px solid #D1B7F1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list a {
|
||||||
|
padding: 5px 15px 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .current > a,
|
||||||
|
.sidebar a:hover {
|
||||||
|
color: #866BA6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.repository-links {
|
||||||
|
padding: 5px 15px 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li ul {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 0;
|
||||||
|
max-height: 0;
|
||||||
|
transition: 1s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.parent {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.parent::before {
|
||||||
|
box-sizing: border-box;
|
||||||
|
content: "▼";
|
||||||
|
display: block;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
font-size: 8px;
|
||||||
|
line-height: 30px;
|
||||||
|
transform: rotateZ(-90deg);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: .2s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.types-list li.parent > a {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.parent.open::before {
|
||||||
|
transform: rotateZ(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.open > ul {
|
||||||
|
height: auto;
|
||||||
|
max-height: 1000em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
padding: 0 30px 30px 30px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kind {
|
||||||
|
font-size: 60%;
|
||||||
|
color: #866BA6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy {
|
||||||
|
margin: -15px 0 30px 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none outside;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 7px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass + .superclass::before {
|
||||||
|
content: "<";
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other-types-list li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other-types-list,
|
||||||
|
.list-summary {
|
||||||
|
margin: 0 0 30px 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none outside;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-const {
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-const code {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary {
|
||||||
|
padding-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass a,
|
||||||
|
.other-type a,
|
||||||
|
.entry-summary .signature {
|
||||||
|
padding: 4px 8px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
color: #47266E;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
transition: background .15s, border-color .15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass a:hover,
|
||||||
|
.other-type a:hover,
|
||||||
|
.entry-summary .signature:hover {
|
||||||
|
background: #D5CAE3;
|
||||||
|
border-color: #624288;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary .summary {
|
||||||
|
padding-left: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary .summary p {
|
||||||
|
margin: 12px 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail {
|
||||||
|
padding: 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature {
|
||||||
|
position: relative;
|
||||||
|
padding: 5px 15px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: block;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
color: #47266E;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
transition: .2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail:target .signature {
|
||||||
|
background-color: #D5CAE3;
|
||||||
|
border: 1px solid #624288;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature .method-permalink {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -35px;
|
||||||
|
padding: 5px 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #624288;
|
||||||
|
opacity: .4;
|
||||||
|
transition: opacity .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature .method-permalink:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail:target .signature .method-permalink {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited {
|
||||||
|
padding-right: 10%;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited h3 {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited a {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #47266E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #6C518B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited .tooltip>span {
|
||||||
|
background: #D5CAE3;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: -4px -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited .tooltip * {
|
||||||
|
color: #47266E;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 10px 20px;
|
||||||
|
margin-top: 4px;
|
||||||
|
border-radius: 3px;
|
||||||
|
line-height: 1.45;
|
||||||
|
overflow: auto;
|
||||||
|
color: #333;
|
||||||
|
background: #fdfdfd;
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(pre) > code {
|
||||||
|
background-color: rgba(40,35,30,0.05);
|
||||||
|
padding: 0.2em 0.4em;
|
||||||
|
font-size: 85%;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag {
|
||||||
|
padding: 2px 4px 1px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
font-size: 11px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.orange {
|
||||||
|
background-color: #EE8737;
|
||||||
|
color: #FCEBDD;
|
||||||
|
border-color: #EB7317;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.yellow {
|
||||||
|
background-color: #E4B91C;
|
||||||
|
color: #FCF8E8;
|
||||||
|
border-color: #B69115;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.green {
|
||||||
|
background-color: #469C14;
|
||||||
|
color: #E2F9D3;
|
||||||
|
border-color: #34700E;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.red {
|
||||||
|
background-color: #BF1919;
|
||||||
|
color: #F9ECEC;
|
||||||
|
border-color: #822C2C;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.purple {
|
||||||
|
background-color: #2E1052;
|
||||||
|
color: #ECE1F9;
|
||||||
|
border-color: #1F0B37;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip>span {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
display: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover>span {
|
||||||
|
display: inline-block;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.c {
|
||||||
|
color: #969896;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.s {
|
||||||
|
color: #183691;
|
||||||
|
}
|
||||||
|
|
||||||
|
.i {
|
||||||
|
color: #7f5030;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k {
|
||||||
|
color: #a71d5d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o {
|
||||||
|
color: #a71d5d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m {
|
||||||
|
color: #795da3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.search-results {
|
||||||
|
font-size: 90%;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-results mark {
|
||||||
|
color: inherit;
|
||||||
|
background: transparent;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.search-result {
|
||||||
|
padding: 5px 8px 5px 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-left: 5px solid transparent;
|
||||||
|
transform: translateX(-3px);
|
||||||
|
transition: all .2s, background-color 0s, border .02s;
|
||||||
|
min-height: 3.2em;
|
||||||
|
}
|
||||||
|
.search-result.current {
|
||||||
|
border-left-color: #ddd;
|
||||||
|
background-color: rgba(200,200,200,0.4);
|
||||||
|
transform: translateX(0);
|
||||||
|
transition: all .2s, background-color .5s, border 0s;
|
||||||
|
}
|
||||||
|
.search-result.current:hover,
|
||||||
|
.search-result.current:focus {
|
||||||
|
border-left-color: #866BA6;
|
||||||
|
}
|
||||||
|
.search-result:not(.current):nth-child(2n) {
|
||||||
|
background-color: rgba(255,255,255,.06);
|
||||||
|
}
|
||||||
|
.search-result__title {
|
||||||
|
font-size: 105%;
|
||||||
|
word-break: break-all;
|
||||||
|
line-height: 1.1;
|
||||||
|
padding: 3px 0;
|
||||||
|
}
|
||||||
|
.search-result__title strong {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.search-results .search-result__title > a {
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.search-result__title > a > .args {
|
||||||
|
color: #dddddd;
|
||||||
|
font-weight: 300;
|
||||||
|
transition: inherit;
|
||||||
|
font-size: 88%;
|
||||||
|
line-height: 1.2;
|
||||||
|
letter-spacing: -.02em;
|
||||||
|
}
|
||||||
|
.search-result__title > a > .args * {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result a,
|
||||||
|
.search-result a:hover {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
.search-result:not(.current):hover .search-result__title > a,
|
||||||
|
.search-result:not(.current):focus .search-result__title > a,
|
||||||
|
.search-result__title > a:focus {
|
||||||
|
color: #866BA6;
|
||||||
|
}
|
||||||
|
.search-result:not(.current):hover .args,
|
||||||
|
.search-result:not(.current):focus .args {
|
||||||
|
color: #6a5a7d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result__type {
|
||||||
|
color: #e8e8e8;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
.search-result__doc {
|
||||||
|
color: #bbbbbb;
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
.search-result__doc p {
|
||||||
|
margin: 0;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1.2em;
|
||||||
|
max-height: 2.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.js-modal-visible .modal-background {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.main-content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.modal-background {
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background: rgba(120,120,120,.4);
|
||||||
|
z-index: 100;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.usage-modal {
|
||||||
|
max-width: 90%;
|
||||||
|
background: #fff;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
border-radius: 9px;
|
||||||
|
padding: 5px 15px 20px;
|
||||||
|
min-width: 50%;
|
||||||
|
color: #555;
|
||||||
|
position: relative;
|
||||||
|
transform: scale(.5);
|
||||||
|
transition: transform 200ms;
|
||||||
|
}
|
||||||
|
.js-modal-visible .usage-modal {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
.usage-modal > .close-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
top: 8px;
|
||||||
|
color: #aaa;
|
||||||
|
font-size: 27px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.usage-modal > .close-button:hover {
|
||||||
|
text-shadow: 2px 2px 2px #ccc;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.modal-title {
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #666;
|
||||||
|
border-bottom: 2px solid #ddd;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.usage-list {
|
||||||
|
padding: 0;
|
||||||
|
margin: 13px;
|
||||||
|
}
|
||||||
|
.usage-list > li {
|
||||||
|
padding: 5px 2px;
|
||||||
|
overflow: auto;
|
||||||
|
padding-left: 100px;
|
||||||
|
min-width: 12em;
|
||||||
|
}
|
||||||
|
.usage-modal kbd {
|
||||||
|
background: #eee;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 3px 8px;
|
||||||
|
font-family: monospace;
|
||||||
|
margin-right: 2px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.usage-key {
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
margin-left: -100px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
|
@ -0,0 +1,124 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="generator" content="Crystal Docs 0.29.0">
|
||||||
|
|
||||||
|
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="js/doc.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDoc.base_path = "";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta id="repository-name" content="github.com/watzon/apatite">
|
||||||
|
<title>README - github.com/watzon/apatite</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="repository-links">
|
||||||
|
<a href="index.html">README</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" class="hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="github.com/watzon/apatite/Apatite" data-name="apatite">
|
||||||
|
<a href="Apatite.html">Apatite</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra" data-name="apatite::linearalgebra">
|
||||||
|
<a href="Apatite/LinearAlgebra.html">LinearAlgebra</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix" data-name="apatite::linearalgebra::matrix">
|
||||||
|
<a href="Apatite/LinearAlgebra/Matrix.html">Matrix</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/NDArray" data-name="apatite::linearalgebra::ndarray">
|
||||||
|
<a href="Apatite/LinearAlgebra/NDArray.html">NDArray</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Vector" data-name="apatite::linearalgebra::vector">
|
||||||
|
<a href="Apatite/LinearAlgebra/Vector.html">Vector</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="github.com/watzon/apatite/Array" data-name="array(t)">
|
||||||
|
<a href="Array.html">Array</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1>Apatite</h1>
|
||||||
|
|
||||||
|
<p>Apatite is meant to be a collecion of mathmatical and scientific computing algorithms for the Crystal programming language. I don't expect it to ever reach the level of completeness as numpy, but hopefully it can save some people the trouble of implementing these methods on their own.</p>
|
||||||
|
|
||||||
|
<h2>Installation</h2>
|
||||||
|
|
||||||
|
<ol><li>Add the dependency to your <code>shard.yml</code>:</li></ol>
|
||||||
|
|
||||||
|
<p><code></code>`yaml
|
||||||
|
dependencies:</p>
|
||||||
|
|
||||||
|
<pre><code> apatite:
|
||||||
|
github: watzon<span class="s">/apatite</code></pre>
|
||||||
|
|
||||||
|
<p><code></code>`</p>
|
||||||
|
|
||||||
|
<ol><li>Run <code>shards install</code></li></ol>
|
||||||
|
|
||||||
|
<h2>Usage</h2>
|
||||||
|
|
||||||
|
<pre><code class="language-crystal"><span class="k">require</span> <span class="s">"apatite"</span></code></pre>
|
||||||
|
|
||||||
|
<p><span class="flag orange">TODO</span> Write usage instructions here, but first write the library...</p>
|
||||||
|
|
||||||
|
<h2>Roadmap</h2>
|
||||||
|
|
||||||
|
<ul><li>[ ] Apetite</li><li>[ ] Vector Math</li><li>[ ] Matrix</li><li>[ ] NDArray</li><li>[x] Vector</li><li>[ ] Line</li><li>[ ] Plane</li><li>[ ] Polygon</li><li>[ ] LinkedList
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h2>Contributing</h2>
|
||||||
|
|
||||||
|
<ol><li>Fork it (<https://github.com/watzon/apatite/fork>)</li><li>Create your feature branch (<code>git checkout -b my-new-feature</code>)</li><li>Commit your changes (<code>git commit -am 'Add some feature'</code>)</li><li>Push to the branch (<code>git push origin my-new-feature</code>)</li><li>Create a new Pull Request</li></ol>
|
||||||
|
|
||||||
|
<h2>Contributors</h2>
|
||||||
|
|
||||||
|
<ul><li><a href="https://github.com/watzon" target="_blank">Chris Watson</a> - creator and maintainer</li></ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue