Sha256: 4edb8f85cc362f5fdad51929287177f5824fb714ec1a0942ddebd915fadae3cd
Contents?: true
Size: 638 Bytes
Versions: 1
Compression:
Stored size: 638 Bytes
Contents
// rice #include <rice/rice.hpp> #include <rice/stl.hpp> std::vector<size_t> anomalies(const std::vector<float>& x, int period, float k, float alpha, const std::string& direction); extern "C" void Init_ext() { auto rb_mAnomalyDetection = Rice::define_module("AnomalyDetection"); rb_mAnomalyDetection .define_singleton_function( "_detect", [](std::vector<float> x, int period, float k, float alpha, const std::string& direction) { auto res = anomalies(x, period, k, alpha, direction); auto a = Rice::Array(); for (auto v : res) { a.push(v); } return a; }); }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anomaly_detection-0.1.0 | ext/anomaly_detection/ext.cpp |