Description Usage Arguments Examples
Find the strata that have the smallest distance at the end
1 | goodStrata(u_Strata)
|
X |
sptaial coordinates |
pik_tmp |
temporary pik (unit k has a cutted pik) |
toreBound |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ############################# 1D
rm(list = ls())
set.seed(1)
eps <- 1e-13
N <- 10
n <- 3
X <- as.matrix(seq(1,N,1))
tb = 0.001
pik <- rep(0.3,N)
ref <- 6
pik[ref] <- runif(1,min = eps,max = pik[ref] - eps)
tore = TRUE
toreBound = 10
l_Strata <- allStrata(X,pik,ref,tb)
u_Strata <- unionStrata(l_Strata,ref)
s <- goodStrata(u_Strata)
plot(s,X)
################################## 2D
rm(list = ls())
set.seed(1)
eps <- 1e-13
N <- 36
n <- 8
pik <- rep(n/N,N)
tb <- runif(2)/100
X <- as.matrix(cbind(runif(N),runif(N)))
tore = FALSE
toreBound = FALSE
ref = 1
pik[ref] <- runif(1,min = eps,max = pik[ref] - eps)
l_Strata <- allStrata(X,pik,ref,tb)
u_Strata <- unionStrata(l_Strata)
s <- goodStrata(u_Strata)
plot(s,X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.