image2aa 0.1.4

Convert image to ASCII Art.
Documentation
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Matrix Multiplication"><meta name="keywords" content="rust, rustlang, rust-lang, Dot"><title>Dot in ndarray::linalg - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css"  id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ndarray/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Trait Dot</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#associated-types">Associated Types</a></h3><div class="sidebar-links"><a href="#associatedtype.Output">Output</a></div><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.dot">dot</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../index.html">ndarray</a>::<wbr><a href="index.html">linalg</a></h2><div id="sidebar-vars" data-name="Dot" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">ndarray</a>::<wbr><a href="index.html">linalg</a>::<wbr><a class="trait" href="#">Dot</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#159-165" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust trait">pub trait Dot&lt;Rhs&gt; {
    type <a href="#associatedtype.Output" class="type">Output</a>;
    fn <a href="#tymethod.dot" class="fnname">dot</a>(&amp;self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; Self::<a class="type" href="trait.Dot.html#associatedtype.Output" title="type ndarray::linalg::Dot::Output">Output</a>;
}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Matrix Multiplication</p>
<p>For two-dimensional arrays, the dot method computes the matrix
multiplication.</p>
</div></details><h2 id="associated-types" class="small-section-header">Associated Types<a href="#associated-types" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Output" class="method has-srclink"><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a></h4><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#163" title="goto source code">[src]</a></div></summary><div class="docblock"><p>The result of the operation.</p>
<p>For two-dimensional arrays: a rectangular array.</p>
</div></details></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><div id="tymethod.dot" class="method has-srclink"><h4 class="code-header">fn <a href="#tymethod.dot" class="fnname">dot</a>(&amp;self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; Self::<a class="type" href="trait.Dot.html#associatedtype.Output" title="type ndarray::linalg::Dot::Output">Output</a></h4><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#164" title="goto source code">[src]</a></div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%201%5D%3E%3E%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A, S, S2&gt; <a class="trait" href="trait.Dot.html" title="trait ndarray::linalg::Dot">Dot</a>&lt;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="struct" href="../struct.Dim.html" title="struct ndarray::Dim">Dim</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">; 1]</a>&gt;&gt;&gt; for <a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S2: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../trait.LinalgScalar.html" title="trait ndarray::LinalgScalar">LinalgScalar</a>,&nbsp;</span></h3><a href="#impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%201%5D%3E%3E%3E" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#167-186" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dot" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.dot" class="fnname">dot</a>(&amp;self, rhs: &amp;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt;) -&gt; A</h4><a href="#method.dot" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#182-185" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Compute the dot product of one-dimensional arrays.</p>
<p>The dot product is a sum of the elementwise products (no conjugation
of complex operands, and thus not their inner product).</p>
<p><strong>Panics</strong> if the arrays are not of the same length.<br>
<em>Note:</em> If enabled, uses blas <code>dot</code> for elements of <code>f32, f64</code> when memory
layout allows.</p>
</div></details><div id="associatedtype.Output-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a> = A</h4><a href="#associatedtype.Output-1" class="anchor"></a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%201%5D%3E%3E%3E-1" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A, S, S2&gt; <a class="trait" href="trait.Dot.html" title="trait ndarray::linalg::Dot">Dot</a>&lt;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="struct" href="../struct.Dim.html" title="struct ndarray::Dim">Dim</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">; 1]</a>&gt;&gt;&gt; for <a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S, <a class="type" href="../type.Ix2.html" title="type ndarray::Ix2">Ix2</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S2: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../trait.LinalgScalar.html" title="trait ndarray::LinalgScalar">LinalgScalar</a>,&nbsp;</span></h3><a href="#impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%201%5D%3E%3E%3E-1" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#303-323" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Perform the matrix multiplication of the rectangular array <code>self</code> and
column vector <code>rhs</code>.</p>
<p>The array shapes must agree in the way that
if <code>self</code> is <em>M</em> × <em>N</em>, then <code>rhs</code> is <em>N</em>.</p>
<p>Return a result array with shape <em>M</em>.</p>
<p><strong>Panics</strong> if shapes are incompatible.</p>
</div><div class="impl-items"><div id="associatedtype.Output-2" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a> = <a class="type" href="../type.Array.html" title="type ndarray::Array">Array</a>&lt;A, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt;</h4><a href="#associatedtype.Output-2" class="anchor"></a></div><div id="method.dot-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.dot" class="fnname">dot</a>(&amp;self, rhs: &amp;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt;) -&gt; <a class="type" href="../type.Array.html" title="type ndarray::Array">Array</a>&lt;A, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt;</h4><a href="#method.dot-1" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#309-322" title="goto source code">[src]</a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%202%5D%3E%3E%3E" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A, S, S2&gt; <a class="trait" href="trait.Dot.html" title="trait ndarray::linalg::Dot">Dot</a>&lt;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="struct" href="../struct.Dim.html" title="struct ndarray::Dim">Dim</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">; 2]</a>&gt;&gt;&gt; for <a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S2: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../trait.LinalgScalar.html" title="trait ndarray::LinalgScalar">LinalgScalar</a>,&nbsp;</span></h3><a href="#impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%202%5D%3E%3E%3E" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#188-208" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dot-2" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.dot" class="fnname">dot</a>(&amp;self, rhs: &amp;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="type" href="../type.Ix2.html" title="type ndarray::Ix2">Ix2</a>&gt;) -&gt; <a class="type" href="../type.Array.html" title="type ndarray::Array">Array</a>&lt;A, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt;</h4><a href="#method.dot-2" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#204-207" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Perform the matrix multiplication of the row vector <code>self</code> and
rectangular matrix <code>rhs</code>.</p>
<p>The array shapes must agree in the way that
if <code>self</code> is <em>M</em>, then <code>rhs</code> is <em>M</em> × <em>N</em>.</p>
<p>Return a result array with shape <em>N</em>.</p>
<p><strong>Panics</strong> if shapes are incompatible.</p>
</div></details><div id="associatedtype.Output-3" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a> = <a class="type" href="../type.Array.html" title="type ndarray::Array">Array</a>&lt;A, <a class="type" href="../type.Ix1.html" title="type ndarray::Ix1">Ix1</a>&gt;</h4><a href="#associatedtype.Output-3" class="anchor"></a></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%202%5D%3E%3E%3E-1" class="impl has-srclink"><h3 class="code-header in-band">impl&lt;A, S, S2&gt; <a class="trait" href="trait.Dot.html" title="trait ndarray::linalg::Dot">Dot</a>&lt;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="struct" href="../struct.Dim.html" title="struct ndarray::Dim">Dim</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.array.html">; 2]</a>&gt;&gt;&gt; for <a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S, <a class="type" href="../type.Ix2.html" title="type ndarray::Ix2">Ix2</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S2: <a class="trait" href="../trait.Data.html" title="trait ndarray::Data">Data</a>&lt;Elem = A&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../trait.LinalgScalar.html" title="trait ndarray::LinalgScalar">LinalgScalar</a>,&nbsp;</span></h3><a href="#impl-Dot%3CArrayBase%3CS2%2C%20Dim%3C%5Busize%3B%202%5D%3E%3E%3E-1" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#247-275" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="associatedtype.Output-4" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="#associatedtype.Output" class="type">Output</a> = <a class="type" href="../type.Array2.html" title="type ndarray::Array2">Array2</a>&lt;A&gt;</h4><a href="#associatedtype.Output-4" class="anchor"></a></div><div id="method.dot-3" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.dot" class="fnname">dot</a>(&amp;self, b: &amp;<a class="struct" href="../struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;S2, <a class="type" href="../type.Ix2.html" title="type ndarray::Ix2">Ix2</a>&gt;) -&gt; <a class="type" href="../type.Array2.html" title="type ndarray::Array2">Array2</a>&lt;A&gt;</h4><a href="#method.dot-3" class="anchor"></a><a class="srclink" href="../../src/ndarray/linalg/impl_linalg.rs.html#253-274" title="goto source code">[src]</a></div></div></details></div><script type="text/javascript" src="../../implementors/ndarray/linalg/trait.Dot.js" async></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ndarray" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>