Description
Map a binary lineage generation position to zero-based heap indexes.
Developmental stages and lineages can be represented by labels, ordered events and observation intervals. Index and time differences preserve a declared representation but do not discover lineage, assign stage or establish biological equivalence.
Map a binary lineage generation position to zero-based heap indexes.
When to use this tool
Use Cell Lineage Binary Generation Index when checking an explicit stage, lineage or observation-coordinate convention.
How to use the tool and how it works
- Enter generation, withinGeneration. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read heapIndex, parentIndex. Use the output convention below.
Map a binary lineage generation position to zero-based heap indexes. Require generation in [0,51] and withinGeneration in [0,2^generation-1]; heapIndex = 2^generation-1+within, parentIndex uses floor((heapIndex-1)/2), or -1 at root.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| generation | Generation | Required. Safe integer; minimum 0; maximum 51. |
| withinGeneration | Within Generation | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| heapIndex | 2^generation-1+withinGeneration; zero-based heap index, with root 0. | Required. Safe integer. |
| parentIndex | floor((heapIndex-1)/2) outside the root; root parent is the sentinel -1. | Required. Safe integer. |
{
"input": {
"generation": 3,
"withinGeneration": 2
},
"output": {
"heapIndex": 9,
"parentIndex": 4
}
} Limitations and assumptions
- This assumes a complete binary-tree indexing scheme, not reconstruction of real cell divisions.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Review the original biological evidence and its staging or lineage model before drawing mechanistic conclusions.
References
Similar or alternative tools
- Cell Lineage Depth Increment
Compare lineage depths with an expected increment.
- Lineage Sibling Order Tie
Order lineage sibling IDs by birth times and an explicit tie policy.