hip.lattice.polygon: Halton Iterative Partition lattice inside a 'bbox' (bounding...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/hip.lattice.polygon.r

Description

Constructs an iteratively partitioned lattice of Halton boxes (a Halton lattice) inside a bounding box bbox of the sample space. This method does the hard work of partitioning the boxes to sample from. It is meant to be used internally by hip.polygon only.

Usage

1
hip.lattice.polygon(box, J, bases = c(2, 3))

Arguments

box

A bbox bounding box for the sample space.

J

A 2X1 vector of base powers which determines the size and shape of the Halton boxes. See additional description in help for hip.polygon function.

bases

A 2X1 vector of Halton bases. These must be co-prime.

Details

This routine is called internally by hip.polygon, and is not normally called by the user. This should be avoided

Value

A list of matrices containing locations in the Halton lattice of the partitioned boxes

Author(s)

Michael J Kleinsasser

See Also

hip.polygon, hip.point

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Take a simple HIP lattice for illustration
# nboxes = 2^3 * 3^2 = 72 
lat1 <- hip.lattice.polygon(box = matrix(data = c(0,1,0,1), nrow = 2, byrow = TRUE),
                   J = c(3,2),
                   bases = c(2,3))

# legth lat1, should be 72
length(lat1)
# prep points for plotting
trans <- list()
i=1
for(mat in lat1) {
  trans[[i]] <-   t(mat)
  i=i+1
}
# plot points 
plot(c(0,1),c(0,1))

for(mat in trans) {
  points(mat[1,1],mat[1,2])
  points(mat[2,1],mat[2,2])
}

SDraw documentation built on July 8, 2020, 6:23 p.m.