RecipeSpace¶
Namespace Nfty.Core.Generation in assembly Nfty.Core.
One recipe's share of the space.
Constructors¶
RecipeSpace(BigInteger, BigInteger, SpaceCertainty)¶
Parameters
Total(BigInteger) - Legal combinations times reachable color buckets. This is the recipe's space in isolation and is recorded even for a shelved (zero-weight) recipe; whether the cookbook can actually roll it is a separate question the cookbook-levelUniqueSpaceCount.Totalanswers.Combos(BigInteger) - The legal variant combinations alone, without color buckets folded in.RecipeSpace.Totalcan be zero for two unrelated reasons — the rules exclude every combination, or a layer has no reachable color buckets — and only this figure tells them apart. A caller must never read a zeroRecipeSpace.Totalas a rule conflict.Certainty(SpaceCertainty) - WhatRecipeSpace.Totalis: the figure, a floor, a ceiling, or nothing. Decided while counting, where it is still known WHICH half gave up — a under-counted bucket set multiplied by zero combinations lands back at zero, so this cannot be re-derived afterwards from the total alone.
Properties¶
Certainty¶
What RecipeSpace.Total is: the figure, a floor, a ceiling, or nothing. Decided while counting, where it is still known WHICH half gave up — a under-counted bucket set multiplied by zero combinations lands back at zero, so this cannot be re-derived afterwards from the total alone.
Combos¶
The legal variant combinations alone, without color buckets folded in. RecipeSpace.Total can be zero for two unrelated reasons — the rules exclude every combination, or a layer has no reachable color buckets — and only this figure tells them apart. A caller must never read a zero RecipeSpace.Total as a rule conflict.
IsCountable¶
Whether this figure means anything to show a user. UniqueSpaceCount.IsExact alone is false for two unrelated situations: a bucket set was under-counted ("more than UniqueSpaceCount.Total", a real lower bound), and the space is undefined because the book is invalid in a way that makes the question meaningless. The second reports Total == 0, and rendering that as "more than 0" states a bound that is technically true and reads like an answer.
Every front-end needs this distinction — the CLI's stats, the GUI's identity card and its per-recipe rows — so it is decided once here instead of three times, differently.
IsExact¶
Whether RecipeSpace.Total is the real figure rather than a bound.
Total¶
Legal combinations times reachable color buckets. This is the recipe's space in isolation and is recorded even for a shelved (zero-weight) recipe; whether the cookbook can actually roll it is a separate question the cookbook-level UniqueSpaceCount.Total answers.