twentyseven-0.0.0: Rubik's cube solver

Safe HaskellNone
LanguageHaskell2010

Rubik.Distances

Description

Pruning tables

Synopsis

Documentation

distances :: (Traversable t, Eq a, Integral a, Show a, Vector v a) => Int -> Coord -> (Coord -> t Coord) -> v a Source

distancesM :: forall a m t r v. (Traversable t, Eq a, Integral a, Show a, Vector v a, PrimMonad m, MonadRef r m) => ILoop m (Mutable v) a -> Int -> Coord -> (Coord -> t Coord) -> m (v a) Source

Given a graph (via a neighbors function), find the distances from a root to all nodes.

fill :: (Integral a1, Integral a2, Foldable t, PrimMonad f, PrimMonad f1, MonadRef r f, MonadRef r f1, MVector v a1, (~) * (PrimState f1) (PrimState f)) => (v (PrimState f1) a1 -> (Int -> a1 -> f1 ()) -> f a) -> a2 -> Int -> (Int -> t Int) -> v (PrimState f) a1 -> MBitVector (PrimState f) -> r a2 -> a1 -> f () Source

fillFrom :: (Integral a1, Num a, Foldable t, PrimMonad f, MonadRef r f, MVector v a1) => (Int -> t Int) -> v (PrimState f) a1 -> MBitVector (PrimState f) -> r a -> a1 -> a1 -> Int -> f () Source

fill' :: (Eq a2, Eq a3, Num a2, Num a3, Foldable t, PrimMonad f, MonadRef r f, MonadRef r f1, MVector v a2) => (v (PrimState f) a2 -> (a1 -> a2 -> f ()) -> f1 a) -> a3 -> (a1 -> t Int) -> v (PrimState f) a2 -> r a3 -> a2 -> f1 () Source