3 ms·
You mean, you want to get rid of some (most) of your linearly spaced snapshots, so that the remainder are logarithmically spaced? Not too difficult: - Start w
by moonchild 3y ago
You mean, you want to get rid of some (most) of your linearly spaced snapshots, so that the remainder are logarithmically spaced? Not too difficult:
- Start with the most recent snapshot; keep it
- Go on to the next snapshot; keep it, and then drop the next 2^1 - 1 = 1 snapshot
- Go on to the next snapshot; keep it, and then drop the next 2^2 - 1 = 3 snapshots
- Go on to the next snapshot; keep it, and then drop the next 2^3 - 1 = 7 snapshots
Etc.
Alternately (if it's easier to model or implement it thus), the snapshots that you keep are the ones at power-of-two indices, plus 0 (starting again from the most recent snapshot): snapshot 0, snapshot 1, snapshot 2, snapshot 4...