Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update extendr to 0.7 #25

Merged
merged 1 commit into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading