UMinho Haskell Libraries (1.0)ContentsIndex
Data.Relation.FormalConceptAnalysis
Portability portable
Stability experimental
Maintainer joost.visser@di.uminho.pt
Contents
Representation
Basic operations
Predicates
Fast Concept Analysis by Christian Lindig
Printing concept lattices.
Description
An implementation of relations as sets of pairs.
Synopsis
type Context g m = Rel g m
type Concept g m = (Set g, Set m)
type ConceptLattice g m = Rel (Concept g m) (Concept g m)
extent :: Concept g m -> Set g
intent :: Concept g m -> Set m
extentFromIntent :: (Ord g, Ord m) => Context g m -> Set m -> Set g
intentFromExtent :: (Ord g, Ord m) => Context g m -> Set g -> Set m
conceptsFromIntent :: (Ord g, Ord m) => Context g m -> Set m -> [Concept g m]
conceptsFromExtent :: (Ord g, Ord m) => Context g m -> Set g -> [Concept g m]
dualConceptLattice :: (Ord g, Ord m) => ConceptLattice g m -> ConceptLattice m g
isConceptOf :: (Ord g, Ord m) => Concept g m -> Context g m -> Bool
conceptGT :: (Ord g, Ord m) => Concept g m -> Concept g m -> Bool
neighbors :: (Ord g, Ord m) => Set g -> Context g m -> [Concept g m]
lattice :: (Ord g, Ord m) => Context g m -> ConceptLattice g m
conceptDelta :: (Ord g, Ord m) => ConceptLattice g m -> Concept g m -> Concept g m
printConceptLattice :: (Ord g, Ord m) => (Set g -> String) -> (Set m -> String) -> ConceptLattice g m -> String
printConceptLatticeWith :: (Ord g, Ord m) => (Set g -> String) -> (Set m -> String) -> (Concept g m -> String) -> ConceptLattice g m -> String
sepWith :: a -> [a] -> [a]
Representation
type Context g m = Rel g m
type Concept g m = (Set g, Set m)
type ConceptLattice g m = Rel (Concept g m) (Concept g m)
extent :: Concept g m -> Set g
intent :: Concept g m -> Set m
Basic operations
extentFromIntent :: (Ord g, Ord m) => Context g m -> Set m -> Set g
Compute the extent of a concept from a given intent, given a formal context.
intentFromExtent :: (Ord g, Ord m) => Context g m -> Set g -> Set m
Compute the intent of a concept from a given extent, given a formal context.
conceptsFromIntent :: (Ord g, Ord m) => Context g m -> Set m -> [Concept g m]
conceptsFromExtent :: (Ord g, Ord m) => Context g m -> Set g -> [Concept g m]
From the extent of a given context, compute all concepts greater than that context.
dualConceptLattice :: (Ord g, Ord m) => ConceptLattice g m -> ConceptLattice m g
Produce the dual of a given lattice.
Predicates
isConceptOf :: (Ord g, Ord m) => Concept g m -> Context g m -> Bool
conceptGT :: (Ord g, Ord m) => Concept g m -> Concept g m -> Bool
Fast Concept Analysis by Christian Lindig
neighbors
:: (Ord g, Ord m)
=> Set gextent of concept
-> Context g mformal context
-> [Concept g m]list of neighbors
Compute the upper neighbors of a concept.
lattice
:: (Ord g, Ord m)
=> Context g mformal context
-> ConceptLattice g mcorresponding concept lattice
Computes the concept lattice of a given formal context.
Printing concept lattices.
conceptDelta :: (Ord g, Ord m) => ConceptLattice g m -> Concept g m -> Concept g m
Compute the difference between a concept and its immediate neighbors. Thus, the concept's extent is reduced to the objects that are not present among its lower neighbors, and and its intent is reduced to the attributes that are not present among its upper neighbors. Useful when displaying a concept lattice in condensed form.
printConceptLattice :: (Ord g, Ord m) => (Set g -> String) -> (Set m -> String) -> ConceptLattice g m -> String
Print a concept lattice as a dot graph.
printConceptLatticeWith :: (Ord g, Ord m) => (Set g -> String) -> (Set m -> String) -> (Concept g m -> String) -> ConceptLattice g m -> String
Print a concept lattice as a dot graph. Extra parameters for controlling the labels for concept nodes.
sepWith :: a -> [a] -> [a]
Produced by Haddock version 0.6