Search in sources :

Example 6 with MinoFields

use of searcher.pack.mino_fields.MinoFields 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);
}
Also used : RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) MinoFields(searcher.pack.mino_fields.MinoFields) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) BasicSolutions(searcher.pack.calculator.BasicSolutions) Test(org.junit.jupiter.api.Test)

Example 7 with MinoFields

use of searcher.pack.mino_fields.MinoFields 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);
}
Also used : RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) MinoFields(searcher.pack.mino_fields.MinoFields) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) BasicSolutions(searcher.pack.calculator.BasicSolutions) Test(org.junit.jupiter.api.Test)

Example 8 with MinoFields

use of searcher.pack.mino_fields.MinoFields 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);
}
Also used : RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) MinoFields(searcher.pack.mino_fields.MinoFields) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) BasicSolutions(searcher.pack.calculator.BasicSolutions) Test(org.junit.jupiter.api.Test)

Example 9 with MinoFields

use of searcher.pack.mino_fields.MinoFields in project solution-finder by knewjade.

the class MappedBasicSolutionsTest method get3x3.

@Test
void get3x3() throws Exception {
    SizedBit sizedBit = new SizedBit(3, 3);
    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(278L);
}
Also used : RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) MinoFields(searcher.pack.mino_fields.MinoFields) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) RecursiveMinoFields(searcher.pack.mino_fields.RecursiveMinoFields) BasicSolutions(searcher.pack.calculator.BasicSolutions) Test(org.junit.jupiter.api.Test)

Aggregations

SizedBit (searcher.pack.SizedBit)9 MinoFields (searcher.pack.mino_fields.MinoFields)9 ColumnField (core.column_field.ColumnField)7 Test (org.junit.jupiter.api.Test)6 SeparableMinos (searcher.pack.SeparableMinos)6 BasicSolutions (searcher.pack.calculator.BasicSolutions)6 RecursiveMinoFields (searcher.pack.mino_fields.RecursiveMinoFields)6 MinoFieldMemento (searcher.pack.memento.MinoFieldMemento)3 ColumnFieldFactory (core.column_field.ColumnFieldFactory)1 ColumnSmallField (core.column_field.ColumnSmallField)1 Stream (java.util.stream.Stream)1 InOutPairField (searcher.pack.InOutPairField)1 SolutionFilter (searcher.pack.memento.SolutionFilter)1