rcf 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d050fe5e3a88cc6361c5cdb592b558cca82c1c7c35daeb9398db69929d94451d
4
- data.tar.gz: 932e1d587efeed620a8f833ab95a2b94a29424430264c11b92cc56e88a86bb3e
3
+ metadata.gz: 8f225cb5b79c0d6f3d37ec55a602100ce9486b94049ba54633267361fac10f78
4
+ data.tar.gz: 9c3a90dbdf238dbf039d1dbdc1e1d1ba11ab7152939a7209369cf54e0ac09e7c
5
5
  SHA512:
6
- metadata.gz: dd55dac9c224b53617af4a91d56c4bcfdd0b1317b03bee93c35fba20798d3d94a1af874ae9a103b32cd53f5418c89c4a7489ae3bd3c8cfce0267a8beb3b9837b
7
- data.tar.gz: 3ab0d7a74cf233855b28dcb751c11e77b78efbd88afcfb19e1cfd6533852f3f354db74e06726883bb9dcd3af27b744a6dfe887ace0f60aaca9848ee2d915e7ec
6
+ metadata.gz: 610dd6ccd82842910cfa8e2c288f0cd0be17171e8d59643a7e50b591ca0cd4b2965fb22246b2996700c688bf0e6341bf5c30261e76228a41fba0f4d57e94edf5
7
+ data.tar.gz: f0a390279a934ffda80fe0df4041b63716fa069b4eb9694a46923474ae0df409861fdc871a376b52f482e474e08d7873509672821d4269972c10803596ecf63a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.2.0 (2024-10-23)
2
+
3
+ - Updated RCF to 4.0.0
4
+ - Dropped support for Ruby < 3.1
5
+
6
+ ## 0.1.2 (2023-06-07)
7
+
8
+ - Fixed error with `dup` and `clone`
9
+
1
10
  ## 0.1.1 (2022-11-06)
2
11
 
3
12
  - Added support for parameters
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Random Cut Forest](https://github.com/aws/random-cut-forest-by-aws) (RCF) anomaly detection for Ruby
4
4
 
5
- [![Build Status](https://github.com/ankane/random-cut-forest-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/random-cut-forest-ruby/actions)
5
+ [![Build Status](https://github.com/ankane/random-cut-forest-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/random-cut-forest-ruby/actions)
6
6
 
7
7
  ## Installation
8
8
 
@@ -53,7 +53,7 @@ end
53
53
 
54
54
  ## Parameters
55
55
 
56
- Set parameters [unreleased]
56
+ Set parameters
57
57
 
58
58
  ```ruby
59
59
  Rcf::Forest.new(
data/lib/rcf/forest.rb CHANGED
@@ -4,7 +4,7 @@ module Rcf
4
4
  @dimensions = dimensions
5
5
 
6
6
  @pointer = FFI.rcf_create(dimensions)
7
- ObjectSpace.define_finalizer(self, self.class.finalize(@pointer))
7
+ @pointer.free = FFI["rcf_free"]
8
8
 
9
9
  set_param("shingle_size", shingle_size)
10
10
  set_param("sample_size", sample_size)
@@ -21,11 +21,6 @@ module Rcf
21
21
  FFI.rcf_update(@pointer, point_ptr(point))
22
22
  end
23
23
 
24
- def self.finalize(pointer)
25
- # must use proc instead of stabby lambda
26
- proc { FFI.rcf_free(pointer) }
27
- end
28
-
29
24
  private
30
25
 
31
26
  def set_param(param, value)
data/lib/rcf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rcf
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end