Skip to content

Commit 6ea2195

Browse files
committed
docs(web): document SearchQuotientSpur.construct method
1 parent d8ed875 commit 6ea2195

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,22 @@ export abstract class SearchQuotientSpur implements SearchQuotientNode {
158158
this.selectionQueue = new PriorityQueue<SearchNode>(QUEUE_NODE_COMPARATOR, entries);
159159
}
160160

161-
/** Allows the base class to construct instances of the derived class. */
161+
/**
162+
* Allows construction of new spur instances matching this spur's edge type.
163+
*
164+
* Target use cases:
165+
* - `SearchQuotientNode.split()`
166+
* - an edge may need to be split into two parts
167+
* - edges may need to be recreated on a shortened search path (for the
168+
* split's right-hand side)
169+
* - `SearchQuotientNode.merge()`
170+
* - two parts may need to be recombined into a single edge
171+
* - edges from the 'right-hand side' may need to be recreated on the
172+
* left-hand side for the merged quotient path
173+
* @param parentNode
174+
* @param inputs
175+
* @param inputSource
176+
*/
162177
abstract construct(
163178
parentNode: SearchQuotientNode,
164179
inputs: Distribution<Transform>,

0 commit comments

Comments
 (0)