-- 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.2 -- | Membership types for the Fuzzy Set definition module Algebra.LFST.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 Algebra.LFST.Membership.LukasiewiczMembership instance GHC.Classes.Ord Algebra.LFST.Membership.LukasiewiczMembership instance GHC.Classes.Eq Algebra.LFST.Membership.LukasiewiczMembership instance GHC.Show.Show Algebra.LFST.Membership.LukasiewiczMembership instance GHC.Num.Num Algebra.LFST.Membership.GoguenMembership instance GHC.Classes.Ord Algebra.LFST.Membership.GoguenMembership instance GHC.Classes.Eq Algebra.LFST.Membership.GoguenMembership instance GHC.Show.Show Algebra.LFST.Membership.GoguenMembership instance GHC.Num.Num Algebra.LFST.Membership.GodelMembership instance GHC.Classes.Ord Algebra.LFST.Membership.GodelMembership instance GHC.Classes.Eq Algebra.LFST.Membership.GodelMembership instance GHC.Show.Show Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.JoinSemiLattice Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.MeetSemiLattice Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.Lattice Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.BoundedJoinSemiLattice Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.BoundedMeetSemiLattice Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.BoundedLattice Algebra.LFST.Membership.GodelMembership instance Algebra.Lattice.JoinSemiLattice Algebra.LFST.Membership.GoguenMembership instance Algebra.Lattice.MeetSemiLattice Algebra.LFST.Membership.GoguenMembership instance Algebra.Lattice.Lattice Algebra.LFST.Membership.GoguenMembership instance Algebra.Lattice.BoundedJoinSemiLattice Algebra.LFST.Membership.GoguenMembership instance Algebra.Lattice.BoundedMeetSemiLattice Algebra.LFST.Membership.GoguenMembership instance Algebra.Lattice.BoundedLattice Algebra.LFST.Membership.GoguenMembership instance Algebra.Lattice.JoinSemiLattice Algebra.LFST.Membership.LukasiewiczMembership instance Algebra.Lattice.MeetSemiLattice Algebra.LFST.Membership.LukasiewiczMembership instance Algebra.Lattice.Lattice Algebra.LFST.Membership.LukasiewiczMembership instance Algebra.Lattice.BoundedJoinSemiLattice Algebra.LFST.Membership.LukasiewiczMembership instance Algebra.Lattice.BoundedMeetSemiLattice Algebra.LFST.Membership.LukasiewiczMembership instance Algebra.Lattice.BoundedLattice Algebra.LFST.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 Algebra.LFST.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 (Algebra.LFST.FuzzySet.FuzzySet m i) instance (GHC.Classes.Eq m, GHC.Classes.Eq i) => GHC.Classes.Eq (Algebra.LFST.FuzzySet.FuzzySet m i) instance (GHC.Classes.Ord i, Algebra.Lattice.BoundedLattice m, GHC.Show.Show i, GHC.Show.Show m) => GHC.Show.Show (Algebra.LFST.FuzzySet.FuzzySet m i) instance (Algebra.Lattice.BoundedLattice m, GHC.Classes.Eq m) => Algebra.LFST.FuzzySet.ExoFunctor (Algebra.LFST.FuzzySet.FuzzySet m) i