Construct a semi-logarithmically spaced grid. The grid consists of a concatenation of linearly spaced grids and starts with multiples of the smallest value. After a given number of points, the grid is “decimated” by doubling the spacing until a maximum value is reached. A logarithmic grid is obtained by decimation=1, decimation is disabled by default.
Example:
-- construct grid from 0.1 to 4, double spacing every 3 points
local grid = semilog_grid({start=0.1, stop=4, decimation=3})
-- print the result
for i,x in pairs(grid.value) do
io.write(x .. " ")
end
io.write("\n")
The result is a grid of 12 points: 0.1 0.2 0.3 0.4 0.6 0.8 1.0 1.4 1.8 2.2 3.0 3.8.
Return array of grid points.
Construct instance of semilog_grid module.
Parameters: |
|
---|
Add module options to command line parser.
Parameters: |
|
---|