Search in sources :

Example 1 with MinoField

use of searcher.pack.mino_field.MinoField in project solution-finder by knewjade.

the class OnDemandBasicSolutionsTest method get3x5.

@Test
void get3x5() throws Exception {
    assertTimeout(ofMinutes(1), () -> {
        SizedBit sizedBit = new SizedBit(3, 5);
        SeparableMinos separableMinos = createSeparableMinos(sizedBit);
        Predicate<ColumnField> memorizedPredicate = columnField -> true;
        OnDemandBasicSolutions solutions = new OnDemandBasicSolutions(separableMinos, sizedBit, memorizedPredicate);
        Stream<? extends MinoField> stream = solutions.parse(ColumnFieldFactory.createField()).stream();
        assertThat(stream.count()).isEqualTo(260179L);
    });
}
Also used : MinoShifter(core.mino.MinoShifter) Predicate(java.util.function.Predicate) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ColumnField(core.column_field.ColumnField) Duration.ofSeconds(java.time.Duration.ofSeconds) ColumnFieldFactory(core.column_field.ColumnFieldFactory) Test(org.junit.jupiter.api.Test) SizedBit(searcher.pack.SizedBit) Stream(java.util.stream.Stream) MinoFactory(core.mino.MinoFactory) SeparableMinos(searcher.pack.SeparableMinos) Duration.ofMinutes(java.time.Duration.ofMinutes) MinoField(searcher.pack.mino_field.MinoField) Assertions.assertTimeout(org.junit.jupiter.api.Assertions.assertTimeout) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) Test(org.junit.jupiter.api.Test)

Example 2 with MinoField

use of searcher.pack.mino_field.MinoField in project solution-finder by knewjade.

the class OnDemandBasicSolutionsTest method get2x5.

@Test
void get2x5() throws Exception {
    SizedBit sizedBit = new SizedBit(2, 5);
    SeparableMinos separableMinos = createSeparableMinos(sizedBit);
    Predicate<ColumnField> memorizedPredicate = columnField -> true;
    OnDemandBasicSolutions solutions = new OnDemandBasicSolutions(separableMinos, sizedBit, memorizedPredicate);
    Stream<? extends MinoField> stream = solutions.parse(ColumnFieldFactory.createField()).stream();
    assertThat(stream.count()).isEqualTo(19375L);
}
Also used : MinoShifter(core.mino.MinoShifter) Predicate(java.util.function.Predicate) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ColumnField(core.column_field.ColumnField) Duration.ofSeconds(java.time.Duration.ofSeconds) ColumnFieldFactory(core.column_field.ColumnFieldFactory) Test(org.junit.jupiter.api.Test) SizedBit(searcher.pack.SizedBit) Stream(java.util.stream.Stream) MinoFactory(core.mino.MinoFactory) SeparableMinos(searcher.pack.SeparableMinos) Duration.ofMinutes(java.time.Duration.ofMinutes) MinoField(searcher.pack.mino_field.MinoField) Assertions.assertTimeout(org.junit.jupiter.api.Assertions.assertTimeout) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) Test(org.junit.jupiter.api.Test)

Example 3 with MinoField

use of searcher.pack.mino_field.MinoField in project solution-finder by knewjade.

the class OnDemandBasicSolutionsTest method get2x3.

@Test
void get2x3() throws Exception {
    SizedBit sizedBit = new SizedBit(2, 3);
    SeparableMinos separableMinos = createSeparableMinos(sizedBit);
    Predicate<ColumnField> memorizedPredicate = columnField -> true;
    OnDemandBasicSolutions solutions = new OnDemandBasicSolutions(separableMinos, sizedBit, memorizedPredicate);
    Stream<? extends MinoField> stream = solutions.parse(ColumnFieldFactory.createField()).stream();
    assertThat(stream.count()).isEqualTo(78L);
}
Also used : MinoShifter(core.mino.MinoShifter) Predicate(java.util.function.Predicate) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ColumnField(core.column_field.ColumnField) Duration.ofSeconds(java.time.Duration.ofSeconds) ColumnFieldFactory(core.column_field.ColumnFieldFactory) Test(org.junit.jupiter.api.Test) SizedBit(searcher.pack.SizedBit) Stream(java.util.stream.Stream) MinoFactory(core.mino.MinoFactory) SeparableMinos(searcher.pack.SeparableMinos) Duration.ofMinutes(java.time.Duration.ofMinutes) MinoField(searcher.pack.mino_field.MinoField) Assertions.assertTimeout(org.junit.jupiter.api.Assertions.assertTimeout) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) Test(org.junit.jupiter.api.Test)

Example 4 with MinoField

use of searcher.pack.mino_field.MinoField in project solution-finder by knewjade.

the class OnDemandBasicSolutionsTest method get3x4.

@Test
void get3x4() throws Exception {
    SizedBit sizedBit = new SizedBit(3, 4);
    SeparableMinos separableMinos = createSeparableMinos(sizedBit);
    Predicate<ColumnField> memorizedPredicate = columnField -> true;
    OnDemandBasicSolutions solutions = new OnDemandBasicSolutions(separableMinos, sizedBit, memorizedPredicate);
    Stream<? extends MinoField> stream = solutions.parse(ColumnFieldFactory.createField()).stream();
    assertThat(stream.count()).isEqualTo(8516L);
}
Also used : MinoShifter(core.mino.MinoShifter) Predicate(java.util.function.Predicate) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ColumnField(core.column_field.ColumnField) Duration.ofSeconds(java.time.Duration.ofSeconds) ColumnFieldFactory(core.column_field.ColumnFieldFactory) Test(org.junit.jupiter.api.Test) SizedBit(searcher.pack.SizedBit) Stream(java.util.stream.Stream) MinoFactory(core.mino.MinoFactory) SeparableMinos(searcher.pack.SeparableMinos) Duration.ofMinutes(java.time.Duration.ofMinutes) MinoField(searcher.pack.mino_field.MinoField) Assertions.assertTimeout(org.junit.jupiter.api.Assertions.assertTimeout) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) Test(org.junit.jupiter.api.Test)

Example 5 with MinoField

use of searcher.pack.mino_field.MinoField in project solution-finder by knewjade.

the class OnDemandBasicSolutionsTest method get3x3.

@Test
void get3x3() throws Exception {
    SizedBit sizedBit = new SizedBit(3, 3);
    SeparableMinos separableMinos = createSeparableMinos(sizedBit);
    Predicate<ColumnField> memorizedPredicate = columnField -> true;
    OnDemandBasicSolutions solutions = new OnDemandBasicSolutions(separableMinos, sizedBit, memorizedPredicate);
    Stream<? extends MinoField> stream = solutions.parse(ColumnFieldFactory.createField()).stream();
    assertThat(stream.count()).isEqualTo(278L);
}
Also used : MinoShifter(core.mino.MinoShifter) Predicate(java.util.function.Predicate) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ColumnField(core.column_field.ColumnField) Duration.ofSeconds(java.time.Duration.ofSeconds) ColumnFieldFactory(core.column_field.ColumnFieldFactory) Test(org.junit.jupiter.api.Test) SizedBit(searcher.pack.SizedBit) Stream(java.util.stream.Stream) MinoFactory(core.mino.MinoFactory) SeparableMinos(searcher.pack.SeparableMinos) Duration.ofMinutes(java.time.Duration.ofMinutes) MinoField(searcher.pack.mino_field.MinoField) Assertions.assertTimeout(org.junit.jupiter.api.Assertions.assertTimeout) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) Test(org.junit.jupiter.api.Test)

Aggregations

ColumnField (core.column_field.ColumnField)6 ColumnFieldFactory (core.column_field.ColumnFieldFactory)6 MinoFactory (core.mino.MinoFactory)6 MinoShifter (core.mino.MinoShifter)6 Duration.ofMinutes (java.time.Duration.ofMinutes)6 Duration.ofSeconds (java.time.Duration.ofSeconds)6 Predicate (java.util.function.Predicate)6 Stream (java.util.stream.Stream)6 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)6 Assertions.assertTimeout (org.junit.jupiter.api.Assertions.assertTimeout)6 Test (org.junit.jupiter.api.Test)6 SeparableMinos (searcher.pack.SeparableMinos)6 SizedBit (searcher.pack.SizedBit)6 MinoField (searcher.pack.mino_field.MinoField)6