-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove src files, update exports, WIP #146
- Loading branch information
1 parent
4091d87
commit 7cf87ae
Showing
4 changed files
with
36 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2023 'finalsize' authors. See repository licence in LICENSE.md. | ||
#include <Rcpp.h> | ||
#include <finalsize.h> | ||
#include <string.h> | ||
|
||
//' @title Calculate the final size of an epidemic | ||
//' @description An internal function that interfaces between the R function | ||
//' `final_size()` and functions in the package header. | ||
//' @param parameters A named list of parameters for the final size calculation. | ||
//' See the R function documentation for details and input checking. | ||
//' | ||
// [[Rcpp::export(name=".final_size")]] | ||
Eigen::ArrayXd final_size(const Rcpp::List ¶meters) { | ||
|
||
if (strcmp(parameters["solver"], "iterative") == 0) { | ||
return finalsize::solve_final_size_iterative( | ||
parameters["contact_matrix"], parameters["demography_vector"], | ||
parameters["susceptibility"], parameters["iterations"], | ||
parameters["tolerance"], parameters["step_rate"], | ||
parameters["adapt_step"] | ||
); | ||
} else { | ||
return finalsize::solve_final_size_newton( | ||
parameters["contact_matrix"], parameters["demography_vector"], | ||
parameters["susceptibility"], parameters["iterations"], | ||
parameters["tolerance"] | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.