import { Graph } from '../graph/graph'; import { ExtractionError } from '../types/errors'; import { Edge, Node } from '../types/graph'; import { Result } from '../types/result'; import { SubgraphFilter } from './validators'; /** * Filters a graph based on node and edge attributes. * * Supports multiple filtering modes: * - Node predicates: Filter nodes by custom logic * - Edge predicates: Filter edges by custom logic * - Node attributes: Filter nodes by attribute values * - Edge types: Filter edges by type set * - Combine modes: AND (default) or OR for multiple filters * @param graph - Source graph to filter * @param filter - Filter specification with predicates and options * @returns Result containing filtered subgraph or error * * Time Complexity: O(V + E) where V = nodes, E = edges * Space Complexity: O(V' + E') where V', E' are filtered counts * @example * ```typescript * // Filter for recent high-impact papers * const result = filterSubgraph(graph, { * nodePredicate: (node) => node.year >= 2020 && node.citationCount >= 100, * edgeTypes: new Set(['cites']), * combineMode: 'and' * }); * ``` */ export declare const filterSubgraph: (graph: Graph, filter: SubgraphFilter) => Result, ExtractionError>; //# sourceMappingURL=filter.d.ts.map