GCC7 | Clang7 | Clang6 |
---|---|---|
A simple C++ time-series library.
#include <numeric>
#include <TimeSeries.h>
USER_DECLARE_TS(MyDoubleTs, double);
USER_DECLARE_TS_ND(MyTimeSerie3d, double, 3);
int main()
{
auto s = MyDoubleTs{100}; // length 100
std::generate(std::begin(s), std::end(s), [i = 0.]() mutable {
return std::pair<double, double>{i, i*2.};
i++
});
auto first_value = s[0]; // = 0.
auto second_value = s[1]; // = 2.
auto s2 = MyTimeSerie3d({100, 10, 5}); //shape 100,10,5
return 0;
}
From your project sources:
mkdir -p subprojects
cat > subprojects/TimeSeries.wrap <<EOF
[wrap-git]
directory = TimeSeries
url = https://github.com/jeandet/TimeSeries.git
revision = master
EOF
Usually using it a project submodule is enough, if you really want to install it on your system:
meson build
cd build
ninja
sudo ninja install
Uninstalling:
sudo ninja uninstall