Skip to content

Main content

Sequence: Sequence Interleave Source Index Tool

Resolve one position in an equal-length round-robin interleave to its ordered source and local element index, without constructing the interleave.

Loading tool…

Description

Resolve one position in an equal-length round-robin interleave to its ordered source and local element index, without constructing the interleave.

A sequence rule specifies an index origin, state order, and relation among terms. Advancing one step, mapping an index, and checking a local residual answer different questions. Supplied coefficients or periods define a model; they do not establish that observations follow it.

Resolve one position in an equal-length round-robin interleave to its ordered source and local element index, without constructing the interleave.

When to use this tool

Use Sequence: Sequence Interleave Source Index when you need this particular index map, recurrence step, count, or local algebraic term under supplied sequence conventions.

How to use the tool and how it works

  1. Enter outputIndex, sourceCount. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Map zero-based outputIndex to sourceIndex=outputIndex%sourceCount and indexWithinSource=floor(outputIndex/sourceCount), inside result. Require index at most one billion and source count one through 128.1

Input fieldMeaning and unitsAccepted input
outputIndexOutput IndexRequired. Safe integer.
sourceCountSource CountRequired. Safe integer.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
json
{
  "input": {
    "outputIndex": 7,
    "sourceCount": 3
  },
  "output": {
    "result": {
      "sourceIndex": 1,
      "indexWithinSource": 2
    }
  }
}

Limitations and assumptions

  • This assumes equal round-robin interleaving starting at source zero. Finite source lengths, skipped streams, actual values, and uneven exhaustion are not modeled.
  • Outputs are nested inside result. The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
  • 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. Signed zero is exported as zero.

Alternative or Complementary methods

Choose exact integer arithmetic when the index or coefficient range requires it. A complete sequence analysis needs actual terms and a consistent index and state-order convention beyond one local step.

References

  1. Calculation and input contract: sequence/sequence-interleave-source-index — tool.io

Similar or alternative tools