R/Uniform.R

Defines functions Uniform

## -----------------------------------------------------------------------------
## Fonction Uniform
## -----------------------------------------------------------------------------
##    Copyright (C) 2013
##    Developpement : C. WALTER
##    CEA
## -----------------------------------------------------------------------------

Uniform = function(x,y=NA,width=2) {
	if(is.na(y[1])){
		runif(length(x),min=-width/2,max=width/2)+x
	}
	else{
		1/width^length(x)*(max(abs(x-y))<=2)
	}
}

Try the mistral package in your browser

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

mistral documentation built on April 19, 2021, 1:06 a.m.