@rsconcept/domain 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/analyzer-DlSq3Y3r.d.ts +39 -0
- package/dist/arguments-extractor-1acwjQNc.d.ts +38 -0
- package/dist/ast-C8sIpKdL.d.ts +51 -0
- package/dist/ast-annotations-BiMjkKvz.d.ts +16 -0
- package/dist/branded-ZlzIcxzu.d.ts +9 -0
- package/dist/calculator-C9W2jkSx.d.ts +39 -0
- package/dist/cctext/index.d.ts +2 -1
- package/dist/cctext/index.js +2 -42
- package/dist/cctext/language-api.d.ts +10 -12
- package/dist/cctext/language-api.js +157 -227
- package/dist/cctext/language-api.js.map +1 -1
- package/dist/cctext/language.d.ts +24 -22
- package/dist/cctext/language.js +43 -39
- package/dist/cctext/language.js.map +1 -1
- package/dist/error-E1LVq_3w.d.ts +87 -0
- package/dist/graph/graph.d.ts +2 -62
- package/dist/graph/graph.js +339 -382
- package/dist/graph/graph.js.map +1 -1
- package/dist/graph/index.d.ts +2 -1
- package/dist/graph/index.js +2 -384
- package/dist/graph-DR8rL2o3.d.ts +64 -0
- package/dist/hash-Y8I4c6Al.d.ts +8 -0
- package/dist/index-BKZ67WMa.d.ts +1 -0
- package/dist/index-BVVgDSdq.d.ts +1 -0
- package/dist/index-DmtQKWjk.d.ts +1 -0
- package/dist/index-_6s0AX1B.d.ts +1 -0
- package/dist/index.d.ts +27 -28
- package/dist/index.js +23 -5851
- package/dist/lezer-tree-iS7LpLBJ.d.ts +14 -0
- package/dist/library/folder-tree.d.ts +22 -20
- package/dist/library/folder-tree.js +108 -130
- package/dist/library/folder-tree.js.map +1 -1
- package/dist/library/index.d.ts +8 -17
- package/dist/library/index.js +7 -2800
- package/dist/library/library-api.d.ts +3 -1
- package/dist/library/library-api.js +9 -8
- package/dist/library/library-api.js.map +1 -1
- package/dist/library/library.d.ts +2 -56
- package/dist/library/library.js +23 -19
- package/dist/library/library.js.map +1 -1
- package/dist/library/oss-api.d.ts +26 -37
- package/dist/library/oss-api.js +258 -1096
- package/dist/library/oss-api.js.map +1 -1
- package/dist/library/oss-layout-api.d.ts +28 -28
- package/dist/library/oss-layout-api.js +239 -316
- package/dist/library/oss-layout-api.js.map +1 -1
- package/dist/library/oss-layout.d.ts +2 -25
- package/dist/library/oss-layout.js +1 -1
- package/dist/library/oss.d.ts +87 -89
- package/dist/library/oss.js +27 -26
- package/dist/library/oss.js.map +1 -1
- package/dist/library/rsengine.d.ts +100 -106
- package/dist/library/rsengine.js +439 -2599
- package/dist/library/rsengine.js.map +1 -1
- package/dist/library/rsform-api.d.ts +11 -16
- package/dist/library/rsform-api.js +313 -825
- package/dist/library/rsform-api.js.map +1 -1
- package/dist/library/rsform.d.ts +159 -167
- package/dist/library/rsform.js +29 -28
- package/dist/library/rsform.js.map +1 -1
- package/dist/library/rsmodel-api.d.ts +8 -15
- package/dist/library/rsmodel-api.js +172 -813
- package/dist/library/rsmodel-api.js.map +1 -1
- package/dist/library/rsmodel.d.ts +27 -33
- package/dist/library/rsmodel.js +16 -23
- package/dist/library/rsmodel.js.map +1 -1
- package/dist/library/structure-planner.d.ts +20 -26
- package/dist/library/structure-planner.js +106 -474
- package/dist/library/structure-planner.js.map +1 -1
- package/dist/library-CYun28Xz.d.ts +58 -0
- package/dist/oss-layout-3glgAqfn.d.ts +27 -0
- package/dist/parser-Bwd8LxJ1.d.ts +7 -0
- package/dist/parsing/ast.d.ts +2 -49
- package/dist/parsing/ast.js +68 -76
- package/dist/parsing/ast.js.map +1 -1
- package/dist/parsing/index.d.ts +3 -3
- package/dist/parsing/index.js +3 -141
- package/dist/parsing/lezer-tree.d.ts +2 -13
- package/dist/parsing/lezer-tree.js +50 -43
- package/dist/parsing/lezer-tree.js.map +1 -1
- package/dist/rslang/api.d.ts +9 -14
- package/dist/rslang/api.js +114 -827
- package/dist/rslang/api.js.map +1 -1
- package/dist/rslang/ast-annotations.d.ts +2 -18
- package/dist/rslang/ast-annotations.js +34 -45
- package/dist/rslang/ast-annotations.js.map +1 -1
- package/dist/rslang/error.d.ts +2 -85
- package/dist/rslang/error.js +88 -150
- package/dist/rslang/error.js.map +1 -1
- package/dist/rslang/eval/calculator.d.ts +2 -43
- package/dist/rslang/eval/calculator.js +81 -1636
- package/dist/rslang/eval/calculator.js.map +1 -1
- package/dist/rslang/eval/evaluation-cache.d.ts +22 -26
- package/dist/rslang/eval/evaluation-cache.js +168 -287
- package/dist/rslang/eval/evaluation-cache.js.map +1 -1
- package/dist/rslang/eval/evaluator.d.ts +59 -63
- package/dist/rslang/eval/evaluator.js +602 -1509
- package/dist/rslang/eval/evaluator.js.map +1 -1
- package/dist/rslang/eval/value-api.d.ts +2 -48
- package/dist/rslang/eval/value-api.js +2 -490
- package/dist/rslang/eval/value.d.ts +2 -36
- package/dist/rslang/eval/value.js +2 -118
- package/dist/rslang/index.d.ts +14 -17
- package/dist/rslang/index.js +12 -4314
- package/dist/rslang/labels.d.ts +6 -6
- package/dist/rslang/labels.js +139 -305
- package/dist/rslang/labels.js.map +1 -1
- package/dist/rslang/parser/expression-generator.d.ts +5 -5
- package/dist/rslang/parser/expression-generator.js +248 -446
- package/dist/rslang/parser/expression-generator.js.map +1 -1
- package/dist/rslang/parser/normalize.d.ts +4 -8
- package/dist/rslang/parser/normalize.js +286 -481
- package/dist/rslang/parser/normalize.js.map +1 -1
- package/dist/rslang/parser/parser.d.ts +2 -5
- package/dist/rslang/parser/parser.js +30 -21
- package/dist/rslang/parser/parser.js.map +1 -1
- package/dist/rslang/parser/parser.terms.d.ts +43 -41
- package/dist/rslang/parser/parser.terms.js +44 -83
- package/dist/rslang/parser/parser.terms.js.map +1 -1
- package/dist/rslang/parser/syntax-errors.d.ts +5 -8
- package/dist/rslang/parser/syntax-errors.js +113 -382
- package/dist/rslang/parser/syntax-errors.js.map +1 -1
- package/dist/rslang/parser/token.d.ts +2 -79
- package/dist/rslang/parser/token.js +81 -93
- package/dist/rslang/parser/token.js.map +1 -1
- package/dist/rslang/semantic/analyzer.d.ts +2 -39
- package/dist/rslang/semantic/analyzer.js +186 -2600
- package/dist/rslang/semantic/analyzer.js.map +1 -1
- package/dist/rslang/semantic/arguments-extractor.d.ts +2 -42
- package/dist/rslang/semantic/arguments-extractor.js +202 -361
- package/dist/rslang/semantic/arguments-extractor.js.map +1 -1
- package/dist/rslang/semantic/type-auditor.d.ts +64 -68
- package/dist/rslang/semantic/type-auditor.js +594 -1564
- package/dist/rslang/semantic/type-auditor.js.map +1 -1
- package/dist/rslang/semantic/typification-api.d.ts +4 -7
- package/dist/rslang/semantic/typification-api.js +162 -303
- package/dist/rslang/semantic/typification-api.js.map +1 -1
- package/dist/rslang/semantic/typification-parser.d.ts +2 -12
- package/dist/rslang/semantic/typification-parser.js +165 -219
- package/dist/rslang/semantic/typification-parser.js.map +1 -1
- package/dist/rslang/semantic/typification.d.ts +2 -119
- package/dist/rslang/semantic/typification.js +66 -52
- package/dist/rslang/semantic/typification.js.map +1 -1
- package/dist/rslang/semantic/value-auditor.d.ts +32 -38
- package/dist/rslang/semantic/value-auditor.js +206 -518
- package/dist/rslang/semantic/value-auditor.js.map +1 -1
- package/dist/rslang/semantic/value-class.d.ts +2 -10
- package/dist/rslang/semantic/value-class.js +8 -7
- package/dist/rslang/semantic/value-class.js.map +1 -1
- package/dist/rslang/typification-graph.d.ts +2 -33
- package/dist/rslang/typification-graph.js +94 -306
- package/dist/rslang/typification-graph.js.map +1 -1
- package/dist/shared/branded.d.ts +2 -7
- package/dist/shared/branded.js +1 -1
- package/dist/shared/hash.d.ts +2 -6
- package/dist/shared/hash.js +13 -13
- package/dist/shared/hash.js.map +1 -1
- package/dist/shared/index.d.ts +3 -2
- package/dist/shared/index.js +2 -18
- package/dist/token-DeXAmzwr.d.ts +81 -0
- package/dist/typification-Dk-fisgO.d.ts +120 -0
- package/dist/typification-graph-6HcZ-rKH.d.ts +30 -0
- package/dist/typification-parser-BBVx1RxP.d.ts +13 -0
- package/dist/value-B8UtCqaK.js +366 -0
- package/dist/value-B8UtCqaK.js.map +1 -0
- package/dist/value-CTjX6825.d.ts +33 -0
- package/dist/value-api-Bw-SgaYY.d.ts +49 -0
- package/dist/value-class-CNI-lqXJ.d.ts +12 -0
- package/package.json +8 -8
- package/src/library/oss-api.test.ts +76 -0
- package/src/library/oss-api.ts +4 -1
- package/src/library/rsform-api.test.ts +24 -0
- package/src/library/rsform-api.ts +12 -4
- package/dist/cctext/index.js.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/library/index.js.map +0 -1
- package/dist/library/oss-layout.js.map +0 -1
- package/dist/parsing/index.js.map +0 -1
- package/dist/rslang/eval/value-api.js.map +0 -1
- package/dist/rslang/eval/value.js.map +0 -1
- package/dist/rslang/index.js.map +0 -1
- package/dist/shared/branded.js.map +0 -1
- package/dist/shared/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cctext/language.ts"],"sourcesContent":["/**\n * Module: Natural language model declarations.\n */\n\n/** Represents single unit of language Morphology. */\n// prettier-ignore\nexport const Grammeme = {\n // Число\n sing: 'sing', plur: 'plur',\n\n // Падеж\n nomn: 'nomn', gent: 'gent', datv: 'datv',\n accs: 'accs', ablt: 'ablt', loct: 'loct',\n} as const;\nexport type Grammeme = (typeof Grammeme)[keyof typeof Grammeme];\n\n/** Represents case language concept. */\nexport const Case: Grammeme[] = [\n Grammeme.nomn,\n Grammeme.gent,\n Grammeme.datv,\n Grammeme.accs,\n Grammeme.ablt,\n Grammeme.loct\n] as const;\n\n/** Represents plurality language concept. */\nexport const Plurality: Grammeme[] = [Grammeme.sing, Grammeme.plur] as const;\n\n/** Represents specific wordform attached to {@link Grammeme}s. */\nexport interface WordForm {\n text: string;\n grams: Grammeme[];\n}\n\n/** Represents a term available for text reference resolution. */\nexport interface TermContextItem {\n nominal: string;\n forms?: WordForm[];\n}\n\n/** Represents term lookup context keyed by entity alias. */\nexport type TermContext = Record<string, TermContextItem>;\n\n/**\n * Represents list of {@link Grammeme}s available in reference construction.\n */\n// prettier-ignore\nexport const supportedGrammemes = [\n Grammeme.sing, Grammeme.plur,\n Grammeme.nomn, Grammeme.gent, Grammeme.datv,\n Grammeme.accs, Grammeme.ablt, Grammeme.loct,\n] as const;\n\n// ====== Reference resolution =====\n\n/** Represents text reference type. */\nexport const ReferenceType = {\n ENTITY: 'entity',\n SYNTACTIC: 'syntax'\n} as const;\nexport type ReferenceType = (typeof ReferenceType)[keyof typeof ReferenceType];\n\n/** Represents entity reference payload. */\nexport interface EntityReference {\n entity: string;\n tags: Grammeme[];\n}\n\n/** Represents syntactic reference payload. */\nexport interface SyntacticReference {\n offset: number;\n nominal: string;\n}\n\n/** Represents abstract reference data. */\nexport interface IReference {\n type: ReferenceType;\n data: EntityReference | SyntacticReference;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"language.js","names":[],"sources":["../../src/cctext/language.ts"],"sourcesContent":["/**\n * Module: Natural language model declarations.\n */\n\n/** Represents single unit of language Morphology. */\n// prettier-ignore\nexport const Grammeme = {\n // Число\n sing: 'sing', plur: 'plur',\n\n // Падеж\n nomn: 'nomn', gent: 'gent', datv: 'datv',\n accs: 'accs', ablt: 'ablt', loct: 'loct',\n} as const;\nexport type Grammeme = (typeof Grammeme)[keyof typeof Grammeme];\n\n/** Represents case language concept. */\nexport const Case: Grammeme[] = [\n Grammeme.nomn,\n Grammeme.gent,\n Grammeme.datv,\n Grammeme.accs,\n Grammeme.ablt,\n Grammeme.loct\n] as const;\n\n/** Represents plurality language concept. */\nexport const Plurality: Grammeme[] = [Grammeme.sing, Grammeme.plur] as const;\n\n/** Represents specific wordform attached to {@link Grammeme}s. */\nexport interface WordForm {\n text: string;\n grams: Grammeme[];\n}\n\n/** Represents a term available for text reference resolution. */\nexport interface TermContextItem {\n nominal: string;\n forms?: WordForm[];\n}\n\n/** Represents term lookup context keyed by entity alias. */\nexport type TermContext = Record<string, TermContextItem>;\n\n/**\n * Represents list of {@link Grammeme}s available in reference construction.\n */\n// prettier-ignore\nexport const supportedGrammemes = [\n Grammeme.sing, Grammeme.plur,\n Grammeme.nomn, Grammeme.gent, Grammeme.datv,\n Grammeme.accs, Grammeme.ablt, Grammeme.loct,\n] as const;\n\n// ====== Reference resolution =====\n\n/** Represents text reference type. */\nexport const ReferenceType = {\n ENTITY: 'entity',\n SYNTACTIC: 'syntax'\n} as const;\nexport type ReferenceType = (typeof ReferenceType)[keyof typeof ReferenceType];\n\n/** Represents entity reference payload. */\nexport interface EntityReference {\n entity: string;\n tags: Grammeme[];\n}\n\n/** Represents syntactic reference payload. */\nexport interface SyntacticReference {\n offset: number;\n nominal: string;\n}\n\n/** Represents abstract reference data. */\nexport interface IReference {\n type: ReferenceType;\n data: EntityReference | SyntacticReference;\n}\n"],"mappings":";;;;;AAMA,MAAa,WAAW;CAEtB,MAAM;CAAQ,MAAM;CAGpB,MAAM;CAAQ,MAAM;CAAQ,MAAM;CAClC,MAAM;CAAQ,MAAM;CAAQ,MAAM;AACpC;;AAIA,MAAa,OAAmB;CAC9B,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;AACX;;AAGA,MAAa,YAAwB,CAAC,SAAS,MAAM,SAAS,IAAI;;;;AAqBlE,MAAa,qBAAqB;CAChC,SAAS;CAAM,SAAS;CACxB,SAAS;CAAM,SAAS;CAAM,SAAS;CACvC,SAAS;CAAM,SAAS;CAAM,SAAS;AACzC;;AAKA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,WAAW;AACb"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//#region src/rslang/error.d.ts
|
|
2
|
+
/** Module: Error types and functions. */
|
|
3
|
+
/** Represents error class. */
|
|
4
|
+
declare const RSErrorClass: {
|
|
5
|
+
readonly LEXER: 0;
|
|
6
|
+
readonly PARSER: 1;
|
|
7
|
+
readonly SEMANTIC: 2;
|
|
8
|
+
readonly EVALUATION: 3;
|
|
9
|
+
readonly UNKNOWN: 4;
|
|
10
|
+
};
|
|
11
|
+
type RSErrorClass = (typeof RSErrorClass)[keyof typeof RSErrorClass];
|
|
12
|
+
/** Represents RSLang expression error information. */
|
|
13
|
+
interface RSErrorInfo {
|
|
14
|
+
code: RSErrorCode;
|
|
15
|
+
params?: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
/** Represents RSLang expression error description. */
|
|
18
|
+
interface RSErrorDescription extends RSErrorInfo {
|
|
19
|
+
from: number;
|
|
20
|
+
to: number;
|
|
21
|
+
}
|
|
22
|
+
/** Error reporter function type. */
|
|
23
|
+
type ErrorReporter = (error: RSErrorDescription) => void;
|
|
24
|
+
/** Represents RSLang expression error types. */
|
|
25
|
+
declare const RSErrorCode: {
|
|
26
|
+
readonly unknownSyntax: 33792;
|
|
27
|
+
readonly missingParenthesis: 33798;
|
|
28
|
+
readonly missingCurlyBrace: 33799;
|
|
29
|
+
readonly missingSquareBracket: 33800;
|
|
30
|
+
readonly bracketMismatch: 33801;
|
|
31
|
+
readonly doubleParenthesis: 33802;
|
|
32
|
+
readonly missingOpenBracket: 33803;
|
|
33
|
+
readonly expectedLocal: 33813;
|
|
34
|
+
readonly expectedType: 33814;
|
|
35
|
+
readonly localDoubleDeclare: 10241;
|
|
36
|
+
readonly localNotUsed: 10242;
|
|
37
|
+
readonly localUndeclared: 34817;
|
|
38
|
+
readonly localShadowing: 34818;
|
|
39
|
+
readonly typesNotEqual: 34819;
|
|
40
|
+
readonly globalNotTyped: 34820;
|
|
41
|
+
readonly invalidDecart: 34821;
|
|
42
|
+
readonly invalidBoolean: 34822;
|
|
43
|
+
readonly invalidTypeOperation: 34823;
|
|
44
|
+
readonly invalidCard: 34824;
|
|
45
|
+
readonly invalidDebool: 34825;
|
|
46
|
+
readonly globalFuncWithoutArgs: 34827;
|
|
47
|
+
readonly invalidReduce: 34832;
|
|
48
|
+
readonly invalidProjectionTuple: 34833;
|
|
49
|
+
readonly invalidProjectionSet: 34834;
|
|
50
|
+
readonly invalidEnumeration: 34835;
|
|
51
|
+
readonly invalidCortegeDeclare: 34836;
|
|
52
|
+
readonly localOutOfScope: 34837;
|
|
53
|
+
readonly invalidElementPredicate: 34838;
|
|
54
|
+
readonly invalidEmptySetUsage: 34839;
|
|
55
|
+
readonly invalidArgsArity: 34840;
|
|
56
|
+
readonly invalidArgumentType: 34841;
|
|
57
|
+
readonly globalStructure: 34844;
|
|
58
|
+
readonly radicalUsage: 34849;
|
|
59
|
+
readonly invalidFilterArgumentType: 34850;
|
|
60
|
+
readonly invalidFilterArity: 34851;
|
|
61
|
+
readonly arithmeticNotSupported: 34852;
|
|
62
|
+
readonly typesNotCompatible: 34853;
|
|
63
|
+
readonly orderingNotSupported: 34854;
|
|
64
|
+
readonly expectedLogic: 34855;
|
|
65
|
+
readonly expectedSetexpr: 34856;
|
|
66
|
+
readonly invalidArgumentCortegeDeclare: 34857;
|
|
67
|
+
readonly globalNoValue: 34880;
|
|
68
|
+
readonly invalidPropertyUsage: 34881;
|
|
69
|
+
readonly calcUnknownError: 33024;
|
|
70
|
+
readonly setOverflow: 33025;
|
|
71
|
+
readonly booleanBaseLimit: 33026;
|
|
72
|
+
readonly calcGlobalMissing: 33027;
|
|
73
|
+
readonly iterationsLimit: 33028;
|
|
74
|
+
readonly calcInvalidDebool: 33029;
|
|
75
|
+
readonly iterateInfinity: 33030;
|
|
76
|
+
readonly calculationNotSupported: 33031;
|
|
77
|
+
readonly cstEmptyDerived: 34913;
|
|
78
|
+
readonly definitionNotAllowed: 34914;
|
|
79
|
+
};
|
|
80
|
+
type RSErrorCode = (typeof RSErrorCode)[keyof typeof RSErrorCode];
|
|
81
|
+
/** Generate ErrorID label. */
|
|
82
|
+
declare function getRSErrorPrefix(code: RSErrorCode): string;
|
|
83
|
+
/** Checks if error is critical. */
|
|
84
|
+
declare function isCritical(code: RSErrorCode): boolean;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { RSErrorInfo as a, RSErrorDescription as i, RSErrorClass as n, getRSErrorPrefix as o, RSErrorCode as r, isCritical as s, ErrorReporter as t };
|
|
87
|
+
//# sourceMappingURL=error-E1LVq_3w.d.ts.map
|
package/dist/graph/graph.d.ts
CHANGED
|
@@ -1,62 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
/** Represents single node of a {@link Graph}, as implemented by storing outgoing and incoming connections. */
|
|
5
|
-
declare class GraphNode<NodeID> {
|
|
6
|
-
/** Unique identifier of the node. */
|
|
7
|
-
id: NodeID;
|
|
8
|
-
/** List of outgoing nodes. */
|
|
9
|
-
outputs: NodeID[];
|
|
10
|
-
/** List of incoming nodes. */
|
|
11
|
-
inputs: NodeID[];
|
|
12
|
-
constructor(id: NodeID);
|
|
13
|
-
clone(): GraphNode<NodeID>;
|
|
14
|
-
addOutput(node: NodeID): void;
|
|
15
|
-
addInput(node: NodeID): void;
|
|
16
|
-
removeInput(target: NodeID): NodeID | null;
|
|
17
|
-
removeOutput(target: NodeID): NodeID | null;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Represents a Graph.
|
|
21
|
-
*
|
|
22
|
-
* This class is optimized for TermGraph use case and not supposed to be used as generic graph implementation.
|
|
23
|
-
*/
|
|
24
|
-
declare class Graph<NodeID = number> {
|
|
25
|
-
/** Map of nodes. */
|
|
26
|
-
nodes: Map<NodeID, GraphNode<NodeID>>;
|
|
27
|
-
constructor(arr?: NodeID[][]);
|
|
28
|
-
clone(): Graph<NodeID>;
|
|
29
|
-
at(target: NodeID): GraphNode<NodeID> | undefined;
|
|
30
|
-
addNode(target: NodeID): GraphNode<NodeID>;
|
|
31
|
-
hasNode(target: NodeID): boolean;
|
|
32
|
-
removeNode(target: NodeID): void;
|
|
33
|
-
foldNode(target: NodeID): void;
|
|
34
|
-
removeIsolated(): GraphNode<NodeID>[];
|
|
35
|
-
addEdge(source: NodeID, destination: NodeID): void;
|
|
36
|
-
removeEdge(source: NodeID, destination: NodeID): void;
|
|
37
|
-
hasEdge(source: NodeID, destination: NodeID): boolean;
|
|
38
|
-
isReachable(source: NodeID, destination: NodeID): boolean;
|
|
39
|
-
rootNodes(): NodeID[];
|
|
40
|
-
expandOutputs(origin: NodeID[]): NodeID[];
|
|
41
|
-
expandInputs(origin: NodeID[]): NodeID[];
|
|
42
|
-
expandAllOutputs(origin: NodeID[]): NodeID[];
|
|
43
|
-
expandAllInputs(origin: NodeID[]): NodeID[];
|
|
44
|
-
maximizePart(origin: NodeID[]): NodeID[];
|
|
45
|
-
topologicalOrder(): NodeID[];
|
|
46
|
-
/**
|
|
47
|
-
* Stably reorders the given node ids so that, for this DAG, no node appears before a transitive
|
|
48
|
-
* successor (edges: source → dependent; {@link GraphNode.outputs} lists dependents).
|
|
49
|
-
*/
|
|
50
|
-
sortStable(target: NodeID[]): NodeID[];
|
|
51
|
-
private buildTransitiveClosureForSort;
|
|
52
|
-
transitiveReduction(): void;
|
|
53
|
-
/**
|
|
54
|
-
* Finds a cycle in the graph.
|
|
55
|
-
*
|
|
56
|
-
* @returns {NodeID[] | null} The cycle if found, otherwise `null`.
|
|
57
|
-
* Uses non-recursive DFS.
|
|
58
|
-
*/
|
|
59
|
-
findCycle(): NodeID[] | null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { Graph, GraphNode };
|
|
1
|
+
import { n as GraphNode, t as Graph } from "../graph-DR8rL2o3.js";
|
|
2
|
+
export { Graph, GraphNode };
|