lca-0.3.1: O(log n) persistent online lowest common ancestor search without preprocessing

Copyright(C) 2012-2015 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.LCA.View

Description

 

Synopsis

Documentation

data View f a Source #

Provides a consistent View for peeling off the bottom node of a path.

Constructors

Root 
Node !Int a (f a) 

Instances

Functor f => Functor (View f) Source # 

Methods

fmap :: (a -> b) -> View f a -> View f b #

(<$) :: a -> View f b -> View f a #

Foldable f => Foldable (View f) Source # 

Methods

fold :: Monoid m => View f m -> m #

foldMap :: Monoid m => (a -> m) -> View f a -> m #

foldr :: (a -> b -> b) -> b -> View f a -> b #

foldr' :: (a -> b -> b) -> b -> View f a -> b #

foldl :: (b -> a -> b) -> b -> View f a -> b #

foldl' :: (b -> a -> b) -> b -> View f a -> b #

foldr1 :: (a -> a -> a) -> View f a -> a #

foldl1 :: (a -> a -> a) -> View f a -> a #

toList :: View f a -> [a] #

null :: View f a -> Bool #

length :: View f a -> Int #

elem :: Eq a => a -> View f a -> Bool #

maximum :: Ord a => View f a -> a #

minimum :: Ord a => View f a -> a #

sum :: Num a => View f a -> a #

product :: Num a => View f a -> a #

Traversable f => Traversable (View f) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> View f a -> f (View f b) #

sequenceA :: Applicative f => View f (f a) -> f (View f a) #

mapM :: Monad m => (a -> m b) -> View f a -> m (View f b) #

sequence :: Monad m => View f (m a) -> m (View f a) #

(Eq (f a), Eq a) => Eq (View f a) Source # 

Methods

(==) :: View f a -> View f a -> Bool #

(/=) :: View f a -> View f a -> Bool #

(Ord (f a), Ord a) => Ord (View f a) Source # 

Methods

compare :: View f a -> View f a -> Ordering #

(<) :: View f a -> View f a -> Bool #

(<=) :: View f a -> View f a -> Bool #

(>) :: View f a -> View f a -> Bool #

(>=) :: View f a -> View f a -> Bool #

max :: View f a -> View f a -> View f a #

min :: View f a -> View f a -> View f a #

(Read (f a), Read a) => Read (View f a) Source # 

Methods

readsPrec :: Int -> ReadS (View f a) #

readList :: ReadS [View f a] #

readPrec :: ReadPrec (View f a) #

readListPrec :: ReadPrec [View f a] #

(Show (f a), Show a) => Show (View f a) Source # 

Methods

showsPrec :: Int -> View f a -> ShowS #

show :: View f a -> String #

showList :: [View f a] -> ShowS #