Skip to content

Commit

Permalink
fixed test'
Browse files Browse the repository at this point in the history
  • Loading branch information
Qile0317 committed Jul 16, 2023
1 parent 7cf5d78 commit a463bef
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ cpp_circle_layout <- function(input_rad_vec, centroid, rad_scale_factor = 1, try
.Call(`_APackOfTheClones_cpp_circle_layout`, input_rad_vec, centroid, rad_scale_factor, try_place, verbose)
}

get_transformed_clone_sizes <- function(sizelist, clone_scale_factor, num_clusters) {
.Call(`_APackOfTheClones_get_transformed_clone_sizes`, sizelist, clone_scale_factor, num_clusters)
}

get_average_vector <- function(vec_list) {
.Call(`_APackOfTheClones_get_average_vector`, vec_list)
}
Expand Down
14 changes: 0 additions & 14 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}
// get_transformed_clone_sizes
Rcpp::List get_transformed_clone_sizes(Rcpp::List sizelist, double clone_scale_factor, int num_clusters);
RcppExport SEXP _APackOfTheClones_get_transformed_clone_sizes(SEXP sizelistSEXP, SEXP clone_scale_factorSEXP, SEXP num_clustersSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::List >::type sizelist(sizelistSEXP);
Rcpp::traits::input_parameter< double >::type clone_scale_factor(clone_scale_factorSEXP);
Rcpp::traits::input_parameter< int >::type num_clusters(num_clustersSEXP);
rcpp_result_gen = Rcpp::wrap(get_transformed_clone_sizes(sizelist, clone_scale_factor, num_clusters));
return rcpp_result_gen;
END_RCPP
}
// get_average_vector
std::vector<double> get_average_vector(Rcpp::List vec_list);
RcppExport SEXP _APackOfTheClones_get_average_vector(SEXP vec_listSEXP) {
Expand Down Expand Up @@ -96,7 +83,6 @@ RcppExport SEXP run_testthat_tests(SEXP);

static const R_CallMethodDef CallEntries[] = {
{"_APackOfTheClones_cpp_circle_layout", (DL_FUNC) &_APackOfTheClones_cpp_circle_layout, 5},
{"_APackOfTheClones_get_transformed_clone_sizes", (DL_FUNC) &_APackOfTheClones_get_transformed_clone_sizes, 3},
{"_APackOfTheClones_get_average_vector", (DL_FUNC) &_APackOfTheClones_get_average_vector, 1},
{"_APackOfTheClones_get_component_repulsion_vector", (DL_FUNC) &_APackOfTheClones_get_component_repulsion_vector, 4},
{"_APackOfTheClones_do_cluster_intersect", (DL_FUNC) &_APackOfTheClones_do_cluster_intersect, 5},
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-get_clone_sizes.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ test_that("get_transformed_clone_sizes works", {
sizelist <- list(c(1,1,2), NULL, c(0.5,3))
expect_equal(
get_transformed_clone_sizes(sizelist, 0.5, 3),
list(c(0.5, 0.5, 1), list(), c(0.25, 1.5))
list(c(0.5, 0.5, sqrt(2)*0.5), list(), c(sqrt(0.5)*0.5, sqrt(3)*0.5))
)
})

0 comments on commit a463bef

Please sign in to comment.