Skip to content

Commit 6152ab7

Browse files
authored
Update README.md
1 parent 31f96d8 commit 6152ab7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,19 @@ int main() {
4242
dataflow df(multithread::enable(10));
4343

4444
std::ifstream data("data.json");
45-
auto [x, v, w] = df.read(
46-
dataset::input<json>(data), dataset::column<double>("x"),
47-
dataset::column<std::vector<double>>("v"), dataset::column<double>("w"));
45+
auto [x, w] = df.read(
46+
dataset::input<json>(data), dataset::column<std::vector<double>>("x"), dataset::column<double>("w"));
4847

4948
auto zero = df.define(column::constant(0));
50-
auto v0 = v[zero];
49+
auto x0 = x[zero];
5150

5251
auto sel =
5352
df.weight(w)
5453
.filter(column::expression(
55-
[](std::vector<double> const &v) { return v.size(); }))(v)
56-
.filter(column::expression([](double x) { return x > 100.0; }))(x);
54+
[](std::vector<double> const &v) { return v.size(); }))(v);
5755

5856
auto h_x0_w = df.get(query::output<h1d>(linax(20, 0.0, 200.0)))
59-
.fill(v0)
57+
.fill(x0)
6058
.at(sel)
6159
.result();
6260

0 commit comments

Comments
 (0)