Macaulay2 » Documentation
Packages » DGAlgebras » Accessors and cache management
next | previous | forward | backward | up | index | toc

Accessors and cache management -- Reading state out of a DG algebra or DG module and maintaining its caches

A DGAlgebra or DGModule stores its defining data in a small collection of keys -- the base ring, the graded-commutative algebra, the generator degrees, and the list of generator differentials -- together with a cache of derived information (per-degree differential matrices, homology, the homology algebra, a Complex presentation). This page collects the two groups of utilities that manage that state.

The first group -- underlyingRing, underlyingAlgebra, differential, and generatorDegrees -- returns the four defining ingredients. Because both DG algebras and DG modules carry the same names, code can remain agnostic about which one it is handling.

The second group -- ensureDGAlgebraCaches and invalidateDGAlgebraCache -- maintains the cache sub-tables. ensureDGAlgebraCaches is idempotent and guarantees that the standard cache keys are present with the expected types; invalidateDGAlgebraCache wipes every cached computed value so that the next call recomputes from scratch. Routines such as setDiff that mutate the differential call invalidateDGAlgebraCache internally so that stale homology and stale differential matrices are never served.

See also

Menu


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/DGAlgebras/doc.m2:7253:0.