ckmeans 1.0.3 → 1.0.4
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 +4 -4
 - data/CHANGELOG.md +16 -3
 - data/ext/ckmeans/extensions.c +3 -7
 - data/lib/ckmeans/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 17dd59ae47e814d5cf0b45665856a52e33e1af22c90722955750004405633a4e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4278bb18d8a987ac71fd7ea179055ab6d2c15292d772b7d9df1dd8c4adde011b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 7e3d19cfbfbebb0b26bf1ffdd7c99998a898ccf123359994e339147735b819f3f16fc73c2ac202a3fbe3c4f1c13c747e7181d01d56770be5404ca6354533b23d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2be82db12f8d9da2cafb03713440f3083d2ffd7fd7f6917ad8e98d1c864b1d97f99e9a0771afe6aaaff502fee86d81e9221b8d689a388817b060fc7ce1917a87
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,9 +1,22 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ## [Unreleased]
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            ## [1.0. 
     | 
| 
      
 3 
     | 
    
         
            +
            ## [1.0.4] - 2025-05-01
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            - https://github.com/vlebedeff/rb-ckmeans/pull/ 
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
      
 5 
     | 
    
         
            +
            - Simpler capacity size expression ([#14](https://github.com/vlebedeff/rb-ckmeans/pull/14))
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## [1.0.3] - 2025-05-01
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            - More frugal memory allocation ([#11](https://github.com/vlebedeff/rb-ckmeans/pull/11))
         
     | 
| 
      
 10 
     | 
    
         
            +
            - Use `rb_iv_get` for brevity
         
     | 
| 
      
 11 
     | 
    
         
            +
            - Various optimizations ([#10](https://github.com/vlebedeff/rb-ckmeans/pull/10))
         
     | 
| 
      
 12 
     | 
    
         
            +
            - Extract `LDouble` type definition
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Remove `ruby-prof` gem
         
     | 
| 
      
 14 
     | 
    
         
            +
            - Rename `nvalues` to `size`
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            ## [1.0.2] - 2025-04-24
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            - Polish & Housekeeping ([#9](https://github.com/vlebedeff/rb-ckmeans/pull/9))
         
     | 
| 
      
 19 
     | 
    
         
            +
            - Fix int variable sign ([#8](https://github.com/vlebedeff/rb-ckmeans/pull/8))
         
     | 
| 
       7 
20 
     | 
    
         | 
| 
       8 
21 
     | 
    
         
             
            ## [1.0.0] - 2025-04-22
         
     | 
| 
       9 
22 
     | 
    
         | 
    
        data/ext/ckmeans/extensions.c
    CHANGED
    
    | 
         @@ -103,6 +103,7 @@ void Init_extensions(void) { 
     | 
|
| 
       103 
103 
     | 
    
         
             
            }
         
     | 
| 
       104 
104 
     | 
    
         | 
| 
       105 
105 
     | 
    
         
             
            # define ARENA_MIN_CAPACITY 100
         
     | 
| 
      
 106 
     | 
    
         
            +
            # define ALLOCATION_FACTOR 3
         
     | 
| 
       106 
107 
     | 
    
         
             
            # define PIx2 (M_PI * 2.0)
         
     | 
| 
       107 
108 
     | 
    
         | 
| 
       108 
109 
     | 
    
         
             
            VALUE rb_ckmeans_sorted_group_sizes(VALUE self)
         
     | 
| 
         @@ -112,13 +113,8 @@ VALUE rb_ckmeans_sorted_group_sizes(VALUE self) 
     | 
|
| 
       112 
113 
     | 
    
         
             
                uint32_t kmax        = NUM2UINT(rb_iv_get(self, "@kmax"));
         
     | 
| 
       113 
114 
     | 
    
         
             
                bool apply_deviation = RTEST(rb_iv_get(self, "@apply_bic_deviation"));
         
     | 
| 
       114 
115 
     | 
    
         
             
                VALUE rb_xsorted     = rb_iv_get(self, "@xsorted");
         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
                Arena *arena         =
         
     | 
| 
       117 
     | 
    
         
            -
                    arena_create(
         
     | 
| 
       118 
     | 
    
         
            -
                        sizeof(LDouble) * xcount * (kmax + 4) +
         
     | 
| 
       119 
     | 
    
         
            -
                        sizeof(uint32_t) * xcount * kmax * 5 +
         
     | 
| 
       120 
     | 
    
         
            -
                        ARENA_MIN_CAPACITY
         
     | 
| 
       121 
     | 
    
         
            -
                    );
         
     | 
| 
      
 116 
     | 
    
         
            +
                size_t capacity      = sizeof(LDouble) * (xcount + 1) * (kmax + 1) * ALLOCATION_FACTOR + ARENA_MIN_CAPACITY;
         
     | 
| 
      
 117 
     | 
    
         
            +
                Arena *arena         = arena_create(capacity);
         
     | 
| 
       122 
118 
     | 
    
         | 
| 
       123 
119 
     | 
    
         
             
                if (arena == NULL) rb_raise(rb_eNoMemError, "Arena Memory Allocation Failed");
         
     | 
| 
       124 
120 
     | 
    
         | 
    
        data/lib/ckmeans/version.rb
    CHANGED