R/RcppExports.R

Defines functions CppLHS

Documented in CppLHS

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

#' This is the internal Cpp function used to run the metropolis hasting algorithm if use.cpp = T. 
#' In general, it shouldn't be used as a stand alone function, because some preprocessing is done in R
#' 
#' @name CppLHS
#' @param xA matrix of data - must be numeric (factors are converted to numeric in R)
#' @param cost cost vector (0 if no cost)
#' @param strata matrix of continuous strata
#' @param include matrix of included data
#' @param idx integer vector of rows from which sampling is allowed
#' @param factors boolean factor flag
#' @param i_fact indices of factors in xA
#' @param nsample number of samples
#' @param cost_mode bool cost flag
#' @param iter number of iterations
#' @param wCont continuous weight
#' @param wFact factor weights
#' @param wCorr correlation weights
#' @param etaMat eta matrix - either all 1, or user input
#' @param temperature initial temperature
#' @param tdecrease temperature decrease every length_cycle iterations
#' @param length_cycle number of iterations between temperature decrease
#' @return list with sampled data, indices, objective values, cost value, and final continuous weights for each sample
NULL

CppLHS <- function(xA, cost, strata, include, idx, factors, i_fact, nsample, cost_mode, iter, wCont, wFact, wCorr, etaMat, temperature, tdecrease, length_cycle) {
    .Call('_clhs_CppLHS', PACKAGE = 'clhs', xA, cost, strata, include, idx, factors, i_fact, nsample, cost_mode, iter, wCont, wFact, wCorr, etaMat, temperature, tdecrease, length_cycle)
}

Try the clhs package in your browser

Any scripts or data that you put into this service are public.

clhs documentation built on Oct. 14, 2021, 9:06 a.m.