Skip to content

Commit f3e7b13

Browse files
improve code coverage
1 parent 5f8e828 commit f3e7b13

9 files changed

+59
-421
lines changed

R/RcppExports.R

-16
Original file line numberDiff line numberDiff line change
@@ -149,26 +149,10 @@ rlang_env_lock <- function(env) {
149149
invisible(.Call(`_sits_rlang_env_lock`, env))
150150
}
151151

152-
sample_points_inclusion <- function(polymatrix, n_sam_pol) {
153-
.Call(`_sits_sample_points_inclusion`, polymatrix, n_sam_pol)
154-
}
155-
156-
sample_points_crossings <- function(polymatrix, n_sam_pol) {
157-
.Call(`_sits_sample_points_crossings`, polymatrix, n_sam_pol)
158-
}
159-
160-
sample_points_bin <- function(polymatrix, n_sam_pol) {
161-
.Call(`_sits_sample_points_bin`, polymatrix, n_sam_pol)
162-
}
163-
164152
C_max_sampling <- function(x, nrows, ncols, window_size) {
165153
.Call(`_sits_C_max_sampling`, x, nrows, ncols, window_size)
166154
}
167155

168-
bayes_smoother <- function(m, m_nrow, m_ncol, w, sigma, neigh_fraction) {
169-
.Call(`_sits_bayes_smoother`, m, m_nrow, m_ncol, w, sigma, neigh_fraction)
170-
}
171-
172156
bayes_var <- function(m, m_nrow, m_ncol, w, neigh_fraction) {
173157
.Call(`_sits_bayes_var`, m, m_nrow, m_ncol, w, neigh_fraction)
174158
}

R/api_tile.R

+1-4
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,7 @@ NULL
224224

225225
#' @export
226226
.tile_update_label.default <- function(tile, labels) {
227-
tile <- tibble::as_tibble(tile)
228-
tile <- .cube_find_class(tile)
229-
tile <- .tile_update_label(tile, labels)
230-
return(tile)
227+
stop("tile is not a classified cube")
231228
}
232229

233230
#' @title Get/Set labels

src/RcppExports.cpp

-56
Original file line numberDiff line numberDiff line change
@@ -456,42 +456,6 @@ BEGIN_RCPP
456456
return R_NilValue;
457457
END_RCPP
458458
}
459-
// sample_points_inclusion
460-
NumericMatrix sample_points_inclusion(const NumericMatrix& polymatrix, const int n_sam_pol);
461-
RcppExport SEXP _sits_sample_points_inclusion(SEXP polymatrixSEXP, SEXP n_sam_polSEXP) {
462-
BEGIN_RCPP
463-
Rcpp::RObject rcpp_result_gen;
464-
Rcpp::RNGScope rcpp_rngScope_gen;
465-
Rcpp::traits::input_parameter< const NumericMatrix& >::type polymatrix(polymatrixSEXP);
466-
Rcpp::traits::input_parameter< const int >::type n_sam_pol(n_sam_polSEXP);
467-
rcpp_result_gen = Rcpp::wrap(sample_points_inclusion(polymatrix, n_sam_pol));
468-
return rcpp_result_gen;
469-
END_RCPP
470-
}
471-
// sample_points_crossings
472-
NumericMatrix sample_points_crossings(const NumericMatrix& polymatrix, const int n_sam_pol);
473-
RcppExport SEXP _sits_sample_points_crossings(SEXP polymatrixSEXP, SEXP n_sam_polSEXP) {
474-
BEGIN_RCPP
475-
Rcpp::RObject rcpp_result_gen;
476-
Rcpp::RNGScope rcpp_rngScope_gen;
477-
Rcpp::traits::input_parameter< const NumericMatrix& >::type polymatrix(polymatrixSEXP);
478-
Rcpp::traits::input_parameter< const int >::type n_sam_pol(n_sam_polSEXP);
479-
rcpp_result_gen = Rcpp::wrap(sample_points_crossings(polymatrix, n_sam_pol));
480-
return rcpp_result_gen;
481-
END_RCPP
482-
}
483-
// sample_points_bin
484-
NumericMatrix sample_points_bin(const NumericMatrix& polymatrix, const int n_sam_pol);
485-
RcppExport SEXP _sits_sample_points_bin(SEXP polymatrixSEXP, SEXP n_sam_polSEXP) {
486-
BEGIN_RCPP
487-
Rcpp::RObject rcpp_result_gen;
488-
Rcpp::RNGScope rcpp_rngScope_gen;
489-
Rcpp::traits::input_parameter< const NumericMatrix& >::type polymatrix(polymatrixSEXP);
490-
Rcpp::traits::input_parameter< const int >::type n_sam_pol(n_sam_polSEXP);
491-
rcpp_result_gen = Rcpp::wrap(sample_points_bin(polymatrix, n_sam_pol));
492-
return rcpp_result_gen;
493-
END_RCPP
494-
}
495459
// C_max_sampling
496460
DataFrame C_max_sampling(const NumericVector& x, int nrows, int ncols, int window_size);
497461
RcppExport SEXP _sits_C_max_sampling(SEXP xSEXP, SEXP nrowsSEXP, SEXP ncolsSEXP, SEXP window_sizeSEXP) {
@@ -506,22 +470,6 @@ BEGIN_RCPP
506470
return rcpp_result_gen;
507471
END_RCPP
508472
}
509-
// bayes_smoother
510-
arma::mat bayes_smoother(const arma::mat& m, const arma::uword m_nrow, const arma::uword m_ncol, const arma::mat& w, const arma::mat& sigma, const double neigh_fraction);
511-
RcppExport SEXP _sits_bayes_smoother(SEXP mSEXP, SEXP m_nrowSEXP, SEXP m_ncolSEXP, SEXP wSEXP, SEXP sigmaSEXP, SEXP neigh_fractionSEXP) {
512-
BEGIN_RCPP
513-
Rcpp::RObject rcpp_result_gen;
514-
Rcpp::RNGScope rcpp_rngScope_gen;
515-
Rcpp::traits::input_parameter< const arma::mat& >::type m(mSEXP);
516-
Rcpp::traits::input_parameter< const arma::uword >::type m_nrow(m_nrowSEXP);
517-
Rcpp::traits::input_parameter< const arma::uword >::type m_ncol(m_ncolSEXP);
518-
Rcpp::traits::input_parameter< const arma::mat& >::type w(wSEXP);
519-
Rcpp::traits::input_parameter< const arma::mat& >::type sigma(sigmaSEXP);
520-
Rcpp::traits::input_parameter< const double >::type neigh_fraction(neigh_fractionSEXP);
521-
rcpp_result_gen = Rcpp::wrap(bayes_smoother(m, m_nrow, m_ncol, w, sigma, neigh_fraction));
522-
return rcpp_result_gen;
523-
END_RCPP
524-
}
525473
// bayes_var
526474
arma::mat bayes_var(const arma::mat& m, const arma::uword m_nrow, const arma::uword m_ncol, const arma::mat& w, const double neigh_fraction);
527475
RcppExport SEXP _sits_bayes_var(SEXP mSEXP, SEXP m_nrowSEXP, SEXP m_ncolSEXP, SEXP wSEXP, SEXP neigh_fractionSEXP) {
@@ -679,11 +627,7 @@ static const R_CallMethodDef CallEntries[] = {
679627
{"_sits_C_temp_iqr", (DL_FUNC) &_sits_C_temp_iqr, 1},
680628
{"_sits_rlang_env_unlock", (DL_FUNC) &_sits_rlang_env_unlock, 1},
681629
{"_sits_rlang_env_lock", (DL_FUNC) &_sits_rlang_env_lock, 1},
682-
{"_sits_sample_points_inclusion", (DL_FUNC) &_sits_sample_points_inclusion, 2},
683-
{"_sits_sample_points_crossings", (DL_FUNC) &_sits_sample_points_crossings, 2},
684-
{"_sits_sample_points_bin", (DL_FUNC) &_sits_sample_points_bin, 2},
685630
{"_sits_C_max_sampling", (DL_FUNC) &_sits_C_max_sampling, 4},
686-
{"_sits_bayes_smoother", (DL_FUNC) &_sits_bayes_smoother, 6},
687631
{"_sits_bayes_var", (DL_FUNC) &_sits_bayes_var, 5},
688632
{"_sits_bayes_smoother_fraction", (DL_FUNC) &_sits_bayes_smoother_fraction, 6},
689633
{"_sits_smooth_sg", (DL_FUNC) &_sits_smooth_sg, 4},

src/sample_points.cpp

-245
This file was deleted.

0 commit comments

Comments
 (0)