R/func.R

Defines functions func

#' @noRd
func <- function(v,fu,m,nfmax,da,ga,tr,nql)
{
	for(i in 1:m){
		ii <- i*(i+1)/2
		if(v[ii] != 0){
			fu[ii] <- v[ii]+da*((1-ga)*abs(v[ii])+ga*tr)
		}else{
			fu[ii] <- da*ga*tr
		}
	}

	dchole <- .Fortran("dchole",fu=as.double(fu),as.integer(m),as.integer(nql),idpos=as.integer(0),PACKAGE="marqLevAlg")
	idpos <- dchole$idpos
	fu <-dchole$fu
	result <- list(idpos=idpos,fu=fu)
	return(result)
}

Try the marqLevAlg package in your browser

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

marqLevAlg documentation built on April 2, 2021, 1:05 a.m.