# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

detect_all_events <- function(df, reading_minutes = NULL, sort_time = FALSE, inter_gap = 45, return_interpolated = FALSE) {
    .Call(`_cgmguru_detect_all_events`, df, reading_minutes, sort_time, inter_gap, return_interpolated)
}

detect_between_maxima <- function(df, transform_df) {
    .Call(`_cgmguru_detect_between_maxima`, df, transform_df)
}

detect_hyperglycemic_events <- function(df, reading_minutes = NULL, dur_length = 120, end_length = 15, start_gl = 250, end_gl = 180, sort_time = FALSE, inter_gap = 45, return_interpolated = TRUE, lv1_excl = FALSE) {
    .Call(`_cgmguru_detect_hyperglycemic_events`, df, reading_minutes, dur_length, end_length, start_gl, end_gl, sort_time, inter_gap, return_interpolated, lv1_excl)
}

detect_hypoglycemic_events <- function(df, reading_minutes = NULL, dur_length = 120, end_length = 15, start_gl = 70, sort_time = FALSE, inter_gap = 45, return_interpolated = TRUE, lv1_excl = FALSE) {
    .Call(`_cgmguru_detect_hypoglycemic_events`, df, reading_minutes, dur_length, end_length, start_gl, sort_time, inter_gap, return_interpolated, lv1_excl)
}

excursion <- function(df, gap = 15) {
    .Call(`_cgmguru_excursion`, df, gap)
}

find_local_maxima <- function(df) {
    .Call(`_cgmguru_find_local_maxima`, df)
}

find_max_after_hours <- function(df, start_point_df, hours) {
    .Call(`_cgmguru_find_max_after_hours`, df, start_point_df, hours)
}

find_max_before_hours <- function(df, start_point_df, hours) {
    .Call(`_cgmguru_find_max_before_hours`, df, start_point_df, hours)
}

find_min_after_hours <- function(df, start_point_df, hours) {
    .Call(`_cgmguru_find_min_after_hours`, df, start_point_df, hours)
}

find_min_before_hours <- function(df, start_point_df, hours) {
    .Call(`_cgmguru_find_min_before_hours`, df, start_point_df, hours)
}

find_new_maxima <- function(df, mod_grid_max_point_df, local_maxima_df) {
    .Call(`_cgmguru_find_new_maxima`, df, mod_grid_max_point_df, local_maxima_df)
}

grid <- function(df, gap = 15, threshold = 130) {
    .Call(`_cgmguru_grid`, df, gap, threshold)
}

interpolate_cgm_cpp <- function(df, reading_minutes = NULL, sort_time = FALSE, inter_gap = 45) {
    .Call(`_cgmguru_interpolate_cgm_cpp`, df, reading_minutes, sort_time, inter_gap)
}

maxima_grid <- function(df, threshold = 130, gap = 60, hours = 2) {
    .Call(`_cgmguru_maxima_grid`, df, threshold, gap, hours)
}

mod_grid <- function(df, grid_point_df, hours = 2, gap = 15) {
    .Call(`_cgmguru_mod_grid`, df, grid_point_df, hours, gap)
}

orderfast_cpp <- function(df) {
    .Call(`_cgmguru_orderfast_cpp`, df)
}

sensor_wear_cpp <- function(df, reading_minutes = NULL, end_date = NULL, ndays = 14.0) {
    .Call(`_cgmguru_sensor_wear_cpp`, df, reading_minutes, end_date, ndays)
}

start_finder <- function(df) {
    .Call(`_cgmguru_start_finder`, df)
}

transform_df <- function(grid_df, maxima_df) {
    .Call(`_cgmguru_transform_df`, grid_df, maxima_df)
}

