testZ | R Documentation |
Test if a given point is in Z
testZ(z, pA, eps = 1e-10, bxsize = sqrt(ncol(pA)))
z |
matrix corresponding to points to be tested |
pA |
matrix of orthogonal projection onto Ran(A) |
eps |
numerical precision on the result |
bxsize |
radius of the sphere enclosing the zonotope |
..
## Identification of the Z set
set.seed(42)
d <- 2; D <- 5
A <- selectA(d, D)
size <- 2 # box size of Y
ntest <- 10000
Z <- size * (2 * matrix(runif(ntest * d), ntest, d) - 1)
inZ <- testZ(Z, t(A))
colors <- rep('black', ntest)
colors[inZ] <- 'green'
plot(Z, col = colors, pch = 20, cex = 0.5)
## Identification of a zone
X <- mapZX(Z[inZ,], A)
inZone1 <- which(abs(X[,1]) < 1)
points((Z[inZ,])[inZone1,], col ='red')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.