Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- aStar :: forall n p. (Ord n, Ord p, Num p) => (n -> p) -> (n -> Map n p) -> n -> n -> Maybe [n]
- binarySearch :: (Int -> Ordering) -> Int -> Int -> Maybe Int
- exponentialSearch :: (Int -> Ordering) -> Int -> Maybe Int
- binaryMinSearch :: (Int -> Bool) -> Int -> Int -> Maybe Int
- exponentialMinSearch :: (Int -> Bool) -> Int -> Maybe Int
- binaryFindMin :: (Int -> Maybe a) -> Int -> Int -> Maybe a
- exponentialFindMin :: (Int -> Maybe a) -> Int -> Maybe a
Documentation
:: (Ord n, Ord p, Num p) | |
=> (n -> p) | heuristic |
-> (n -> Map n p) | neighborhood |
-> n | start |
-> n | target |
-> Maybe [n] | the shortest path, if it exists |
A* Search
binaryMinSearch :: (Int -> Bool) -> Int -> Int -> Maybe Int Source #
Find the lowest value where the predicate is satisfied within the given bounds.
exponentialMinSearch :: (Int -> Bool) -> Int -> Maybe Int Source #
Find the lowest value where the predicate is satisfied above a given bound.