klus.domain module

class klus.domain.discretization(bounds, boxes)[source]

Bases: object

Box disretization of d-dimensional hypercubes.

dimension()[source]

Returns dimension of the domain.

numBoxes()[source]

Returns number of boxes.

rand(n)[source]

Generates n random test points in Omega.

randPerBox(n)[source]

Generates n random test points per box.

index(x)[source]

Finds corresponding index of the box that contains vector x.

mindex(x)[source]

Finds corresponding multi-index of the box that contains x.

midpointGrid()[source]

Returns a grid given by the midpoints of the boxes.

plot(x, mode='2D')[source]
klus.domain.randb(n, b)[source]

Returns an array of n uniformly distributed random values in the interval b.