Skip to content

Commit

Permalink
deploy: cd35ad8
Browse files Browse the repository at this point in the history
  • Loading branch information
mhovd committed Jan 26, 2024
1 parent 0f394ba commit db78fdb
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pyl: &amp;'a <a class="type" href="https://docs.rs/ndarray/0.15/ndarray/aliases/type.Array1.html" title="type ndarray::aliases::Array1">Array1</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a>&gt;
) -&gt; Self</h4></section><section id="method.optimize_point" class="method"><a class="src rightside" href="../../../../src/npcore/routines/optimization/d_optimizer.rs.html#73-81">source</a><h4 class="code-header">pub fn <a href="#method.optimize_point" class="fn">optimize_point</a>(self, spp: <a class="type" href="https://docs.rs/ndarray/0.15/ndarray/aliases/type.Array1.html" title="type ndarray::aliases::Array1">Array1</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.75.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="type" href="https://docs.rs/ndarray/0.15/ndarray/aliases/type.Array1.html" title="type ndarray::aliases::Array1">Array1</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a>&gt;, <a class="struct" href="https://docs.rs/anyhow/1.0.79/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>&gt;</h4></section></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CostFunction-for-SppOptimizer%3C'a,+S,+P%3E" class="impl"><a class="src rightside" href="../../../../src/npcore/routines/optimization/d_optimizer.rs.html#25-53">source</a><a href="#impl-CostFunction-for-SppOptimizer%3C'a,+S,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, S, P&gt; CostFunction for <a class="struct" href="struct.SppOptimizer.html" title="struct npcore::routines::optimization::d_optimizer::SppOptimizer">SppOptimizer</a>&lt;'a, S, P&gt;<span class="where fmt-newline">where
S: <a class="trait" href="../../evaluation/sigma/trait.Sigma.html" title="trait npcore::routines::evaluation::sigma::Sigma">Sigma</a> + <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
P: <a class="trait" href="../../simulation/predict/trait.Predict.html" title="trait npcore::routines::simulation::predict::Predict">Predict</a>&lt;'static&gt; + <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Param" class="associatedtype trait-impl"><a href="#associatedtype.Param" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Param</a> = <a class="struct" href="https://docs.rs/ndarray/0.15/ndarray/struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;<a class="struct" href="https://docs.rs/ndarray/0.15/ndarray/data_repr/struct.OwnedRepr.html" title="struct ndarray::data_repr::OwnedRepr">OwnedRepr</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a>&gt;, <a class="struct" href="https://docs.rs/ndarray/0.15/ndarray/dimension/dim/struct.Dim.html" title="struct ndarray::dimension::dim::Dim">Dim</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.array.html">1</a>]&gt;&gt;</h4></section></summary><div class='docblock'>Type of the parameter vector</div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Type of the return value of the cost function</div></details><details class="toggle method-toggle" open><summary><section id="method.cost" class="method trait-impl"><a class="src rightside" href="../../../../src/npcore/routines/optimization/d_optimizer.rs.html#32-52">source</a><a href="#method.cost" class="anchor">§</a><h4 class="code-header">fn <a class="fn">cost</a>(&amp;self, spp: &amp;Self::Param) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.75.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::Output, <a class="struct" href="https://docs.rs/anyhow/1.0.79/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Compute cost function</div></details><details class="toggle method-toggle" open><summary><section id="method.bulk_cost" class="method trait-impl"><a href="#method.bulk_cost" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bulk_cost</a>&lt;P, 'a&gt;(&amp;self, params: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.slice.html">[P]</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.75.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.75.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Self::Output&gt;, <a class="struct" href="https://docs.rs/anyhow/1.0.79/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>&gt;<span class="where fmt-newline">where
P: <a class="trait" href="../../simulation/predict/trait.Predict.html" title="trait npcore::routines::simulation::predict::Predict">Predict</a>&lt;'static&gt; + <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Param" class="associatedtype trait-impl"><a href="#associatedtype.Param" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Param</a> = <a class="struct" href="https://docs.rs/ndarray/0.15/ndarray/struct.ArrayBase.html" title="struct ndarray::ArrayBase">ArrayBase</a>&lt;<a class="struct" href="https://docs.rs/ndarray/0.15/ndarray/data_repr/struct.OwnedRepr.html" title="struct ndarray::data_repr::OwnedRepr">OwnedRepr</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a>&gt;, <a class="struct" href="https://docs.rs/ndarray/0.15/ndarray/dimension/dim/struct.Dim.html" title="struct ndarray::dimension::dim::Dim">Dim</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.array.html">1</a>]&gt;&gt;</h4></section></summary><div class='docblock'>Type of the parameter vector</div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Type of the return value of the cost function</div></details><details class="toggle method-toggle" open><summary><section id="method.cost" class="method trait-impl"><a class="src rightside" href="../../../../src/npcore/routines/optimization/d_optimizer.rs.html#32-52">source</a><a href="#method.cost" class="anchor">§</a><h4 class="code-header">fn <a class="fn">cost</a>(&amp;self, spp: &amp;Self::Param) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.75.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::Output, <a class="struct" href="https://docs.rs/anyhow/1.0.79/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Compute cost function</div></details><details class="toggle method-toggle" open><summary><section id="method.bulk_cost" class="method trait-impl"><a href="#method.bulk_cost" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bulk_cost</a>&lt;P&gt;(&amp;self, params: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.slice.html">[P]</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.75.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.75.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Self::Output&gt;, <a class="struct" href="https://docs.rs/anyhow/1.0.79/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>&gt;<span class="where fmt-newline">where
P: <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;Self::Param&gt; + SyncAlias,
Self::Output: SendAlias,
Self: SyncAlias,</span></h4></section></summary><div class='docblock'>Compute <code>cost</code> in bulk. If the <code>rayon</code> feature is enabled, multiple calls to <code>cost</code> will be run in parallel using <code>rayon</code>, otherwise they will execute sequentially. If the <code>rayon</code> feature is enabled, parallelization can still be turned off by overwriting <code>parallelize</code> to return <code>false</code>. This can be useful in cases where it is preferable to parallelize only certain parts. Note that even if <code>parallelize</code> is set to false, the parameter vectors and the problem are still required to be <code>Send</code> and <code>Sync</code>. Those bounds are linked to the <code>rayon</code> feature. This method can be overwritten.</div></details><details class="toggle method-toggle" open><summary><section id="method.parallelize" class="method trait-impl"><a href="#method.parallelize" class="anchor">§</a><h4 class="code-header">fn <a class="fn">parallelize</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Indicates whether to parallelize calls to <code>cost</code> when using <code>bulk_cost</code>. By default returns true, but can be set manually to <code>false</code> if needed. This allows users to turn off parallelization for certain traits implemented on their problem. Note that parallelization requires the <code>rayon</code> feature to be enabled, otherwise calls to <code>cost</code> will be executed sequentially independent of how <code>parallelize</code> is set.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-SppOptimizer%3C'a,+S,+P%3E" class="impl"><a href="#impl-RefUnwindSafe-for-SppOptimizer%3C'a,+S,+P%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, S, P&gt; <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.SppOptimizer.html" title="struct npcore::routines::optimization::d_optimizer::SppOptimizer">SppOptimizer</a>&lt;'a, S, P&gt;<span class="where fmt-newline">where
Expand Down
Loading

0 comments on commit db78fdb

Please sign in to comment.