use of searcher.pack.mino_fields.RecursiveMinoFields in project solution-finder by knewjade.
the class BasicSolutionsCalculator method addColumnSmallField.
private void addColumnSmallField(ColumnSmallField basicField) {
Field wallField = createWallField(basicField);
ColumnSmallField initOuterField = ColumnFieldFactory.createField();
RecursiveMinoFields calculate = calculate(basicField, initOuterField, wallField);
resultsMap.put(basicField, calculate);
}
use of searcher.pack.mino_fields.RecursiveMinoFields in project solution-finder by knewjade.
the class EasyPath method createMappedBasicSolutions.
private BasicSolutions createMappedBasicSolutions(SizedBit sizedBit) {
SeparableMinos separableMinos = SeparableMinos.createSeparableMinos(minoFactory, minoShifter, sizedBit);
BasicSolutionsCalculator calculator = new BasicSolutionsCalculator(separableMinos, sizedBit);
Map<ColumnField, RecursiveMinoFields> calculate = calculator.calculate();
return new MappedBasicSolutions(calculate);
}
use of searcher.pack.mino_fields.RecursiveMinoFields in project solution-finder by knewjade.
the class MappedBasicSolutionsTest method get3x5.
@Test
void get3x5() throws Exception {
SizedBit sizedBit = new SizedBit(3, 5);
SeparableMinos separableMinos = createSeparableMinos(sizedBit);
BasicSolutionsCalculator calculator = new BasicSolutionsCalculator(separableMinos, sizedBit);
Map<ColumnField, RecursiveMinoFields> calculate = calculator.calculate();
BasicSolutions solutions = new MappedBasicSolutions(calculate);
MinoFields minoFields = solutions.parse(ColumnFieldFactory.createField());
Stream<? extends MinoField> stream = minoFields.stream();
assertThat(stream.count()).isEqualTo(260179L);
}
use of searcher.pack.mino_fields.RecursiveMinoFields in project solution-finder by knewjade.
the class MappedBasicSolutionsTest method get2x4.
@Test
void get2x4() throws Exception {
SizedBit sizedBit = new SizedBit(2, 4);
SeparableMinos separableMinos = createSeparableMinos(sizedBit);
BasicSolutionsCalculator calculator = new BasicSolutionsCalculator(separableMinos, sizedBit);
Map<ColumnField, RecursiveMinoFields> calculate = calculator.calculate();
BasicSolutions solutions = new MappedBasicSolutions(calculate);
MinoFields minoFields = solutions.parse(ColumnFieldFactory.createField());
Stream<? extends MinoField> stream = minoFields.stream();
assertThat(stream.count()).isEqualTo(1239L);
}
use of searcher.pack.mino_fields.RecursiveMinoFields in project solution-finder by knewjade.
the class MappedBasicSolutionsTest method get2x5.
@Test
void get2x5() throws Exception {
SizedBit sizedBit = new SizedBit(2, 5);
SeparableMinos separableMinos = createSeparableMinos(sizedBit);
BasicSolutionsCalculator calculator = new BasicSolutionsCalculator(separableMinos, sizedBit);
Map<ColumnField, RecursiveMinoFields> calculate = calculator.calculate();
BasicSolutions solutions = new MappedBasicSolutions(calculate);
MinoFields minoFields = solutions.parse(ColumnFieldFactory.createField());
Stream<? extends MinoField> stream = minoFields.stream();
assertThat(stream.count()).isEqualTo(19375L);
}
Aggregations