Skip to content

Commit

Permalink
Update extendr to 0.7 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
CGMossa authored Jun 30, 2024
1 parent 008169d commit a6c2ff1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
36 changes: 18 additions & 18 deletions src/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = '2021'
crate-type = [ 'staticlib' ]

[dependencies]
extendr-api = "0.6"
extendr-api = "0.7"

[profile.release]
opt-level = 'z' # Optimize for size
Expand Down
4 changes: 2 additions & 2 deletions src/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::vec::Vec;
/// @param vals The column we are measuring change on
/// @param t_crit The critical value of a t-distribution at the desired p-value
/// @param l The cut-off length of a regime; affects sensitivity
#[extendr(use_try_from = true)]
#[extendr]
fn rust_rodionov(vals: &[f64], t_crit: f64, l: usize) -> Vec<f64> {
let mut results = vec![0.; l];

Expand Down Expand Up @@ -107,7 +107,7 @@ fn calculate_rsi(regime: &[f64], shift_boundary: &f64, is_down: bool, l: &f64, v
/// Calculates the mean for each regime in a regime shift analysis.
/// @param col The column we are measuring change on.
/// @param rsi The column containing RSI values.
#[extendr(use_try_from = true)]
#[extendr]
fn rust_regime_means(col: &[f64], rsi: &[f64]) -> Vec<f64> {
let mut means: Vec<f64> = Vec::new();
let mut current_regime: Vec<f64> = Vec::new();
Expand Down
Binary file modified src/rust/vendor.tar.xz
Binary file not shown.

0 comments on commit a6c2ff1

Please sign in to comment.