apatite/docs/Apatite/LinearAlgebra/Vector.html

1090 lines
32 KiB
HTML
Raw Normal View History

2019-06-13 02:23:54 +00:00
<!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">
2019-07-10 01:18:01 +00:00
<title>Apatite::LinearAlgebra::Vector(T) - github.com/watzon/apatite</title>
2019-06-13 02:23:54 +00:00
</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>
2019-07-10 01:18:01 +00:00
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/ErrDimensionMismatch" data-name="apatite::linearalgebra::errdimensionmismatch">
<a href="../../Apatite/LinearAlgebra/ErrDimensionMismatch.html">ErrDimensionMismatch</a>
</li>
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/ErrNotRegular" data-name="apatite::linearalgebra::errnotregular">
<a href="../../Apatite/LinearAlgebra/ErrNotRegular.html">ErrNotRegular</a>
</li>
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/ErrOperationNotDefined" data-name="apatite::linearalgebra::erroperationnotdefined">
<a href="../../Apatite/LinearAlgebra/ErrOperationNotDefined.html">ErrOperationNotDefined</a>
</li>
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Error" data-name="apatite::linearalgebra::error">
<a href="../../Apatite/LinearAlgebra/Error.html">Error</a>
</li>
2019-07-10 02:08:46 +00:00
<li class="parent " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix" data-name="apatite::linearalgebra::matrix(t)">
2019-06-13 02:23:54 +00:00
<a href="../../Apatite/LinearAlgebra/Matrix.html">Matrix</a>
2019-07-10 02:08:46 +00:00
<ul>
2019-06-13 02:23:54 +00:00
2019-07-10 02:08:46 +00:00
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix/EigenvalueDecomposition" data-name="apatite::linearalgebra::matrix::eigenvaluedecomposition">
<a href="../../Apatite/LinearAlgebra/Matrix/EigenvalueDecomposition.html">EigenvalueDecomposition</a>
2019-06-13 02:23:54 +00:00
</li>
2019-07-10 02:08:46 +00:00
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Matrix/LupDecomposition" data-name="apatite::linearalgebra::matrix::lupdecomposition">
<a href="../../Apatite/LinearAlgebra/Matrix/LupDecomposition.html">LupDecomposition</a>
2019-07-10 01:18:01 +00:00
</li>
</ul>
</li>
2019-07-10 02:08:46 +00:00
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/NDArray" data-name="apatite::linearalgebra::ndarray">
<a href="../../Apatite/LinearAlgebra/NDArray.html">NDArray</a>
2019-07-10 01:18:01 +00:00
2019-07-10 02:08:46 +00:00
</li>
2019-07-10 01:18:01 +00:00
2019-07-10 02:08:46 +00:00
<li class=" current" data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/Vector" data-name="apatite::linearalgebra::vector(t)">
<a href="../../Apatite/LinearAlgebra/Vector.html">Vector</a>
2019-07-10 01:18:01 +00:00
</li>
2019-07-10 02:08:46 +00:00
<li class=" " data-id="github.com/watzon/apatite/Apatite/LinearAlgebra/ZeroVectorError" data-name="apatite::linearalgebra::zerovectorerror">
<a href="../../Apatite/LinearAlgebra/ZeroVectorError.html">ZeroVectorError</a>
2019-07-10 01:18:01 +00:00
</li>
2019-06-13 02:23:54 +00:00
</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">
2019-07-10 01:18:01 +00:00
<span class="kind">class</span> Apatite::LinearAlgebra::Vector(T)
2019-06-13 02:23:54 +00:00
</h1>
2019-07-10 01:18:01 +00:00
<ul class="superclass-hierarchy"><li class="superclass"><a href="../../Apatite/LinearAlgebra/Vector.html">Apatite::LinearAlgebra::Vector(T)</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
2019-06-13 02:23:54 +00:00
<h2>Overview</h2>
<p>Represents a mathematical vector, and also constitutes a row or column
of a <code><a href="../../Apatite/LinearAlgebra/Matrix.html">Matrix</a></code></p>
<h2>Included Modules</h2>
<ul class="other-types-list">
2019-07-10 01:18:01 +00:00
<li class="other-type">Comparable(<a href="../../Apatite/LinearAlgebra/Vector.html">Apatite::LinearAlgebra::Vector(T)</a>)</li>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<li class="other-type">Enumerable(T)</li>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<li class="other-type">Indexable(T)</li>
2019-06-13 02:23:54 +00:00
</ul>
<h2>Defined in:</h2>
2019-07-10 02:22:15 +00:00
<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L7" target="_blank">
2019-06-13 02:23:54 +00:00
apatite/linear_algebra/vector.cr
</a>
<br/>
<h2>Class Method Summary</h2>
<ul class="list-summary">
<li class="entry-summary">
<a href="#%5B%5D%28%2Aarray%29-class-method" class="signature"><strong>.[]</strong>(*array)</a>
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Creates a new vector from a list of elements.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#basis%28size%2Cindex%29-class-method" class="signature"><strong>.basis</strong>(size, index)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns a standard basis <code>n</code>-vector.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#elements%28array%2Ccopy%3Dtrue%29-class-method" class="signature"><strong>.elements</strong>(array, copy = <span class="n">true</span>)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Creates a vector from an Array.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#zero%28size%29-class-method" class="signature"><strong>.zero</strong>(size)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Return a zero vector.</p></div>
2019-06-13 02:23:54 +00:00
</li>
</ul>
<h2>Instance Method Summary</h2>
<ul class="list-summary">
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#%2A%28x%29-instance-method" class="signature"><strong>#*</strong>(x)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Multiplies the vector by x, where x is a number or a matrix.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#%2B%28x%29-instance-method" class="signature"><strong>#+</strong>(x)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Vector addition.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#-%28x%29-instance-method" class="signature"><strong>#-</strong>(x)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Vector subtraction.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#%2F%28x%29-instance-method" class="signature"><strong>#/</strong>(x)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Vector division.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#-instance-method" class="signature"><strong>#<=></strong></a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Take me to your leader</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#%3D%3D%28other%29-instance-method" class="signature"><strong>#==</strong>(other)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Equality operator</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#angle_with%28v%29-instance-method" class="signature"><strong>#angle_with</strong>(v)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns an angle with another vector.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
<a href="#clone-instance-method" class="signature"><strong>#clone</strong></a>
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns a copy of the vector.</p></div>
2019-06-17 22:18:58 +00:00
</li>
2019-06-13 02:23:54 +00:00
<li class="entry-summary">
2019-07-10 02:08:46 +00:00
<a href="#coerce%28klass%2C%2Aargs%29-instance-method" class="signature"><strong>#coerce</strong>(klass, *args)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 02:08:46 +00:00
<div class="summary"><p>The coerce method allows you to attempt to coerce the elements in the matrix to another type.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#cross%28v%29-instance-method" class="signature"><strong>#cross</strong>(v)</a>
2019-06-13 02:23:54 +00:00
<div class="summary"><p>Returns the cross product of this vector with the others.</p></div>
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#cross_product%28%2Avs%29-instance-method" class="signature"><strong>#cross_product</strong>(*vs)</a>
2019-06-17 22:01:05 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns the cross product of this vector with the others.</p></div>
2019-06-17 22:01:05 +00:00
</li>
2019-06-13 02:23:54 +00:00
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#dot%28v%29-instance-method" class="signature"><strong>#dot</strong>(v)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns the inner product of this vector with the other.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#each%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#each</strong>(*args, **options)</a>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#each%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#each</strong>(*args, **options, &block)</a>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#each2%28v%2C%26block%29-instance-method" class="signature"><strong>#each2</strong>(v, &block)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Iterate over the elements of this vector and <code>v</code> in conjunction.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#inner_product%28v%29-instance-method" class="signature"><strong>#inner_product</strong>(v)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns the inner product of this vector with the other.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#inspect-instance-method" class="signature"><strong>#inspect</strong></a>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
<a href="#magnitude-instance-method" class="signature"><strong>#magnitude</strong></a>
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns the modulus (Pythagorean distance) of the vector.</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#map%28%26block%3AT-%3EUNDERSCORE%29-instance-method" class="signature"><strong>#map</strong>(&block : T -> UNDERSCORE)</a>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#map2%28v%2C%26block%3AT%2CT-%3EUNDERSCORE%29-instance-method" class="signature"><strong>#map2</strong>(v, &block : T, T -> UNDERSCORE)</a>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#norm-instance-method" class="signature"><strong>#norm</strong></a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns the modulus (Pythagorean distance) of the vector.</p></div>
2019-06-13 02:23:54 +00:00
</li>
2019-06-17 22:01:05 +00:00
<li class="entry-summary">
<a href="#normalize-instance-method" class="signature"><strong>#normalize</strong></a>
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns a new vector with the same direction but with norm 1</p></div>
2019-06-13 02:23:54 +00:00
</li>
<li class="entry-summary">
2019-07-10 01:18:01 +00:00
<a href="#r-instance-method" class="signature"><strong>#r</strong></a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns a new vector with the same direction but with norm 1</p></div>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
</li>
<li class="entry-summary">
<a href="#round%28ndigits%3D0%29-instance-method" class="signature"><strong>#round</strong>(ndigits = <span class="n">0</span>)</a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns a vector with entries rounded to the given precision.</p></div>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
</li>
<li class="entry-summary">
<a href="#to_a-instance-method" class="signature"><strong>#to_a</strong></a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns the elements of the vector in an array.</p></div>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
</li>
<li class="entry-summary">
<a href="#to_matrix-instance-method" class="signature"><strong>#to_matrix</strong></a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Return a single-column matrix from this vector.</p></div>
2019-06-17 22:01:05 +00:00
2019-07-10 01:18:01 +00:00
</li>
<li class="entry-summary">
<a href="#to_s-instance-method" class="signature"><strong>#to_s</strong></a>
2019-06-17 22:01:05 +00:00
2019-07-10 01:18:01 +00:00
</li>
<li class="entry-summary">
<a href="#unsafe_fetch%28i%29-instance-method" class="signature"><strong>#unsafe_fetch</strong>(i)</a>
2019-06-17 22:01:05 +00:00
2019-07-10 01:18:01 +00:00
</li>
<li class="entry-summary">
<a href="#zero%3F-instance-method" class="signature"><strong>#zero?</strong></a>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="summary"><p>Returns <code>true</code> if all elements are zero.</p></div>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
</li>
</ul>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="methods-inherited">
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
</div>
<h2>Class Method Detail</h2>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="[](*array)-class-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def self.<strong>[]</strong>(*array)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#%5B%5D%28%2Aarray%29-class-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Creates a new vector from a list of elements.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L22" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="basis(size,index)-class-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def self.<strong>basis</strong>(size, index)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#basis%28size%2Cindex%29-class-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns a standard basis <code>n</code>-vector.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L34" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="elements(array,copy=true)-class-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def self.<strong>elements</strong>(array, copy = <span class="n">true</span>)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#elements%28array%2Ccopy%3Dtrue%29-class-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Creates a vector from an Array. The optional second argument specifies
whether the array itself or a copy is used internally.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L28" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="zero(size)-class-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def self.<strong>zero</strong>(size)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#zero%28size%29-class-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Return a zero vector.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L53" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<h2>Instance Method Detail</h2>
<div class="entry-detail" id="*(x)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>*</strong>(x)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#%2A%28x%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Multiplies the vector by x, where x is a number or a matrix.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L60" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="+(x)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>+</strong>(x)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#%2B%28x%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Vector addition.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L75" target="_blank">View source</a>]
2019-06-17 22:01:05 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="-(x)-instance-method">
2019-06-17 22:01:05 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>-</strong>(x)
2019-06-17 22:01:05 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#-%28x%29-instance-method">#</a>
2019-06-17 22:01:05 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Vector subtraction.</p></div>
2019-06-17 22:01:05 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L90" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="/(x)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>/</strong>(x)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#%2F%28x%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Vector division.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L105" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong><=></strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Take me to your leader</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L129" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="==(other)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>==</strong>(other)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#%3D%3D%28other%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Equality operator</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L120" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="angle_with(v)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>angle_with</strong>(v)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#angle_with%28v%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns an angle with another vector. Result is within the [0…Math::PI].</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L138" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="clone-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>clone</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#clone-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns a copy of the vector.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L147" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 02:08:46 +00:00
<div class="entry-detail" id="coerce(klass,*args)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 02:08:46 +00:00
def <strong>coerce</strong>(klass, *args)
2019-06-13 02:23:54 +00:00
2019-07-10 02:08:46 +00:00
<a class="method-permalink" href="#coerce%28klass%2C%2Aargs%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 02:08:46 +00:00
<div class="doc"><p>The coerce method allows you to attempt to coerce the elements
in the matrix to another type. The type</p></div>
2019-07-10 01:18:01 +00:00
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L249" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="cross(v)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>cross</strong>(v)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#cross%28v%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the cross product of this vector with the others.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L193" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="cross_product(*vs)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>cross_product</strong>(*vs)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#cross_product%28%2Avs%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the cross product of this vector with the others.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L170" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="dot(v)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>dot</strong>(v)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#dot%28v%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the inner product of this vector with the other.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L207" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="each(*args,**options)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>each</strong>(*args, **options)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#each%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L14" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="each(*args,**options,&amp;block)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>each</strong>(*args, **options, &block)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#each%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L14" target="_blank">View source</a>]
2019-06-17 22:01:05 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="each2(v,&amp;block)-instance-method">
2019-06-17 22:01:05 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>each2</strong>(v, &block)
2019-06-17 22:01:05 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#each2%28v%2C%26block%29-instance-method">#</a>
2019-06-17 22:01:05 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Iterate over the elements of this vector and <code>v</code> in conjunction.</p></div>
2019-06-17 22:01:05 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L212" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="inner_product(v)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>inner_product</strong>(v)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#inner_product%28v%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the inner product of this vector with the other.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L198" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="inspect-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>inspect</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#inspect-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L286" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="magnitude-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>magnitude</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#magnitude-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the modulus (Pythagorean distance) of the vector.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L221" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="map(&amp;block:T-&gt;UNDERSCORE)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>map</strong>(&block : T -> UNDERSCORE)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#map%28%26block%3AT-%3EUNDERSCORE%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L151" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="map2(v,&amp;block:T,T-&gt;UNDERSCORE)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>map2</strong>(v, &block : T, T -> UNDERSCORE)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#map2%28v%2C%26block%3AT%2CT-%3EUNDERSCORE%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L156" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="norm-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>norm</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#norm-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the modulus (Pythagorean distance) of the vector.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L226" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="normalize-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>normalize</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#normalize-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns a new vector with the same direction but with norm 1</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L231" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="r-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>r</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#r-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns a new vector with the same direction but with norm 1</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L238" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="round(ndigits=0)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>round</strong>(ndigits = <span class="n">0</span>)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#round%28ndigits%3D0%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns a vector with entries rounded to the given precision.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L243" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="to_a-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>to_a</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#to_a-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns the elements of the vector in an array.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L268" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="to_matrix-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>to_matrix</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#to_matrix-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Return a single-column matrix from this vector.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L273" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="to_s-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>to_s</strong>
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#to_s-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L277" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
2019-07-10 01:18:01 +00:00
<div class="entry-detail" id="unsafe_fetch(i)-instance-method">
2019-06-13 02:23:54 +00:00
<div class="signature">
2019-07-10 01:18:01 +00:00
def <strong>unsafe_fetch</strong>(i)
2019-06-13 02:23:54 +00:00
2019-07-10 01:18:01 +00:00
<a class="method-permalink" href="#unsafe_fetch%28i%29-instance-method">#</a>
2019-06-13 02:23:54 +00:00
</div>
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L290" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
<div class="entry-detail" id="zero?-instance-method">
<div class="signature">
def <strong>zero?</strong>
<a class="method-permalink" href="#zero%3F-instance-method">#</a>
</div>
2019-07-10 01:18:01 +00:00
<div class="doc"><p>Returns <code>true</code> if all elements are zero.</p></div>
2019-06-13 02:23:54 +00:00
<br/>
<div>
2019-07-10 02:22:15 +00:00
[<a href="https://github.com/watzon/apatite/blob/6e67ceb81b0b3c61d48b74e5ca5154866a9abd1a/src/apatite/linear_algebra/vector.cr#L282" target="_blank">View source</a>]
2019-06-13 02:23:54 +00:00
</div>
</div>
</div>
</body>
</html>