import { Graph } from '../graph/graph'; import { InvalidInputError } from '../types/errors'; import { Edge, Node } from '../types/graph'; import { Result } from '../types/result'; /** * Extracts an induced subgraph containing only the specified nodes * and all edges between them. * @param graph - Source graph * @param nodeIds - Set of node IDs to include in subgraph * @returns A new graph containing only the specified nodes and their interconnecting edges * * Time Complexity: O(V + E) where V is nodeIds.size and E is edges in original graph * Space Complexity: O(V + E') where E' is edges in induced subgraph */ export declare const extractInducedSubgraph: (graph: Graph, nodeIds: Set) => Result, InvalidInputError>; /** * Extracts a subgraph by filtering nodes and edges based on predicates. * @param graph - Source graph * @param nodePredicate - Function to determine if a node should be included * @param edgePredicate - Optional function to determine if an edge should be included * @returns A new graph containing only nodes/edges that pass the predicates * * Time Complexity: O(V + E) * Space Complexity: O(V' + E') */ export declare const filterGraph: (graph: Graph, nodePredicate: (node: N) => boolean, edgePredicate?: (edge: E) => boolean) => Result, InvalidInputError>; /** * Creates a copy of the graph with only specific edge types. * @param graph - Source graph * @param edgeTypes - Set of edge types to include * @returns A new graph containing only edges of the specified types */ export declare const filterByEdgeType: (graph: Graph, edgeTypes: Set) => Result, InvalidInputError>; //# sourceMappingURL=subgraph.d.ts.map