gaioguys / GAIO.jl

A Julia package for set oriented computations.
MIT License
9 stars 4 forks source link

Provide some simple discretizations of the unit box #30

Open cafaxo opened 4 years ago

cafaxo commented 4 years ago

The user shouldn't have to write this code: https://github.com/gaioguys/GAIO.jl/blob/88b26aca4e953460e8fff7afcc4b55691e59020d/examples/henon.jl#L4-L9

Interestingly, those points do not all lie in the unit box... But that doesn't really matter, right?

gaioguy commented 4 years ago

I agree. I guess we have two options:

  1. Provide some SamplePoints struct which takes two input parameters specifying the type of sample points and their overall number.
  2. Provide a constructor for PointDiscretizedMap which takes these two arguments and internally constructs the points.

Any opinions on this? ... and, yes, that does not matter (currently).

MaHermann commented 4 years ago

Why not simply have some functions along the lines of

dimension = 3
n = 10
points = corners(dimension,n)
points = randomPoints(dimension,n)
points = regularGrid(dimension,n)

These would just return an array of points and then we can give that to a BoxMap as before. Possibly we can also have methods of these that take a Box and use its dimension, might be more convenient.

gaioguy commented 4 years ago

Right: keep it simple. I like that, but would use facePoints instead of corners.