/** Which copies carry the same text, and so one version between them. */ import { PresenceMatrix } from "./presence.js"; /** * Copies taken to carry one text: copies of one system, punched from one * master, that differ in no more readings than a transcription and the * wear of a copy explain. * @category Filiation */ export interface SharedText { /** The copies, in the order the proposal was given them. */ copies: string[]; /** The most readings any two of them differ in, where both can tell. */ differences: number; /** Whether the edition says so: the copies carry one version at first hand there. */ stated: boolean; } /** * Two copies of one system the proposal keeps apart, and how many * readings they differ in, for the closest pairs: what was near being * taken for one text. * @category Filiation */ export interface KeptApart { copies: [string, string]; differences: number; } /** * How many readings two copies of one system may differ in and still be * taken to carry the same text, where nothing else is said. A version * can differ from the one it derives from by a handful of edits: WM 225's * L2 differs from R4 in seven readings. Copies punched from one master, * transcribed with care, differ in fewer. * @category Filiation */ export declare const defaultSameText = 3; /** In how many readings the two copies differ where both can tell: one has it, the other lacks it. */ export declare const differencesBetween: (matrix: PresenceMatrix, one: string, other: string) => number; /** * The copies in groups that carry the same text. * * Copies of different systems never carry one text, since a version is a * reading in one system's words. Copies the edition gives one version at * first hand stay together (`stated`). Beyond that, the two groups whose * copies differ least are joined first, as long as every copy of the one * differs from every copy of the other in no more than `within` readings * where both can tell, so that a chain of small differences never joins * copies far apart. Ties go to the order the copies were given in. * `within` below zero joins only what the edition states. * @category Filiation */ export declare const sharedTexts: (matrix: PresenceMatrix, systems: readonly string[], within: number, stated?: readonly (readonly string[])[]) => { texts: SharedText[]; apart: KeptApart[]; };