| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Fuzzy.Relations.Properties
Description
This module contains functions that determine degree of properties of a LRelation
Synopsis
- ref :: (Eq a, ResiduatedLattice l) => LRelation a l -> l
- sym :: (Eq a, ResiduatedLattice l) => LRelation a l -> l
- tra :: (Eq a, ResiduatedLattice l) => LRelation a l -> l
- irref :: (Eq a, ResiduatedLattice l) => LRelation a l -> l
- asym :: (Eq a, ResiduatedLattice l) => LRelation a l -> l
Documentation
ref :: (Eq a, ResiduatedLattice l) => LRelation a l -> l Source #
Degree to which LRelation is reflexive.
An LRelation is reflexive if \(ref \: rel =\) top
Examples
>>>let u = [(1, 1), (2, 2), (3, 3)]>>>let rel = LRelation (\(x, y) -> if x == y then top else bot) u :: LRelation Int UIGodel>>>ref rel1.0
>>>let rel = LRelation (\(x, y) -> bot) u :: LRelation Int UIGodel>>>ref rel0.0
sym :: (Eq a, ResiduatedLattice l) => LRelation a l -> l Source #
Degree to which LRelation is symmetric.
An LRelation is symmetric if \(sym \: rel =\) top
Examples
>>>let u = [(1, 2), (2, 1), (2, 3), (3, 2)]>>>let rel = LRelation (const 0.5) u :: LRelation Int UILukasiewicz>>>sym rel1.0
>>>let rel = LRelation (\(x, y) -> if x < y then 0.7 else 0.3) u :: LRelation Int UILukasiewicz>>>sym rel0.6
tra :: (Eq a, ResiduatedLattice l) => LRelation a l -> l Source #
Degree to which LRelation is transitive.
An LRelation is transitive if \(tra \: rel =\) top
Examples
>>>let u = [(1, 2), (2, 3), (1, 3)]>>>let rel = LRelation (\(x, y) -> if x < y then 0.7 else 0.3) u :: LRelation Int UILukasiewicz>>>tra rel1.0
>>>let rel = LRelation (\(x, y) -> if x == y then 0.2 else 0.7) u :: LRelation Int UILukasiewicz>>>tra rel0.5
irref :: (Eq a, ResiduatedLattice l) => LRelation a l -> l Source #
Degree to which LRelation is irreflexive.
An LRelation is irreflexive if \(irref \: rel =\) top
Examples
>>>let u = [(1, 1), (2, 2), (3, 3)]>>>let rel = LRelation (\(x, y) -> if x == y then bot else top) u :: LRelation Int UILukasiewicz>>>irref rel1.0
>>>let rel = LRelation (\(x, y) -> if x == y then 0.7 else bot) u :: LRelation Int UILukasiewicz>>>irref rel0.3
asym :: (Eq a, ResiduatedLattice l) => LRelation a l -> l Source #