Context { public static <G extends Relatable<?>> Context downset(final CompleteLattice lattice) { List<Object> elements = Arrays.asList(lattice.toArray()); return new Context(elements, elements, new NotGreaterOrEqual()); } private  Context(final List<G> objects,
                    final List<M> attributes,
                    final BinaryRelation relation); static Builder builder(); CrossTable asCrossTable(); ConceptLattice asConceptLattice(final Graph graph); static Context down(final CompleteLattice lattice); static Context downset(final CompleteLattice lattice); static Context powerset(final List<G> set); static Context antichain(final List<G> set); static List<Long> indexes(final MutableBitSet bits); List<G> getObjects(); List<M> getAttributes(); BinaryRelation getRelation(); List decodeExtent(final Concept concept); List decodeIntent(final Concept concept); @Override String toString();  }
@Test public void testDownset() { ConceptLattice powerset = Context.powerset(ABC).asConceptLattice(new TinkerGraph()); Context downset = Context.downset(powerset); assertEquals(downset.getObjects().size(), 8); assertEquals(downset.getAttributes().size(), 8); assertTrue(downset.getRelation() instanceof NotGreaterOrEqual); ConceptLattice lattice = downset.asConceptLattice(new TinkerGraph()); assertEquals(lattice.size(), 20); assertEquals(lattice.top(), new Concept(bits(), bits(0, 1, 2, 3, 4, 5, 6, 7))); assertEquals(lattice.bottom(), new Concept(bits(0, 1, 2, 3, 4, 5, 6, 7), bits())); }