Skip to content

Commit

Permalink
deploy: 64923fc
Browse files Browse the repository at this point in the history
stefan-k committed Jan 18, 2024
1 parent 8b6e24c commit dfcc8f0
Showing 73 changed files with 345 additions and 345 deletions.
2 changes: 1 addition & 1 deletion argmin/core/checkpointing/enum.CheckpointingFrequency.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions argmin/core/checkpointing/struct.FileCheckpoint.html
Original file line number Diff line number Diff line change
@@ -26,22 +26,22 @@ <h5 id="example"><a href="#example">Example</a></h5>
<p>If the directory does not exist already, it will be created. It uses <code>bincode</code> to serialize
the data.
It will return an error if creating the directory or file or serialization failed.</p>
<h5 id="example-1"><a href="#example-1">Example</a></h5>
<h5 id="example-2"><a href="#example-2">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>argmin::core::checkpointing::{FileCheckpoint, CheckpointingFrequency, Checkpoint};

checkpoint.save(<span class="kw-2">&amp;</span>solver, <span class="kw-2">&amp;</span>state);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.load" class="method trait-impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#155-163">source</a><a href="#method.load" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Checkpoint.html#tymethod.load" class="fn">load</a>(&amp;self) -&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="enum" href="https://doc.rust-lang.org/1.75.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.tuple.html">(S, I)</a>&gt;, <a class="struct" href="../struct.Error.html" title="struct argmin::core::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Load a checkpoint from disk.</p>
<p>If there is no checkpoint on disk, it will return <code>Ok(None)</code>.
Returns an error if opening the file or deserialization failed.</p>
<h5 id="example-2"><a href="#example-2">Example</a></h5>
<h5 id="example-3"><a href="#example-3">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>argmin::core::checkpointing::{FileCheckpoint, CheckpointingFrequency, Checkpoint};

<span class="kw">let </span>(solver, state) = checkpoint.load()<span class="question-mark">?</span>.unwrap();</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.frequency" class="method trait-impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#168-170">source</a><a href="#method.frequency" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Checkpoint.html#tymethod.frequency" class="fn">frequency</a>(&amp;self) -&gt; <a class="enum" href="enum.CheckpointingFrequency.html" title="enum argmin::core::checkpointing::CheckpointingFrequency">CheckpointingFrequency</a></h4></section></summary><div class="docblock"><p>Returns the how often a checkpoint is to be saved.</p>
<p>Used internally by <a href="trait.Checkpoint.html#method.save_cond" title="method argmin::core::checkpointing::Checkpoint::save_cond"><code>save_cond</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.save_cond" class="method trait-impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/mod.rs.html#174-181">source</a><a href="#method.save_cond" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Checkpoint.html#method.save_cond" class="fn">save_cond</a>(&amp;self, solver: <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.reference.html">&amp;S</a>, state: <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.reference.html">&amp;I</a>, iter: <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.u64.html">u64</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="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct argmin::core::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Saves a checkpoint when the checkpointing condition is met. <a href="trait.Checkpoint.html#method.save_cond">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-FileCheckpoint" class="impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#16">source</a><a href="#impl-Clone-for-FileCheckpoint" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileCheckpoint.html" title="struct argmin::core::checkpointing::FileCheckpoint">FileCheckpoint</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#16">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.FileCheckpoint.html" title="struct argmin::core::checkpointing::FileCheckpoint">FileCheckpoint</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.75.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.75.0/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.75.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-FileCheckpoint" class="impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#16">source</a><a href="#impl-Debug-for-FileCheckpoint" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileCheckpoint.html" title="struct argmin::core::checkpointing::FileCheckpoint">FileCheckpoint</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#16">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.75.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.75.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.75.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.75.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-FileCheckpoint" class="impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#26-50">source</a><a href="#impl-Default-for-FileCheckpoint" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.75.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileCheckpoint.html" title="struct argmin::core::checkpointing::FileCheckpoint">FileCheckpoint</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../../src/argmin/core/checkpointing/file.rs.html#43-49">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.75.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; <a class="struct" href="struct.FileCheckpoint.html" title="struct argmin::core::checkpointing::FileCheckpoint">FileCheckpoint</a></h4></section></summary><div class="docblock"><p>Create a default <code>FileCheckpoint</code> instance.</p>
<p>This will save the checkpoint in the file <code>.checkpoints/checkpoint.arg</code>.</p>
<h5 id="example-3"><a href="#example-3">Example</a></h5>
<h5 id="example-1"><a href="#example-1">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>argmin::core::checkpointing::FileCheckpoint;

<span class="kw">let </span>checkpoint = FileCheckpoint::default();</code></pre></div>
4 changes: 2 additions & 2 deletions argmin/core/enum.KvValue.html

Large diffs are not rendered by default.

Loading

0 comments on commit dfcc8f0

Please sign in to comment.