Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,6 @@ export interface SearchQuotientNode {
*/
readonly inputCount: number;

/**
* Retrieves the sequence of inputs that led to this SearchQuotientNode.
*
* THIS WILL BE REMOVED SHORTLY in favor of `constituentPaths` below, which
* provides an improved view into the data and models multiple paths to the
* space when they exist. (Once SearchQuotientNode takes on merging &
* splitting)
*/
readonly inputSequence: Distribution<Transform>[];

/**
* Reports the length in codepoints of corrected text represented by completed
* paths from this instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ export class SearchQuotientRoot implements SearchQuotientNode {
return [];
}

// Return a new array each time; avoid aliasing potential!
get inputSequence(): LexicalModelTypes.Distribution<LexicalModelTypes.Transform>[] {
return [];
}

// Return a new instance each time; avoid aliasing potential!
get bestExample(): { text: string; p: number; } {
return { text: '', p: 1 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@ export abstract class SearchQuotientSpur implements SearchQuotientNode {
return this.parentNode.model;
}

/**
* Retrieves the sequences of inputs that led to this SearchPath.
*/
public get inputSequence(): Distribution<Transform>[] {
const parentInputs = this.parentNode?.inputSequence.slice() ?? [];
const localInputs = this.inputs ? [this.inputs.slice()] : [];
return parentInputs.concat(localInputs);
}

get codepointLength(): number {
if(this._codepointLength === undefined) {
this._codepointLength = this.parentNode.codepointLength + this.insertLength - this.leftDeleteLength;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ describe('getBestMatches', () => {

// Just one suggestion root should be returned as the first result.
assert.equal(result.totalCost, 0); // Gives a perfect match
assert.equal(result.inputSequence.length, 0); // for a state with no input and
assert.equal(result.matchString, ''); // an empty match string.
assert.isFalse(resultState.done);

Expand Down