export interface CountPathsOptions { start: Node; successors: (node: Node) => Iterable; success: (node: Node) => boolean; } /** * Count the total number of possible paths to reach a destination. There must be no loops * in the graph, or the function will overflow its stack. * * # Example * * On a 8x8 board, find the total paths from the bottom-left square to the top-right square. * * ``` * use pathfinding::prelude::count_paths; * * let n = count_paths( * (0, 0), * |&(x, y)| { * [(x + 1, y), (x, y + 1)] * .into_iter() * .filter(|&(x, y)| x < 8 && y < 8) * }, * |&c| c == (7, 7), * ); * assert_eq!(n, 3432); * ``` */ export declare function countPaths(options: CountPathsOptions): number;