Interface: Relation
Defined in: components/resourceMap/graph/graphModel.tsx:193
Properties
buildEdgesWithIndex?
optional buildEdgesWithIndex?: (fromNodes: GraphNode[], nodesByUid: Map<string, GraphNode>) => GraphEdge[];
Defined in: components/resourceMap/graph/graphModel.tsx:204
Optional index-based edge builder. When provided, this is used instead of the O(fromNodes × toNodes) nested-loop predicate scan. The function receives the fromNodes array and a Map<uid, GraphNode> index of all candidate target nodes, and returns edges in O(fromNodes × avgRefs) time instead of O(fromNodes × allNodes).
Parameters
| Parameter | Type |
|---|---|
fromNodes | GraphNode[] |
nodesByUid | Map<string, GraphNode> |
Returns
GraphEdge[]
edgeAttributes?
optional edgeAttributes?: (from: GraphNode, to: GraphNode) => Partial<Omit<GraphEdge, "id" | "source" | "target">>;
Defined in: components/resourceMap/graph/graphModel.tsx:212
Optional extra attributes to apply to an edge created by this relation
when its predicate matches (e.g. marking a nonGroupingSide). Structural
fields (id/source/target) are always assigned by the caller and are
excluded from this callback's return type so they can't be overwritten.
Parameters
| Parameter | Type |
|---|---|
from | GraphNode |
to | GraphNode |
Returns
Partial<Omit<GraphEdge, "id" | "source" | "target">>
fromSource
fromSource: string;
Defined in: components/resourceMap/graph/graphModel.tsx:195
id
id: string;
Defined in: components/resourceMap/graph/graphModel.tsx:194
label?
optional label?: string;
Defined in: components/resourceMap/graph/graphModel.tsx:205
predicate
predicate: (from: GraphNode, to: GraphNode) => boolean;
Defined in: components/resourceMap/graph/graphModel.tsx:197
Parameters
| Parameter | Type |
|---|---|
from | GraphNode |
to | GraphNode |
Returns
boolean
toSource?
optional toSource?: string;
Defined in: components/resourceMap/graph/graphModel.tsx:196