fuzzySets-1.0.0: Library for constructing and manipulating fuzzy sets and fuzzy relations.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fuzzy.Relations.Properties

Description

This module contains functions that determine degree of properties of a LRelation

Synopsis

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

Expand
>>> 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 rel
1.0
>>> let rel = LRelation (\(x, y) -> bot) u :: LRelation Int UIGodel
>>> ref rel
0.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

Expand
>>> let u = [(1, 2), (2, 1), (2, 3), (3, 2)]
>>> let rel = LRelation (const  0.5) u :: LRelation Int UILukasiewicz
>>> sym rel
1.0
>>> let rel = LRelation (\(x, y) -> if x < y then 0.7 else 0.3) u :: LRelation Int UILukasiewicz
>>> sym rel
0.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

Expand
>>> 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 rel
1.0
>>> let rel = LRelation (\(x, y) -> if x == y then 0.2 else 0.7) u :: LRelation Int UILukasiewicz
>>> tra rel
0.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

Expand
>>> 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 rel
1.0
>>> let rel = LRelation (\(x, y) -> if x == y then 0.7 else bot) u :: LRelation Int UILukasiewicz
>>> irref rel
0.3

asym :: (Eq a, ResiduatedLattice l) => LRelation a l -> l Source #

Degree to which LRelation is asymmetric.

An LRelation is asymmetric if \(asym \: rel =\) top

Examples

Expand
>>> let u = [(1, 2), (2, 3), (3, 1)]
>>> let rel = LRelation (\(x, y) -> if x < y then 0.7 else bot) u :: LRelation Int UILukasiewicz
>>> asym rel
1.0