Struct SizeRegime¶
Defined in File size_regime.hpp
Nested Relationships¶
Nested Types¶
Struct Documentation¶
-
struct SizeRegime¶
Public Types
-
using csv_basis_key_type = std::pair<std::wstring, IndexBasis::instance_type>¶
Identifies a basis instance the way the registry does (same_instance(): one space, one instance number): the space’s IndexSpace::base_key() and the IndexBasis::basis_instance(). An instance number alone would not do, since the registry scopes it to its space.
Public Functions
-
inline std::size_t extent(Index const &ix) const¶
- Returns:
the flat extent of the proto-free index
ix'sIndexBasis::base_key(); throwsstd::out_of_rangeif the key is not present inspace_extent(fail loud rather than silently defaulting to 1), andsequant::Exceptionfor a proto-indexed composite: a composite has no integer extent (its base key names the space it is expanded in, not its size) and is sized by inner_pow alone.
-
inline container::svector<std::size_t> const &slice_extents(Index const &ix) const¶
- Returns:
ix'sIndexBasis::base_key()batch-slice-extent sequence, or an empty span if the key has no partition recorded (=> the caller falls back to uniform target_batch_size blocks). Never throws.
-
inline double inner_pow(Index const &composite, std::size_t k) const¶
- Returns:
the k-th power-mean moment for a proto-indexed CSV/PNO composite index (
kin [1, kMaxCompositeGroup], else throws), orpow(extent, k)for a plain (non-composite) index. The tables are the composite’s basis instance’s if csv_moment_by_instance lists it, else the default ones. Rank is determined by the number of proto indices: 1 => OSV (occupied single), 2 => PNO (occupied pair), >= 3 => the rank-specific table if present, else the PNO (rank-2) table.
Public Members
-
std::map<std::wstring, std::size_t> space_extent¶
element extent per IndexBasis::base_key(); an unnamed basis instance shares its space’s entry (see IndexBasis)
-
std::map<std::wstring, container::svector<std::size_t>> space_slice_extents¶
Optional per-key batch partition: the element extent of each realized batch slice along the key’s batch axis, keyed by IndexBasis::base_key(), in order. Empty (default) => the dry-run batches a mode into uniform target_batch_size blocks (backend-model-agnostic fallback). When present for a batch axis, ResultDryRun::mode_batches uses this partition directly (accumulated to [lo,hi) ranges), so the dry-run’s batch count – hence its recompute – matches whatever the wet backend realizes, even when a tile is coarser than target_batch_size.
The dry-run backend deliberately does not know how these were derived: the caller converts its backend’s structure into slice extents and supplies them here, so a new backend model is supported without touching dry-run eval internals. For a tile-based wet backend,
batch_slice_extents_from_tiles is the ready-made converter. The extents must sum to space_extent.
-
MomentTable csv_pno_moment = unit_moment_table()¶
-
MomentTable csv_osv_moment = unit_moment_table()¶
-
std::map<std::size_t, MomentTable> csv_moment_by_rank¶
-
std::map<csv_basis_key_type, CsvMomentTables> csv_moment_by_instance¶
Moment tables keyed by the basis instance the composite’s IndexBasis carries (csv_basis_key(): its space’s key and its basis instance). A composite whose index carries an instance listed here is sized by that instance’s tables; every other composite – no instance, or one not listed – by csv_osv_moment / csv_pno_moment / csv_moment_by_rank, which thus double as the default. A consumer whose one evaluation spans several CSV bases (e.g. the ground-state amplitudes expanded in one PNO basis and the response amplitudes in another, each family’s indices carrying its basis instance) files every basis here, so no family is priced by another’s domain sizes. Empty (default) => one basis, the default tables. Composites are grouped by proto-index set alone (inner_aware_volume), so a group whose members sit in different bases is priced by the product of each member’s own M_k; for two bases A and B on one pair grid that is nocc^N M_k(A) M_k(B), an upper bound (Cauchy-Schwarz) of the volume Sum_pairs d_A d_B, exact when d_A and d_B are proportional.
Public Static Functions
-
static inline csv_basis_key_type csv_basis_key(IndexSpace const &space, IndexBasis::instance_type instance)¶
- Returns:
the csv_moment_by_instance key of instance
instanceofspace
-
struct CsvMomentTables¶
The CSV moment tables of one basis instance (see csv_moment_by_instance): the rank-1 (OSV), rank-2 (PNO) and rank >= 3 tables, laid out and dispatched exactly like csv_osv_moment / csv_pno_moment / csv_moment_by_rank.
Public Functions
-
inline double moment(std::size_t rank, std::size_t k) const¶
- Returns:
the k-th power mean of the rank-
rankcluster domain (see detail::csv_moment())
Public Members
-
MomentTable osv = unit_moment_table()¶
-
MomentTable pno = unit_moment_table()¶
-
std::map<std::size_t, MomentTable> by_rank¶
-
inline double moment(std::size_t rank, std::size_t k) const¶
-
using csv_basis_key_type = std::pair<std::wstring, IndexBasis::instance_type>¶