Skip to content

Main content

Yijing Hexagram Line-Change Distance Calculator

List exact bottom-counted differing line positions and their minimum independent flip count between two six-line figures.

Loading tool…

Description

Compare two six-element binary line arrays in bottom-to-top order.

These tools represent a six-line figure as six binary values ordered from bottom to top, with yin represented by zero and yang by one. Three adjacent lines form a trigram. Binary encoding, line reversal, and changing selected lines are separate operations under this explicit representation.

Compare two six-element binary line arrays in bottom-to-top order.

When to use this tool

Use Yijing Hexagram Line-Change Distance Calculator when you need a reproducible binary line transformation with an inspectable output figure.

How to use the tool and how it works

  1. Enter firstLines, secondLines. Keep parallel arrays aligned. 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.

Compare two six-element binary line arrays in bottom-to-top order. Return one-based differingPositions and their count as minimumFlips inside result.1

Input fieldMeaning and unitsAccepted input
firstLinesFirst LinesRequired. Array of Finite number..
secondLinesSecond LinesRequired. Array of Finite number..
Output fieldInterpretationReturned shape
resultResultRequired. Object.
json
{
  "input": {
    "firstLines": [
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "secondLines": [
      1,
      0,
      0,
      0,
      0,
      1
    ]
  },
  "output": {
    "result": {
      "differingPositions": [
        1,
        6
      ],
      "minimumFlips": 2
    }
  }
}

Limitations and assumptions

  • MinimumFlips counts independent bit changes, not reversal operations, casting steps, or an interpretive distance. Identical figures return an empty position list and zero flips.
  • 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.

Alternative or Complementary methods

Keep one explicit line-order and binary convention throughout. Use a separate attributed text or scholarly source when the task requires a figure name or interpretation.

References

  1. Calculation and input contract: yijing/hexagram-change-distance — tool.io

Similar or alternative tools