CrossTable implements Iterable<CrossTable.Row> { public static CrossTable horizontalSum(final CrossTable that, final CrossTable other) { checkNotNull(that, other); CrossTable sum = new CrossTable(that, other.getNumberOfColumns()); for(int i = 0; i < other.nrow; i++) { MutableBitSet bits = new MutableBitSet(that.ncol + other.ncol); MutableBitSet intent = other.getRow(i).intent; for(long j = intent.nextSetBit(0); j >= 0; j = intent.nextSetBit(j + 1)) { bits.set(that.ncol + j); } sum.addRow(bits); } return sum; } CrossTable();  CrossTable(final CrossTable that);  CrossTable(final CrossTable that, long plus); static CrossTable fromContext(final Context<G, M> context); long getNumberOfRows(); long getNumberOfColumns(); void addRow(final MutableBitSet bits); Row getRow(int index); static CrossTable complement(final CrossTable that); static CrossTable horizontalSum(final CrossTable that,
                                           final CrossTable other); static CrossTable verticalSum(final CrossTable that,
                                         final CrossTable other); static CrossTable directProduct(final CrossTable that,
                                           final CrossTable other); Decomposition parallelDecomposition(); Decomposition seriesDecomposition(); ConceptLattice asConceptLattice(final Graph graph); @Override Iterator<Row> iterator(); @Override String toString(); @Override boolean equals(final Object right);  }
@Test public void testHorizontalSum() { CrossTable sum = CrossTable.horizontalSum(table, other); assertEquals(sum.getNumberOfRows(), 6); assertEquals(sum.getNumberOfColumns(), 6); assertEquals(sum.getRow(0).intent, bits(1, 2)); assertEquals(sum.getRow(3).intent, bits(4, 5)); assertEquals(sum.getRow(5).intent, bits()); }