breakout-detection 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b665aa0eaa17e43b38e8a4375a1f09c5885d19f6f461cae910ff4b8a7468bcc
4
- data.tar.gz: 68c844bcfd8085d10e2ff2e081364a57c17c54c107f22cff2f9b78049cdb19a1
3
+ metadata.gz: 8a0ba64d0eabd1b0a9498549ac7fba2845a16f2c29ac92887f2634e9282bc97d
4
+ data.tar.gz: 91ddb465b3444dc6ddcf294ad80c93b862cbc7d0653bf20fe3c6f4c103329edc
5
5
  SHA512:
6
- metadata.gz: 4b729d9d68272f9b9453af53a183fff49717bc5669ed3fbf2e0e57f41b20513fe2412a4fa8822591b764cb7b801c8f152e0d97aec231bb5730ec644f30fa7e8a
7
- data.tar.gz: a847b56c452c8ac3874f3bdc0239d4f5755a33e6bf2c06a3162ac27eea8c435175bd72608b22fe617ea40a4242224869c005382cb2e51b906a86b1601d4240e0
6
+ metadata.gz: 883109f457e918d875fbb7a7a5f391c94c4349e6f1ffb9820b5240af22f6ff381b47ea7df26571851c31cec026e1e4d16ade68df767e03f2a625747fbfa5a804
7
+ data.tar.gz: 9e5b96d0e3b348c9f52b3e7e4286b3f78c56641e814a0febb969b5bc368f97af49f1715042b83d082f1c13ab34bd2879e8926da9c6229157e1f8aeb8bc870842
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.3.1 (2025-10-26)
2
+
3
+ - Fixed error with Rice 4.7
4
+
5
+ ## 0.3.0 (2025-04-03)
6
+
7
+ - Dropped support for Ruby < 3.2
8
+
1
9
  ## 0.2.0 (2023-05-11)
2
10
 
3
11
  - Dropped support for Ruby < 3
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Learn [how it works](https://blog.twitter.com/engineering/en_us/a/2014/breakout-detection-in-the-wild)
6
6
 
7
- [![Build Status](https://github.com/ankane/breakout-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/breakout-ruby/actions)
7
+ [![Build Status](https://github.com/ankane/breakout-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/breakout-ruby/actions)
8
8
 
9
9
  ## Installation
10
10
 
@@ -20,9 +20,9 @@ Detect breakouts in a time series
20
20
 
21
21
  ```ruby
22
22
  series = {
23
- Date.parse("2020-01-01") => 100,
24
- Date.parse("2020-01-02") => 150,
25
- Date.parse("2020-01-03") => 136,
23
+ Date.parse("2025-01-01") => 100,
24
+ Date.parse("2025-01-02") => 150,
25
+ Date.parse("2025-01-03") => 136,
26
26
  # ...
27
27
  }
28
28
 
@@ -1,5 +1,6 @@
1
1
  #include <algorithm>
2
2
  #include <cmath>
3
+ #include <functional>
3
4
  #include <set>
4
5
  #include <vector>
5
6
  #include "helper.h"
@@ -6,6 +6,7 @@
6
6
 
7
7
  #include <algorithm>
8
8
  #include <cmath>
9
+ #include <functional>
9
10
  #include <set>
10
11
  #include <vector>
11
12
  #include "helper.h"
@@ -6,6 +6,7 @@ Instead of calculating mean(X), we calculate median(X), and similarly for Y
6
6
 
7
7
  #include <algorithm>
8
8
  #include <cmath>
9
+ #include <functional>
9
10
  #include <queue>
10
11
  #include <vector>
11
12
 
@@ -15,7 +16,7 @@ double getMedian(const std::priority_queue<double, std::vector<double>, std::gre
15
16
 
16
17
  std::vector<int> EDMX(const std::vector<double>& Z, int min_size = 24, double alpha = 2) {
17
18
 
18
- alpha = 2; // Not used, just here for uniform funciton signature
19
+ alpha = 2; // Not used, just here for uniform function signature
19
20
 
20
21
  std::priority_queue<double> LeftMax;
21
22
  std::priority_queue<double, std::vector<double>, std::greater<double>> LeftMin;
data/ext/breakout/ext.cpp CHANGED
@@ -1,4 +1,6 @@
1
- // rice
1
+ #include <string>
2
+ #include <vector>
3
+
2
4
  #include <rice/rice.hpp>
3
5
  #include <rice/stl.hpp>
4
6
 
@@ -44,7 +46,7 @@ void Init_ext() {
44
46
 
45
47
  auto a = Rice::Array();
46
48
  for (auto v : res) {
47
- a.push(v);
49
+ a.push(v, false);
48
50
  }
49
51
  return a;
50
52
  });
@@ -1,6 +1,8 @@
1
1
  #include <algorithm>
2
2
  #include <cmath>
3
+ #include <functional>
3
4
  #include <set>
5
+ #include "helper.h"
4
6
 
5
7
  extern double Linear(double x) { return 1; }
6
8
  extern double Const(double x) { return 0; }
@@ -2,6 +2,7 @@
2
2
 
3
3
  #include <algorithm>
4
4
  #include <cmath>
5
+ #include <functional>
5
6
  #include <set>
6
7
 
7
8
  double get_median(const std::multiset<double>&, const std::multiset<double, std::greater<double>>&);
@@ -1,3 +1,3 @@
1
1
  module Breakout
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -1 +1 @@
1
- require "breakout"
1
+ require_relative "breakout"
data/lib/breakout.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  require "breakout/ext"
3
3
 
4
4
  # modules
5
- require "breakout/version"
5
+ require_relative "breakout/version"
6
6
 
7
7
  module Breakout
8
8
  class << self
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breakout-detection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-05-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rice
@@ -16,15 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 4.0.2
18
+ version: '4.7'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: 4.0.2
27
- description:
25
+ version: '4.7'
28
26
  email: andrew@ankane.org
29
27
  executables: []
30
28
  extensions:
@@ -49,7 +47,6 @@ homepage: https://github.com/ankane/breakout-ruby
49
47
  licenses:
50
48
  - GPL-2.0-or-later
51
49
  metadata: {}
52
- post_install_message:
53
50
  rdoc_options: []
54
51
  require_paths:
55
52
  - lib
@@ -57,15 +54,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
54
  requirements:
58
55
  - - ">="
59
56
  - !ruby/object:Gem::Version
60
- version: '3'
57
+ version: '3.2'
61
58
  required_rubygems_version: !ruby/object:Gem::Requirement
62
59
  requirements:
63
60
  - - ">="
64
61
  - !ruby/object:Gem::Version
65
62
  version: '0'
66
63
  requirements: []
67
- rubygems_version: 3.4.10
68
- signing_key:
64
+ rubygems_version: 3.6.9
69
65
  specification_version: 4
70
66
  summary: Breakout detection for Ruby
71
67
  test_files: []