Skip to content

Commit

Permalink
deploy: 8af03b6
Browse files Browse the repository at this point in the history
  • Loading branch information
taehyounpark committed Mar 30, 2024
1 parent 2870a78 commit 06ad776
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
5 changes: 5 additions & 0 deletions classqueryosity_1_1dataset_1_1source.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ <h2><a href="#derived-classes">Derived classes</a></h2>
class <a class="m-doc" href="classqueryosity_1_1dataset_1_1reader.html">reader</a>
</dt>
<dd>Custom dataset reader.</dd>
<dt>
<div class="m-doc-template">template &lt;<span class="m-doc-template-params"><span class="m-doc-template-param">typename DS</span></span>&gt;</div>
class <a class="m-doc" href="classqueryosity_1_1dataset_1_1reader.html">reader</a>
</dt>
<dd>Custom dataset reader.</dd>
</dl>
</section>
<section id="pub-methods">
Expand Down
11 changes: 4 additions & 7 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ <h3>Contents</h3>
<span class="cp">#include</span> <span class="cpf">&lt;vector&gt;</span>
<span class="cp">#include</span> <span class="cpf">&lt;sstream&gt;</span>

<span class="k">namespace</span> <span class="nn">qty</span> <span class="o">=</span> <span class="nn">queryosity</span><span class="p">;</span>

<span class="k">using</span> <span class="nc">dataflow</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">dataflow</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">multithread</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">multithread</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">dataset</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">dataset</span><span class="p">;</span>
Expand All @@ -87,7 +85,7 @@ <h3>Contents</h3>

<span class="k">using</span> <span class="nc">json</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">json</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">h1d</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">hist</span><span class="o">&lt;</span><span class="k">double</span><span class="o">&gt;</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">linax</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">axis</span><span class="o">::</span><span class="n">linear</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">linax</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">axis</span><span class="o">::</span><span class="n">regular</span><span class="p">;</span>

<span class="k">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>

Expand Down Expand Up @@ -202,9 +200,8 @@ <h3>Contents</h3>
</svg> as systematic variations.</li></ul></li></ol><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"qhep/Hist.h"</span>
<span class="cp">#include</span> <span class="cpf">"qhep/Tree.h"</span>

<span class="cp">#include</span> <span class="cpf">"queryosity/queryosity.h"</span>
<span class="cp">#include</span> <span class="cpf">"queryosity.h"</span>

<span class="k">namespace</span> <span class="nn">qty</span> <span class="o">=</span> <span class="nn">queryosity</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">dataflow</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">dataflow</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">multithread</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">multithread</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">dataset</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">dataset</span><span class="p">;</span>
Expand Down Expand Up @@ -474,7 +471,7 @@ <h3>Contents</h3>
<span class="k">using</span> <span class="nc">VecF</span> <span class="o">=</span> <span class="n">ROOT</span><span class="o">::</span><span class="n">RVec</span><span class="o">&lt;</span><span class="k">float</span><span class="o">&gt;</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">VecD</span> <span class="o">=</span> <span class="n">ROOT</span><span class="o">::</span><span class="n">RVec</span><span class="o">&lt;</span><span class="k">double</span><span class="o">&gt;</span><span class="p">;</span>

<span class="cp">#include</span> <span class="cpf">"queryosity/queryosity.h"</span>
<span class="cp">#include</span> <span class="cpf">"queryosity.h"</span>

<span class="k">using</span> <span class="nc">dataflow</span> <span class="o">=</span> <span class="nn">queryosity</span><span class="o">::</span><span class="nc">dataflow</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">multithread</span> <span class="o">=</span> <span class="nn">queryosity</span><span class="o">::</span><span class="nn">multithread</span><span class="p">;</span>
Expand Down Expand Up @@ -660,7 +657,7 @@ <h3>Contents</h3>
<span class="cp">#include</span> <span class="cpf">&lt;cstdlib&gt;</span>
<span class="cp">#include</span> <span class="cpf">&lt;functional&gt;</span>

<span class="cp">#include</span> <span class="cpf">"queryosity/queryosity.h"</span>
<span class="cp">#include</span> <span class="cpf">"queryosity.h"</span>

<span class="cp">#include</span> <span class="cpf">"TCanvas.h"</span>
<span class="cp">#include</span> <span class="cpf">&lt;ROOT/RVec.hxx&gt;</span>
Expand Down
9 changes: 4 additions & 5 deletions guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,14 @@ <h3>Contents</h3>
<li><a href="#guide-vary">Systematic variations</a></li>
</ul>
</nav>
<section id="guide-dataflow"><h2><a href="#guide-dataflow">Dataflow</a></h2><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"queryosity/queryosity.h"</span>
<section id="guide-dataflow"><h2><a href="#guide-dataflow">Dataflow</a></h2><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"queryosity.h"</span>

<span class="k">namespace</span> <span class="nn">qty</span> <span class="o">=</span> <span class="nn">queryosity</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">dataflow</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">dataflow</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">multithread</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">multithread</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">dataset</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">dataset</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">column</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">column</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">query</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">query</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">systematic</span> <span class="o">=</span> <span class="nn">qty</span><span class="o">::</span><span class="nn">systematic</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">dataflow</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">dataflow</span><span class="p">;</span>

<span class="k">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>

Expand All @@ -87,7 +86,7 @@ <h3>Contents</h3>
<span class="c1">// your analysis here...</span>

<span class="p">}</span></pre><p>The dataflow accepts several options to configure the dataset processing. Up to three keyword arguments can be provided in any order.</p><pre class="m-code"><span class="c1">// multithreaded run with a custom weight over the first 100 entries</span>
<span class="n">dataflow</span> <span class="nf">df</span><span class="p">(</span><span class="n">multithread</span><span class="o">::</span><span class="nf">enable</span><span class="p">(),</span> <span class="n">dataset</span><span class="o">::</span><span class="nf">weight</span><span class="p">(</span><span class="mf">1.234</span><span class="p">),</span> <span class="n">dataset</span><span class="o">::</span><span class="nf">head</span><span class="p">(</span><span class="mi">100</span><span class="p">));</span></pre><table class="m-table"><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>multithread::enable(nthreads)</code></td><td>Enable multithreading up to <code>nthreads</code>.</td><td><code>-1</code> (system maximum)</td></tr><tr><td><code>multithread::disable()</code></td><td>Disable multithreading.</td><td></td></tr><tr><td><code>dataset::weight(scale)</code></td><td>Apply a global <code>scale</code> to all weights.</td><td><code>1.0</code></td></tr><tr><td><code>dataset::head(nrows)</code></td><td>Process the first <code>nrows</code> of the dataset.</td><td><code>-1</code> (all entries)</td></tr></tbody></table></section><section id="guide-dataset-reader"><h2><a href="#guide-dataset-reader">Reading a dataset</a></h2><p>Call <a class="m-doc" href="classqueryosity_1_1dataflow.html#a89a76c336e2a58437fedef55ed1a59f9">queryosity::<wbr/>dataflow::<wbr/>load()</a> with a <a class="m-doc poxy-injected" href="classqueryosity_1_1dataset_1_1reader.html">queryosity::<wbr/>dataset::<wbr/>input</a> (specifying the dataset reader and its constructor arguments). The loaded dataset can then read <a class="m-doc" href="classqueryosity_1_1dataset_1_1column.html">queryosity::<wbr/>dataset::<wbr/>column</a> (specifying the column data type and name).</p><pre class="m-code"><span class="k">using</span> <span class="nc">json</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">json</span><span class="p">;</span>
<span class="n">dataflow</span> <span class="nf">df</span><span class="p">(</span><span class="n">multithread</span><span class="o">::</span><span class="nf">enable</span><span class="p">(),</span> <span class="n">dataset</span><span class="o">::</span><span class="nf">weight</span><span class="p">(</span><span class="mf">1.234</span><span class="p">),</span> <span class="n">dataset</span><span class="o">::</span><span class="nf">head</span><span class="p">(</span><span class="mi">100</span><span class="p">));</span></pre><table class="m-table"><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>multithread::enable(nthreads)</code></td><td>Enable multithreading up to <code>nthreads</code>.</td><td><code>-1</code> (system maximum)</td></tr><tr><td><code>multithread::disable()</code></td><td>Disable multithreading.</td><td></td></tr><tr><td><code>dataset::weight(scale)</code></td><td>Apply a global <code>scale</code> to all weights.</td><td><code>1.0</code></td></tr><tr><td><code>dataset::head(nrows)</code></td><td>Process the first <code>nrows</code> of the dataset.</td><td><code>-1</code> (all entries)</td></tr></tbody></table></section><section id="guide-dataset-reader"><h2><a href="#guide-dataset-reader">Reading a dataset</a></h2><p>Call <a class="m-doc" href="classqueryosity_1_1dataflow.html#a89a76c336e2a58437fedef55ed1a59f9">queryosity::<wbr/>dataflow::<wbr/>load()</a> with an input dataset and its constructor arguments. The loaded dataset can then read out columns, provided their data types and names.</p><pre class="m-code"><span class="k">using</span> <span class="nc">json</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">json</span><span class="p">;</span>

<span class="c1">// load a dataset</span>
<span class="nn">std</span><span class="o">::</span><span class="nc">ifstream</span> <span class="nf">data</span><span class="p">(</span><span class="s">"data.json"</span><span class="p">);</span>
Expand Down Expand Up @@ -161,7 +160,7 @@ <h3>Contents</h3>
<span class="k">auto</span> <span class="n">cut_a_and_b</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="nf">filter</span><span class="p">(</span><span class="n">cut_a</span> <span class="o">&amp;&amp;</span> <span class="n">cut_b</span><span class="p">);</span>
<span class="k">auto</span> <span class="n">cut_b_or_c</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="nf">filter</span><span class="p">(</span><span class="n">cut_b</span> <span class="o">||</span> <span class="n">cut_c</span><span class="p">);</span></pre></section><section id="guide-query"><h2><a href="#guide-query">Making queries</a></h2><p>Call <a class="m-doc" href="classqueryosity_1_1dataflow.html#a2dd1a0d952f554aa90c8ab1438706f40">queryosity::<wbr/>dataflow::<wbr/>make()</a> with a "plan" specifying the exact definition and constructor arguments of the qeury. Subsequently, the plan can be filled with input columns and booked at a selection to instantiate the query.</p><pre class="m-code"><span class="k">using</span> <span class="nc">h1d</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">hist</span><span class="o">&lt;</span><span class="k">double</span><span class="o">&gt;</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">h2d</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">hist</span><span class="o">&lt;</span><span class="k">double</span><span class="p">,</span><span class="k">double</span><span class="o">&gt;</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">linax</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">axis</span><span class="o">::</span><span class="n">linear</span><span class="p">;</span>
<span class="k">using</span> <span class="nc">linax</span> <span class="o">=</span> <span class="n">qty</span><span class="o">::</span><span class="n">hist</span><span class="o">::</span><span class="n">axis</span><span class="o">::</span><span class="n">regular</span><span class="p">;</span>

<span class="c1">// instantiate a 1d histogram query filled with x over all entries</span>
<span class="k">auto</span> <span class="n">q</span> <span class="o">=</span> <span class="n">df</span><span class="p">.</span><span class="nf">make</span><span class="p">(</span><span class="n">query</span><span class="o">::</span><span class="n">plan</span><span class="o">&lt;</span><span class="n">h1d</span><span class="o">&gt;</span><span class="p">(</span><span class="nf">linax</span><span class="p">(</span><span class="mi">100</span><span class="p">,</span><span class="mf">0.0</span><span class="p">,</span><span class="mf">1.0</span><span class="p">))).</span><span class="nf">fill</span><span class="p">(</span><span class="n">x</span><span class="p">).</span><span class="nf">book</span><span class="p">(</span><span class="n">inclusive</span><span class="p">);</span>
Expand Down
4 changes: 2 additions & 2 deletions install.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ <h3>Contents</h3>
<span class="err">...</span>
<span class="nb">add_library</span><span class="p">(</span><span class="s">YourProject</span> <span class="s">...</span><span class="p">)</span>
<span class="err">...</span>
<span class="nb">target_link_libraries</span><span class="p">(</span><span class="s">YourProject</span> <span class="s">INTERFACE</span> <span class="s">queryosity::queryosity</span><span class="p">)</span></pre><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"queryosity/queryosity.h"</span></pre></section><section id="install-cmake-integrated"><h3><a href="#install-cmake-integrated">Integrated</a></h3><pre class="m-code"><span class="nb">add_subdirectory</span><span class="p">(</span><span class="s">queryosity</span><span class="p">)</span>
<span class="nb">target_link_libraries</span><span class="p">(</span><span class="s">YourProject</span> <span class="s">INTERFACE</span> <span class="s">queryosity::queryosity</span><span class="p">)</span></pre><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"queryosity.h"</span></pre></section><section id="install-cmake-integrated"><h3><a href="#install-cmake-integrated">Integrated</a></h3><pre class="m-code"><span class="nb">add_subdirectory</span><span class="p">(</span><span class="s">queryosity</span><span class="p">)</span>
<span class="err">...</span>
<span class="nb">add_library</span><span class="p">(</span><span class="s">YourProject</span> <span class="s">...</span><span class="p">)</span>
<span class="err">...</span>
<span class="nb">target_link_libraries</span><span class="p">(</span><span class="s">YourProject</span> <span class="s">INTERFACE</span> <span class="s">queryosity::queryosity</span><span class="p">)</span></pre><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"queryosity/queryosity.h"</span></pre></section></section>
<span class="nb">target_link_libraries</span><span class="p">(</span><span class="s">YourProject</span> <span class="s">INTERFACE</span> <span class="s">queryosity::queryosity</span><span class="p">)</span></pre><pre class="m-code"><span class="cp">#include</span> <span class="cpf">"queryosity.h"</span></pre></section></section>
</div>
</div>
</div>
Expand Down
12 changes: 12 additions & 0 deletions queryosity.tagfile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,18 @@
<arglist>()=0</arglist>
</member>
</compound>
<compound kind="class">
<name>reader&lt; csv &gt;</name>
<filename>classqueryosity_1_1dataset_1_1reader.html</filename>
<base>queryosity::dataset::source</base>
<member kind="function" virtualness="pure">
<type>virtual std::vector&lt; std::pair&lt; unsigned long long, unsigned long long &gt; &gt;</type>
<name>partition</name>
<anchorfile>classqueryosity_1_1dataset_1_1source.html</anchorfile>
<anchor>a4ed39552c2a5f0c8cafb3e1a5294cddf</anchor>
<arglist>()=0</arglist>
</member>
</compound>
<compound kind="class">
<name>reader&lt; json &gt;</name>
<filename>classqueryosity_1_1dataset_1_1reader.html</filename>
Expand Down

0 comments on commit 06ad776

Please sign in to comment.