-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | L-Fuzzy Set Theory implementation in Haskell -- -- If X is a collection of objects denoted generically by x, then a fuzzy -- set F(A) in X is a set of ordered pairs. Each of them consists of an -- element x and a membership function which maps x to the membership -- space M. The current implementation is inspired by the work of Goguen, -- Joseph A. "L-fuzzy sets." Journal of mathematical analysis and -- applications 18.1 (1967). @package lfst @version 1.0.1 -- | Membership types for the Fuzzy Set definition module Membership -- | Membership value between 0 and 1 with Godel join and meet operators newtype GodelMembership Godel :: Double -> GodelMembership -- | Membership value between 0 and 1 with Goguen join and meet operators newtype GoguenMembership Goguen :: Double -> GoguenMembership -- | Membership value between 0 and 1 with Lukasiewicz join and meet -- operators newtype LukasiewiczMembership Lukas :: Double -> LukasiewiczMembership instance GHC.Num.Num Membership.LukasiewiczMembership instance GHC.Classes.Ord Membership.LukasiewiczMembership instance GHC.Classes.Eq Membership.LukasiewiczMembership instance GHC.Show.Show Membership.LukasiewiczMembership instance GHC.Num.Num Membership.GoguenMembership instance GHC.Classes.Ord Membership.GoguenMembership instance GHC.Classes.Eq Membership.GoguenMembership instance GHC.Show.Show Membership.GoguenMembership instance GHC.Num.Num Membership.GodelMembership instance GHC.Classes.Ord Membership.GodelMembership instance GHC.Classes.Eq Membership.GodelMembership instance GHC.Show.Show Membership.GodelMembership instance Algebra.Lattice.JoinSemiLattice Membership.GodelMembership instance Algebra.Lattice.MeetSemiLattice Membership.GodelMembership instance Algebra.Lattice.Lattice Membership.GodelMembership instance Algebra.Lattice.BoundedJoinSemiLattice Membership.GodelMembership instance Algebra.Lattice.BoundedMeetSemiLattice Membership.GodelMembership instance Algebra.Lattice.BoundedLattice Membership.GodelMembership instance Algebra.Lattice.JoinSemiLattice Membership.GoguenMembership instance Algebra.Lattice.MeetSemiLattice Membership.GoguenMembership instance Algebra.Lattice.Lattice Membership.GoguenMembership instance Algebra.Lattice.BoundedJoinSemiLattice Membership.GoguenMembership instance Algebra.Lattice.BoundedMeetSemiLattice Membership.GoguenMembership instance Algebra.Lattice.BoundedLattice Membership.GoguenMembership instance Algebra.Lattice.JoinSemiLattice Membership.LukasiewiczMembership instance Algebra.Lattice.MeetSemiLattice Membership.LukasiewiczMembership instance Algebra.Lattice.Lattice Membership.LukasiewiczMembership instance Algebra.Lattice.BoundedJoinSemiLattice Membership.LukasiewiczMembership instance Algebra.Lattice.BoundedMeetSemiLattice Membership.LukasiewiczMembership instance Algebra.Lattice.BoundedLattice Membership.LukasiewiczMembership -- | If X is a collection of objects denoted generically by x, then a fuzzy -- set F(A) in X is a set of ordered pairs. Each of them consists of an -- element x and a membership function which maps x to the membership -- space M. module FuzzySet -- | FuzzySet type definition newtype FuzzySet m i FS :: (Map i m) -> FuzzySet m i -- | Returns the preimage of the given set in input preimage :: (Eq i, Eq j) => (i -> j) -> j -> [i] -> [i] -- | Returns an empty fuzzy set empty :: (Ord i, BoundedLattice m) => FuzzySet m i -- | Inserts a new pair (i, m) to the fuzzy set add :: (Ord i, Eq m, BoundedLattice m) => FuzzySet m i -> (i, m) -> FuzzySet m i -- | Returns the fuzzy set's support support :: (Ord i, BoundedLattice m) => FuzzySet m i -> [i] -- | Returns the element i's membership if i belongs to the support returns -- its membership, otherwise returns bottom lattice value mu :: (Ord i, BoundedLattice m) => FuzzySet m i -> i -> m -- | Returns the crisp subset of given fuzzy set consisting of all elements -- with membership equals to one core :: (Ord i, Eq m, BoundedLattice m) => FuzzySet m i -> [i] -- | Returns those elements whose memberships are greater or equal than the -- given alpha alphaCut :: (Ord i, Ord m, BoundedLattice m) => FuzzySet m i -> m -> [i] -- | Builds a fuzzy set from a list of pairs fromList :: (Ord i, Eq m, BoundedLattice m) => [(i, m)] -> FuzzySet m i -- | Applies a unary function to the specified fuzzy set map1 :: (Ord i, Eq m, BoundedLattice m) => (m -> m) -> FuzzySet m i -> FuzzySet m i -- | Applies a binary function to the two specified fuzzy sets map2 :: (Ord i, Eq m, BoundedLattice m) => (m -> m -> m) -> FuzzySet m i -> FuzzySet m i -> FuzzySet m i -- | Returns the union between the two specified fuzzy sets union :: (Ord i, Eq m, BoundedLattice m) => FuzzySet m i -> FuzzySet m i -> FuzzySet m i -- | Returns the intersection between the two specified fuzzy sets intersection :: (Ord i, Eq m, BoundedLattice m) => FuzzySet m i -> FuzzySet m i -> FuzzySet m i -- | Returns the complement of the specified fuzzy set complement :: (Ord i, Num m, Eq m, BoundedLattice m) => FuzzySet m i -> FuzzySet m i -- | Returns the algebraic sum between the two specified fuzzy sets algebraicSum :: (Ord i, Eq m, Num m, BoundedLattice m) => FuzzySet m i -> FuzzySet m i -> FuzzySet m i -- | Returns the algebraic product between the two specified fuzzy sets algebraicProduct :: (Ord i, Eq m, Num m, BoundedLattice m) => FuzzySet m i -> FuzzySet m i -> FuzzySet m i -- | Returns the cartesian product between two fuzzy sets using the -- specified function generalizedProduct :: (Ord i, Ord j, Eq m, BoundedLattice m) => (m -> m -> m) -> FuzzySet m i -> FuzzySet m j -> FuzzySet m (i, j) -- | Defines a mapping between sub-categories preserving morphisms class ExoFunctor f i where type family SubCatConstraintI f i :: Constraint type family SubCatConstraintJ f j :: Constraint SubCatConstraintI f i = () SubCatConstraintJ f j = () fmap :: (ExoFunctor f i, SubCatConstraintI f i, SubCatConstraintJ f j) => (i -> j) -> f i -> f j instance (GHC.Classes.Ord m, GHC.Classes.Ord i) => GHC.Classes.Ord (FuzzySet.FuzzySet m i) instance (GHC.Classes.Eq m, GHC.Classes.Eq i) => GHC.Classes.Eq (FuzzySet.FuzzySet m i) instance (GHC.Classes.Ord i, Algebra.Lattice.BoundedLattice m, GHC.Show.Show i, GHC.Show.Show m) => GHC.Show.Show (FuzzySet.FuzzySet m i) instance (Algebra.Lattice.BoundedLattice m, GHC.Classes.Eq m) => FuzzySet.ExoFunctor (FuzzySet.FuzzySet m) i