Crypto backtesting
Loading...
Searching...
No Matches
anonymous_namespace{main.cxx} Namespace Reference

Variables

const std::vector< std::vector< double > > xs
 An example of a full set of price data.
constexpr auto xs2 = std::array{1, 2, 3, 4, 5, 6}
 A single row of price data.
constexpr auto xs3
 A single column of price data.

Variable Documentation

◆ xs

const std::vector<std::vector<double> > anonymous_namespace{main.cxx}::xs
Initial value:
= [] {
auto &&xs = std::vector<std::vector<double>>{};
auto &&row = std::vector<double>{0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f};
for (size_t i = 0; i < 2000; ++i) {
row[0] = static_cast<double>(i);
xs.emplace_back(row);
}
return xs;
}()
const std::vector< std::vector< double > > xs
An example of a full set of price data.
Definition main.cxx:13

An example of a full set of price data.

Definition at line 13 of file main.cxx.

13 {
14 auto &&xs = std::vector<std::vector<double>>{};
15 auto &&row = std::vector<double>{0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f};
16
17 for (size_t i = 0; i < 2000; ++i) {
18 row[0] = static_cast<double>(i);
19 xs.emplace_back(row);
20 }
21
22 return xs;
23}();

◆ xs2

auto anonymous_namespace{main.cxx}::xs2 = std::array{1, 2, 3, 4, 5, 6}
constexpr

A single row of price data.

Definition at line 26 of file main.cxx.

26{1, 2, 3, 4, 5, 6};

◆ xs3

auto anonymous_namespace{main.cxx}::xs3
constexpr
Initial value:
= [] {
std::array<double, 2000> xs;
for (auto i : std::views::iota(0, fx::to_size<int>(xs)))
xs[i] = static_cast<double>(i);
return xs;
}()
constexpr T to_size(std::ranges::range auto &&xs)
Calculate size of a series, return type depends on input param.
Definition core.h:14

A single column of price data.

Definition at line 29 of file main.cxx.

29 {
30 std::array<double, 2000> xs;
31 for (auto i : std::views::iota(0, fx::to_size<int>(xs)))
32 xs[i] = static_cast<double>(i);
33
34 return xs;
35}();