import { DspGraph } from './types'; /** * Simple helper to get a list of nodes from a traversal (which is simply node ids). */ export declare const toNodes: (graph: DspGraph.Graph, traversal: DspGraph.GraphTraversal) => DspGraph.Node[]; export declare const listSinkNodes: (graph: DspGraph.Graph, node: DspGraph.Node, portletType?: DspGraph.PortletType) => DspGraph.Node[]; export declare const listSourceNodes: (graph: DspGraph.Graph, node: DspGraph.Node, portletType?: DspGraph.PortletType) => DspGraph.Node[]; export declare const listSourceConnections: (node: DspGraph.Node, portletType?: DspGraph.PortletType) => Array; export declare const listSinkConnections: (node: DspGraph.Node, portletType?: DspGraph.PortletType) => Array; /** * Breadth first traversal for signal in the graph. * Traversal path is calculated by pulling incoming connections from * {@link nodesPullingSignal}. */ export declare const signalTraversal: (graph: DspGraph.Graph, nodesPullingSignal: Array, shouldContinue?: (node: DspGraph.Node) => boolean) => DspGraph.GraphTraversal; /** * Breadth first traversal for signal in the graph. * Traversal path is calculated by pulling incoming connections from * {@link nodesPushingMessages}. */ export declare const messageTraversal: (graph: DspGraph.Graph, nodesPushingMessages: Array) => DspGraph.GraphTraversal; /** * Remove dead sinks and sources in graph. * @param graphTraversal contains all nodes that are connected to * an input or output of the graph. */ export declare const trimGraph: (graph: DspGraph.Graph, graphTraversal: DspGraph.GraphTraversal) => DspGraph.Graph; /** * When `node` has a sink node that is not connected to an end sink, that sink node won't be included * in the traversal, but will still appear in `node.sinks`. * Therefore, we need to make sure to filter `node.sinks` to exclude sink nodes that don't * appear in the traversal. */ export declare const removeDeadSinks: (sinks: DspGraph.ConnectionEndpointMap, graphTraversal: DspGraph.GraphTraversal) => DspGraph.ConnectionEndpointMap; /** * Filters a node's sources to exclude source nodes that don't * appear in the traversal. */ export declare const removeDeadSources: (sources: DspGraph.ConnectionEndpointMap, graphTraversal: DspGraph.GraphTraversal) => DspGraph.ConnectionEndpointMap;