unison-util-relation-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Util.Relation3

Synopsis

Documentation

data Relation3 a b c Source #

Constructors

Relation3 

Fields

Instances

Instances details
(Ord a, Ord b, Ord c) => Monoid (Relation3 a b c) Source # 
Instance details

Defined in Unison.Util.Relation3

Methods

mempty :: Relation3 a b c #

mappend :: Relation3 a b c -> Relation3 a b c -> Relation3 a b c #

mconcat :: [Relation3 a b c] -> Relation3 a b c #

(Ord a, Ord b, Ord c) => Semigroup (Relation3 a b c) Source # 
Instance details

Defined in Unison.Util.Relation3

Methods

(<>) :: Relation3 a b c -> Relation3 a b c -> Relation3 a b c #

sconcat :: NonEmpty (Relation3 a b c) -> Relation3 a b c #

stimes :: Integral b0 => b0 -> Relation3 a b c -> Relation3 a b c #

(Show a, Show b, Show c) => Show (Relation3 a b c) Source # 
Instance details

Defined in Unison.Util.Relation3

Methods

showsPrec :: Int -> Relation3 a b c -> ShowS #

show :: Relation3 a b c -> String #

showList :: [Relation3 a b c] -> ShowS #

(Eq a, Eq b, Eq c) => Eq (Relation3 a b c) Source # 
Instance details

Defined in Unison.Util.Relation3

Methods

(==) :: Relation3 a b c -> Relation3 a b c -> Bool #

(/=) :: Relation3 a b c -> Relation3 a b c -> Bool #

(Ord a, Ord b, Ord c) => Ord (Relation3 a b c) Source # 
Instance details

Defined in Unison.Util.Relation3

Methods

compare :: Relation3 a b c -> Relation3 a b c -> Ordering #

(<) :: Relation3 a b c -> Relation3 a b c -> Bool #

(<=) :: Relation3 a b c -> Relation3 a b c -> Bool #

(>) :: Relation3 a b c -> Relation3 a b c -> Bool #

(>=) :: Relation3 a b c -> Relation3 a b c -> Bool #

max :: Relation3 a b c -> Relation3 a b c -> Relation3 a b c #

min :: Relation3 a b c -> Relation3 a b c -> Relation3 a b c #

d1s :: Relation3 a b c -> Set a Source #

d2s :: Relation3 a b c -> Set b Source #

d3s :: Relation3 a b c -> Set c Source #

d12 :: Relation3 a b c -> Relation a b Source #

Project out a relation that only includes the 1st and 2nd dimensions.

d13 :: Relation3 a b c -> Relation a c Source #

Project out a relation that only includes the 1st and 3rd dimensions.

d23 :: Relation3 a b c -> Relation b c Source #

Project out a relation that only includes the 2nd and 3rd dimensions.

filter :: (Ord a, Ord b, Ord c) => ((a, b, c) -> Bool) -> Relation3 a b c -> Relation3 a b c Source #

mapD1 :: (Ord a, Ord a', Ord b, Ord c) => (a -> a') -> Relation3 a b c -> Relation3 a' b c Source #

mapD1Monotonic :: (Ord a, Ord a', Ord b, Ord c) => (a -> a') -> Relation3 a b c -> Relation3 a' b c Source #

Like mapD1, but takes a function that must be monotonic; i.e. compare x y == compare (f x) (f y).

mapD2 :: (Ord a, Ord b, Ord b', Ord c) => (b -> b') -> Relation3 a b c -> Relation3 a b' c Source #

mapD2Monotonic :: (Ord a, Ord b, Ord b', Ord c) => (b -> b') -> Relation3 a b c -> Relation3 a b' c Source #

Like mapD2, but takes a function that must be monotonic; i.e. compare x y == compare (f x) (f y).

member :: (Ord a, Ord b, Ord c) => a -> b -> c -> Relation3 a b c -> Bool Source #

memberD2 :: Ord b => b -> Relation3 a b c -> Bool Source #

lookupD1 :: (Ord a, Ord b, Ord c) => a -> Relation3 a b c -> Relation b c Source #

lookupD2 :: (Ord a, Ord b, Ord c) => b -> Relation3 a b c -> Relation a c Source #

lookupD3 :: (Ord a, Ord b, Ord c) => c -> Relation3 a b c -> Relation a b Source #

size :: (Ord a, Ord b, Ord c) => Relation3 a b c -> Int Source #

toList :: Relation3 a b c -> [(a, b, c)] Source #

toNestedList :: Relation3 a b c -> [(a, (b, c))] Source #

nestD12 :: (Ord a, Ord b, Ord c) => Relation3 a b c -> Relation (a, b) c Source #

fromNestedDom :: (Ord a, Ord b, Ord c) => Relation (a, b) c -> Relation3 a b c Source #

fromNestedRan :: (Ord a, Ord b, Ord c) => Relation a (b, c) -> Relation3 a b c Source #

fromList :: (Ord a, Ord b, Ord c) => [(a, b, c)] -> Relation3 a b c Source #

empty :: (Ord a, Ord b, Ord c) => Relation3 a b c Source #

null :: Relation3 a b c -> Bool Source #

insert :: (Ord a, Ord b, Ord c) => a -> b -> c -> Relation3 a b c -> Relation3 a b c Source #

delete :: (Ord a, Ord b, Ord c) => a -> b -> c -> Relation3 a b c -> Relation3 a b c Source #

insertAll :: Foldable f => Ord a => Ord b => Ord c => f (a, b, c) -> Relation3 a b c -> Relation3 a b c Source #

deleteAll :: Foldable f => Ord a => Ord b => Ord c => f (a, b, c) -> Relation3 a b c -> Relation3 a b c Source #

difference :: (Ord a, Ord b, Ord c) => Relation3 a b c -> Relation3 a b c -> Relation3 a b c Source #

Compute the difference of two relations.

union :: (Ord a, Ord b, Ord c) => Relation3 a b c -> Relation3 a b c -> Relation3 a b c Source #

union x y computes the union of x and y.