|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Tracks a moving point's sequence of cells through a lattice partition over time. More...
#include <SymbolicTrajectory.hpp>
Collaboration diagram for MayaFlux::Kinesis::SymbolicTrajectory< LatticeT, CellT >:Public Member Functions | |
| size_t | crossing_count () const |
| Total crossings observed since construction or reset() | |
| size_t | crossings_in_window (size_t window) const |
Crossings within the most recent window observations. | |
| const CellT & | current_cell () const |
| Cell the most recent observation fell in. | |
| std::pair< CellT, size_t > | dominant_cell (size_t window) const |
Cell with the most observations within the most recent window observations. | |
| const LatticeT & | lattice () const |
| The lattice this trajectory observes positions through. | |
| void | reset () |
| Reset to uninitialized state. | |
| SymbolicTrajectory (LatticeT lattice, size_t window=16) | |
| Construct a trajectory over a given lattice. | |
| size_t | unique_cells_in_window (size_t window) const |
Count of distinct cells visited within the most recent window observations. | |
| template<typename PositionT > | |
| bool | update (const PositionT &position) |
| Observe one new position, updating the cell sequence. | |
Private Attributes | |
| size_t | m_crossing_count { 0 } |
| CellT | m_current_cell {} |
| bool | m_has_prior { false } |
| Memory::HistoryBuffer< CellT > | m_history |
| LatticeT | m_lattice |
Tracks a moving point's sequence of cells through a lattice partition over time.
Named for symbolic dynamics: a continuous trajectory, observed through a partition of its space into discrete cells, becomes a sequence of symbols, one per cell occupied at each observation. This class is that observation process, holding the memory a single Lattice2D::cell_at() or Lattice3D::cell_at() call does not: which cell the point occupied last, how many times it has crossed a cell boundary, and a short window of recently visited cells for measuring the shape of that crossing sequence.
Distinct from SpatialIndex, which tracks the current positions of many entities for neighbor queries and has no notion of history, and from Lattice2D/Lattice3D themselves, which are pure static geometry with no notion of a point moving through them at all. SymbolicTrajectory adds no new geometry: cell containment is entirely LatticeT::cell_at(). It adds only memory of what cell_at() has returned over time for one moving point.
| LatticeT | Lattice2D or Lattice3D |
| CellT | The corresponding cell coordinate type: glm::uvec2 for Lattice2D, glm::uvec3 for Lattice3D. Not deduced automatically since LatticeT does not expose its own coordinate type as a nested alias; specify explicitly at the call site. |
Definition at line 46 of file SymbolicTrajectory.hpp.