Fixed cardinality between time granules
Source:R/01_chronon_cardinality.R
chronon_cardinality_fixed.RdA restricted variant of chronon_cardinality() for time granule pairs
whose relationship is a constant, context-independent number (e.g., 60
seconds in a minute, 24 hours in a day). Unlike chronon_cardinality(),
methods for this generic do not receive (and must not need) an at time
point, and should return the number of unit (n = 1L) x granules that
fit within one unit y granule.
Details
Defining a method for chronon_cardinality_fixed() automatically provides
a chronon_cardinality() method for the pair (scaled by the requested
granule sizes via the list(mt_unit, mt_unit) fallback method), and marks
the relationship as safe to use for chronon_divmod()'s graph traversal,
where variable (context-dependent) cardinalities cannot be used since no
at is available mid-traversal.