src/main/java/org/thegalactic/lattice/ConceptLattice.java
public static ConceptLattice completeLattice(ClosureSystem init) {
        ConceptLattice lattice = new ConceptLattice();
        // compute all the closed set with allClosures
        Vector<Concept> allclosure = init.allClosures();
        for (Concept cl : allclosure) {
            lattice.addNode(cl);
        }

        // an edge corresponds to an inclusion between two closed sets
        for (Object source : lattice.getNodes()) {
            for (Object target : lattice.getNodes()) {
                if (((Concept) target).containsAllInA(((Concept) source).getSetA())) {
                    lattice.addEdge((Node) source, (Node) target);
                }
            }
        }
        // Hasse diagram is computed
        return lattice;
    }
/**
     * Generates and returns the complete (i.e. transitively closed) closed set
     * lattice of the specified closure system, that can be an implicational
     * system (ImplicationalSystem) or a context.
     *
     * The lattice is generated using the well-known Next Closure algorithm. All
     * closures are first generated using the method:
     * {@link ClosureSystem#allClosures} that implements the well-known Next
     * Closure algorithm. Then, all concepts are ordered by inclusion.
     *
     * @param init a closure system (an ImplicationalSystem or a Context)
     *
     * @return a concept lattice
     */
Generates and returns the complete  closed set
lattice of the specified closure system, that can be an implicational
system (ImplicationalSystem) or a context.

The lattice is generated using the well-known Next Closure algorithm. All
closures are first generated using the method:
ClosureSystem#allClosures that implements the well-known Next
Closure algorithm. Then, all concepts are ordered by inclusion.

@param init a closure system (an ImplicationalSystem or a Context)

@return a concept lattice
Generates and returns the complete closed set lattice of the specified closure system that can be an implicational system ( ImplicationalSystem ) or a context . The lattice is generated using the well - known Next Closure algorithm . All closures are first generated using the method : ClosureSystem#allClosures that implements the well - known Next Closure algorithm . Then all concepts are ordered by inclusion . @param init a closure system ( an ImplicationalSystem or a Context ) @return a concept lattice
public static ConceptLattice completeLattice(ClosureSystem init) {
        ConceptLattice lattice = new ConceptLattice();
        Vector<Concept> allclosure = init.allClosures();
        for (Concept cl : allclosure) {
            lattice.addNode(cl);
        }
        for (Object source : lattice.getNodes()) {
            for (Object target : lattice.getNodes()) {
                if (((Concept) target).containsAllInA(((Concept) source).getSetA())) {
                    lattice.addEdge((Node) source, (Node) target);
                }
            }
        }
        return lattice;
    }
public static ConceptLattice completeLattice ( ClosureSystem init ) { ConceptLattice lattice = new ConceptLattice ( ) ; Vector < Concept > allclosure = init . allClosures ( ) ; for ( Concept cl : allclosure ) { lattice . addNode ( cl ) ; } for ( Object source : lattice . getNodes ( ) ) { for ( Object target : lattice . getNodes ( ) ) { if ( ( ( Concept ) target ) . containsAllInA ( ( ( Concept ) source ) . getSetA ( ) ) ) { lattice . addEdge ( ( Node ) source , ( Node ) target ) ; } } } return lattice ; }
Generates and returns the complete (i.e.
Generates and returns the complete ( i . e .
// compute all the closed set with allClosures // an edge corresponds to an inclusion between two closed sets // Hasse diagram is computed