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

Fix arguments in gsl_linear_fit #70

Merged
merged 1 commit into from Feb 26, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ffi/mod.rs
Expand Up @@ -1460,7 +1460,7 @@ extern "C" {
cov00: *mut c_double,
cov01: *mut c_double,
cov11: *mut c_double,
sumsq: c_double)
sumsq: *mut c_double)
-> c_int;
pub fn gsl_fit_wlinear(x: *const c_double,
xstride: size_t,
Expand Down
2 changes: 1 addition & 1 deletion src/fit.rs
Expand Up @@ -14,7 +14,7 @@ use enums;
/// The errors on y are assumed unknown so the variance-covariance matrix for the parameters (c0, c1) is estimated from the scatter of the points around the best-fit line and returned via the parameters (cov00, cov01, cov11).
/// The sum of squares of the residuals from the best-fit line is returned in sumsq. Note: the correlation coefficient of the data can be computed using gsl_stats_correlation (see [`Correlation`](http://www.gnu.org/software/gsl/manual/html_node/Correlation.html#Correlation)), it does not depend on the fit.
pub fn linear(x: &[f64], xstride: usize, y: &[f64], ystride: usize, n: usize, c0: &mut f64, c1: &mut f64, cov00: &mut f64,
cov01: &mut f64, cov11: &mut f64, sumsq: f64) -> enums::Value {
cov01: &mut f64, cov11: &mut f64, sumsq: &mut f64) -> enums::Value {
enums::Value::from(unsafe { ::ffi::gsl_fit_linear(x.as_ptr(), xstride, y.as_ptr(), ystride, n, c0, c1, cov00, cov01, cov11, sumsq) })
}

Expand Down