spatio

Exploring spatiotemporal acceleration structures, by @slightknack and @a.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
use crate::ctx::Ctx;
use crate::quad::Node;

pub fn step<A: Default, B: Copy>(ctx: &mut Ctx, node: Node<A, B>) -> Node<A, B> {
    // pad the graph if needed.

    // if we're at the base, run the cellular automation rule:
    // collect training pair base -> rule.
    // return the updated cached node.

    // forward predict all children nodes of the root
    // collect children nodes into vector X, X'
    // forward predict compressed representation of root Y, Y'
    // our target is to train Y' to match X'.

    // calculate the difference between X and Y.
    // if the difference is below an acceptable threshold:
    // collect training pair Y -> X' (with error Y').
    // return the updated cached node with compr = X'

    // if the difference is above an acceptable threshold:
    // recurse `step` on each child to produce four vectors
    // (the recursion will stop when the true base is reached or threshold is small enough.)
    // collect all children predictions into Z'
    // collect training pair Y -> Z' (with error Y').
    // return the updated cached node with compr = Z'.

    todo!("Implement a step!")
}