Search in sources :

Example 61 with ColumnField

use of core.column_field.ColumnField in project solution-finder by knewjade.

the class PackSearcherTest method createFilterOnDemandBasicSolutions.

private BasicSolutions createFilterOnDemandBasicSolutions(SizedBit sizedBit, ColumnSmallField field, SolutionFilter solutionFilter) {
    SeparableMinos separableMinos = SeparableMinos.createSeparableMinos(minoFactory, minoShifter, sizedBit);
    Predicate<ColumnField> memorizedPredicate = BasicSolutions.createBitCountPredicate(1);
    return new FilterOnDemandBasicSolutions(separableMinos, sizedBit, field, memorizedPredicate, solutionFilter);
}
Also used : SeparableMinos(searcher.pack.SeparableMinos) ColumnField(core.column_field.ColumnField) FilterOnDemandBasicSolutions(searcher.pack.solutions.FilterOnDemandBasicSolutions)

Example 62 with ColumnField

use of core.column_field.ColumnField in project solution-finder by knewjade.

the class PathEntryPoint method calculateBasicSolutions.

private BasicSolutions calculateBasicSolutions(Field field, MinoFactory minoFactory, MinoShifter minoShifter, SizedBit sizedBit, SolutionFilter solutionFilter) throws FinderInitializeException {
    // ミノのリストを作成する
    SeparableMinos separableMinos = SeparableMinos.createSeparableMinos(minoFactory, minoShifter, sizedBit);
    // 基本パターンを計算
    int cachedMinBit = settings.getCachedMinBit();
    Predicate<ColumnField> predicate = createPredicate(cachedMinBit);
    ColumnSmallField maxOuterBoard = InOutPairField.createMaxOuterBoard(sizedBit, field);
    return new FilterOnDemandBasicSolutions(separableMinos, sizedBit, maxOuterBoard, predicate, solutionFilter);
}
Also used : ColumnSmallField(core.column_field.ColumnSmallField) SeparableMinos(searcher.pack.SeparableMinos) ColumnField(core.column_field.ColumnField) EntryPoint(entry.EntryPoint) FilterOnDemandBasicSolutions(searcher.pack.solutions.FilterOnDemandBasicSolutions)

Aggregations

ColumnField (core.column_field.ColumnField)62 SeparableMinos (searcher.pack.SeparableMinos)33 SizedBit (searcher.pack.SizedBit)26 Field (core.field.Field)19 Test (org.junit.jupiter.api.Test)19 MinoFieldMemento (searcher.pack.memento.MinoFieldMemento)17 MinoFactory (core.mino.MinoFactory)14 MinoShifter (core.mino.MinoShifter)14 ForkJoinPool (java.util.concurrent.ForkJoinPool)12 Predicate (java.util.function.Predicate)12 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)12 RecursiveMinoFields (searcher.pack.mino_fields.RecursiveMinoFields)12 SeparableMino (searcher.pack.separable_mino.SeparableMino)12 Stream (java.util.stream.Stream)11 ColumnSmallField (core.column_field.ColumnSmallField)10 InOutPairField (searcher.pack.InOutPairField)10 OnDemandBasicSolutions (searcher.pack.solutions.OnDemandBasicSolutions)10 BasicSolutions (searcher.pack.calculator.BasicSolutions)9 SolutionFilter (searcher.pack.memento.SolutionFilter)9 Piece (core.mino.Piece)7