-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
col -> series, formatting + organization
- Loading branch information
1 parent
097cec3
commit 8af03b6
Showing
15 changed files
with
400 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if (QUERYOSITY_EXAMPLES) | ||
|
||
add_executable(example-hello_world ./example-hello_world.cxx) | ||
target_compile_features(example-hello_world PUBLIC cxx_std_17) | ||
target_link_libraries(example-hello_world queryosity::extensions pthread ${Boost_LIBRARIES}) | ||
add_test(NAME example-hello_world COMMAND example-hello_world) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include "queryosity/json.h" | ||
#include "queryosity/hist.h" | ||
|
||
#include "queryosity.h" | ||
|
||
#include <fstream> | ||
#include <vector> | ||
#include <sstream> | ||
|
||
using dataflow = qty::dataflow; | ||
namespace multithread = qty::multithread; | ||
namespace dataset = qty::dataset; | ||
namespace column = qty::column; | ||
namespace query = qty::query; | ||
|
||
using json = qty::json; | ||
using h1d = qty::hist::hist<double>; | ||
using linax = qty::hist::axis::regular; | ||
|
||
int main() | ||
{ | ||
|
||
dataflow df(multithread::enable(10)); | ||
|
||
std::ifstream data("data.json"); | ||
auto [x, w] = df.read( | ||
dataset::input<json>(data), | ||
dataset::column<std::vector<double>>("x_nom"), | ||
dataset::column<double>("w_nom")); | ||
|
||
auto zero = df.define(column::constant(0)); | ||
auto x0 = x[zero]; | ||
|
||
auto sel = df.weight(w).filter( | ||
column::expression([](std::vector<double> const &v) | ||
{ return v.size(); }), | ||
x); | ||
|
||
auto h_x0_w = df.make( | ||
query::plan<h1d>(linax(100, 0.0, 1.0))) | ||
.fill(x0) | ||
.book(sel) | ||
.result(); | ||
|
||
// std::ostringstream os; os << *h_x0_w; | ||
// std::cout << os.str() << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.