knots-0.1.0.1: Khovanov homology computations

Knots.Util

Synopsis

Documentation

choose :: Int -> Int -> Vector (Set Int) Source

choose n k computes all cardinality-k subsets of { 0, 1, ..., n-1 }.

choose' :: Ord a => Set a -> Int -> [Set a] Source

choose' s k computes all cardinality-k subsets of the set s.

map2 :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) Source

map3 :: (Functor f, Functor g, Functor h) => (a -> b) -> f (g (h a)) -> f (g (h b)) Source

map'i :: (Functor (f i), Functor (g i)) => (forall x k. f k x -> g k x) -> f i (f j a) -> g i (g j a) Source

map' :: (Functor f, Functor g) => (forall x. f x -> g x) -> f (f a) -> g (g a) Source

groupMap :: (Ord k, Ord l) => (k -> a -> l) -> Map k a -> Map l (Map k a) Source

convertMap1 :: (Ord k1, Ord k2) => Map k1 (Map k2 a) -> Map (k1, k2) a Source

convertMap2 :: (Ord k1, Ord k2) => Map (k1, k2) a -> Map k1 (Map k2 a) Source

convertMap3 :: (Ord k1, Ord k2) => Map k1 (Map k2 a) -> Map k2 (Map k1 a) Source

convertMap4 :: Ord k => [Map k a] -> Map k [Maybe a] Source

prod :: (Monoid a, Ord a) => Set a -> Set a -> Set a Source

prod' :: (Ord a, Ord b) => Set a -> Set b -> Set (a, b) Source

power :: Ord a => Set a -> [Set a] Source

List of subsets of a given set.

(.*) :: (Ring r, Functor f) => r -> f r -> f r Source

Scalar multiplication

data IntPair Source

Strict, unpacked pair of two Int values.

Constructors

 IntPair !Int !Int

Instances

 Eq IntPair Ord IntPair Read IntPair Show IntPair NFData IntPair

replace :: Eq a => a -> a -> a -> a Source