Expand description
§odis — Formal Concept Analysis in Rust
odis is a library for Formal Concept Analysis.
It operates on formal contexts (objects × attributes incidence tables) and provides
concept enumeration, implication bases, lattice drawing, and attribute exploration.
§Quick start
use odis::{FormalContext, algorithms::NextClosure};
use odis::traits::ConceptEnumerator;
// Burmeister (.cxt) format: 2 objects, 2 attributes
let bytes = b"B\n\n2\n2\n\nbird\nfish\nflies\nlives_in_water\nX.\n.X\n";
let ctx = FormalContext::<String>::from(bytes).unwrap();
let concepts: Vec<_> = NextClosure.enumerate_concepts(&ctx).collect();
assert_eq!(concepts.len(), 4); // ∅, {bird}, {fish}, {bird, fish}§Modules
algorithms— Concept enumeration, implication bases, lattice drawing, explorationtraits— Extension traits:traits::ConceptEnumerator,traits::DrawingAlgorithm,traits::ImplicationEngine,traits::IcebergConceptEnumerator
§Key types
FormalContext— objects, attributes, incidence relationLattice/Poset— concept lattice and partially ordered setDrawing— 2-D coordinate output from a layout algorithmIcebergLattice— concept lattice filtered by minimum support
Re-exports§
pub use traits::ConceptEnumerator;pub use traits::DrawingAlgorithm;pub use traits::IcebergConceptEnumerator;pub use traits::ImplicationEngine;
Modules§
- algorithms
- Algorithms for Formal Concept Analysis.
- traits
- Traits for the algorithm types in
crate::algorithms.
Structs§
- DiNode
- A node in a directed graph.
- Digraph
- A directed graph.
- Drawing
- A positional layout: maps each node (by Vec index) to a 2D coordinate.
- Formal
Context - Formal context: a set of objects, a set of attributes, and a binary incidence
relation. Operations (extent, intent, closure) are available in labelled form
(on
Tvalues) and index-based form (onbit_set::BitSetindices). - Iceberg
Lattice - An iceberg concept lattice: a concept lattice restricted to concepts whose extent size (support) meets a minimum threshold.
- Lattice
- A complete lattice: a poset with a unique top (⊤) and bottom (⊥) element, closed under binary join (∨) and meet (∧).
- Poset
- A partially ordered set (poset).
Enums§
- Format
Error - Error returned when parsing a formal context from bytes fails.
- Poset
Error - Error returned when constructing a
Posetfrom invalid input.