# Generated by extendr: Do not edit by hand
# nolint start

#' @usage NULL
#' @useDynLib catmodeling, .registration = TRUE
NULL

#' Return string `"Hello world!"` to R.
#' Just a test. 
#' @return A message to the screen.
rust_hello_world <- function() .Call(wrap__rust_hello_world)

#' Square an integer.
#' Just an example.
#' @param x An integer.
#' @return The square of the input.
rust_square <- function(x) .Call(wrap__rust_square, x)

#' Hours clause function
#' For a given start event, calculates all possible hours clauses, returns new losses AND a counter
#' @param hcdays           Definition of the hours clause in days
#' @param hckm             Definition of the hours clause in km
#' @param byregion			Whether to use regions, or distances, to measure closeness
#' @param temploss         The losses by event for this year  
#' @param thisyearday      The days by event for this year
#' @param thisyearlon      The lons by event for this year   
#' @param thisyearlat      The lats by event fo rthis year
#' @param thisyearregion	For events in this year, the regions
#' @param nevents_in_year  The number of events in the full year
#' @param k                The starting event
#' @return Returns a vector of the new losses
rust_hours_clause_apply_part2 <- function(hcdays, hckm, byregion, temploss, thisyearday, thisyearlon, thisyearlat, thisyearregion, nevents_in_year, k) .Call(wrap__rust_hours_clause_apply_part2, hcdays, hckm, byregion, temploss, thisyearday, thisyearlon, thisyearlat, thisyearregion, nevents_in_year, k)

#' Function to calculate the Haversine distance between two points.
#' This matches the functionality of geosphere::distHaversine in R.
#' @param lon1 Lon of first point.
#' @param lat1 Lat of first point.
#' @param lon2 Lon of second point.
#' @param lat2 You guess.
#' @return Returns distance in meters.
#' @return A message to the screen.
rust_dist_haversine <- function(lon1, lat1, lon2, lat2) .Call(wrap__rust_dist_haversine, lon1, lat1, lon2, lat2)

#' Adds two vectors element-wise up to length n.
#' 
#' @param x A reference to the first input vector (slice of f64)
#' @param y A reference to the second input vector (slice of f64)
#' @param n The number of elements to process
#' @return The sum of the two input vectors, as a vector.
addvectors <- function(x, y, n) .Call(wrap__addvectors, x, y, n)

# nolint end
