@Test public void testCreateRandomIndividualChar() throws Exception { String[] matrix = new String[] { "1", "11", }; List<List<int[]>> ntuples = new NTuplesLocationsGeneralSystematicSupplier( new BoardPosList(matrix), new RectSize(4, 5), new IdentitySymmetryExpander(), true).get(); Assert.assertEquals(12, ntuples.stream().mapToInt(List::size).sum()); }
@Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, removeSubtuples); for (BoardPosList positions : positionsList) for (int r = 0; r < boardSize.rows(); ++r) for (int c = 0; c < boardSize.columns(); ++c) { BoardPosList nextPositions = positions.getAligned().getShifted(r, c); if (nextPositions.fitOnBoard(boardSize)) { builder.addLocations(nextPositions.toLocations(boardSize)); } } return builder.build(); }
NTuplesLocationsGeneralSystematicSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, removeSubtuples); for (BoardPosList positions : positionsList) for (int r = 0; r < boardSize.rows(); ++r) for (int c = 0; c < boardSize.columns(); ++c) { BoardPosList nextPositions = positions.getAligned().getShifted(r, c); if (nextPositions.fitOnBoard(boardSize)) { builder.addLocations(nextPositions.toLocations(boardSize)); } } return builder.build(); } }
NTuplesLocationsGeneralSystematicSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, removeSubtuples); for (BoardPosList positions : positionsList) for (int r = 0; r < boardSize.rows(); ++r) for (int c = 0; c < boardSize.columns(); ++c) { BoardPosList nextPositions = positions.getAligned().getShifted(r, c); if (nextPositions.fitOnBoard(boardSize)) { builder.addLocations(nextPositions.toLocations(boardSize)); } } return builder.build(); } NTuplesLocationsGeneralSystematicSupplier(String patterns, RectSize boardSize,
			SymmetryExpander symmetryExpander, boolean removeSubtuples);   NTuplesLocationsGeneralSystematicSupplier(BoardPosList[] positionsList, RectSize boardSize,
			SymmetryExpander expander, boolean removeSubtuples);   NTuplesLocationsGeneralSystematicSupplier(BoardPosList positions, RectSize boardSize, SymmetryExpander expander,
			boolean removeSubtuples); private  NTuplesLocationsGeneralSystematicSupplier(String[] shapes, RectSize boardSize,
			SymmetryExpander symmetryExpander, boolean removeSubtuples); }
NTuplesLocationsGeneralSystematicSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, removeSubtuples); for (BoardPosList positions : positionsList) for (int r = 0; r < boardSize.rows(); ++r) for (int c = 0; c < boardSize.columns(); ++c) { BoardPosList nextPositions = positions.getAligned().getShifted(r, c); if (nextPositions.fitOnBoard(boardSize)) { builder.addLocations(nextPositions.toLocations(boardSize)); } } return builder.build(); } NTuplesLocationsGeneralSystematicSupplier(String patterns, RectSize boardSize,
			SymmetryExpander symmetryExpander, boolean removeSubtuples);   NTuplesLocationsGeneralSystematicSupplier(BoardPosList[] positionsList, RectSize boardSize,
			SymmetryExpander expander, boolean removeSubtuples);   NTuplesLocationsGeneralSystematicSupplier(BoardPosList positions, RectSize boardSize, SymmetryExpander expander,
			boolean removeSubtuples); private  NTuplesLocationsGeneralSystematicSupplier(String[] shapes, RectSize boardSize,
			SymmetryExpander symmetryExpander, boolean removeSubtuples); @Override List<List<int[]>> get(); @Override String toString(); }
NTuplesLocationsGeneralSystematicSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, removeSubtuples); for (BoardPosList positions : positionsList) for (int r = 0; r < boardSize.rows(); ++r) for (int c = 0; c < boardSize.columns(); ++c) { BoardPosList nextPositions = positions.getAligned().getShifted(r, c); if (nextPositions.fitOnBoard(boardSize)) { builder.addLocations(nextPositions.toLocations(boardSize)); } } return builder.build(); } NTuplesLocationsGeneralSystematicSupplier(String patterns, RectSize boardSize,
			SymmetryExpander symmetryExpander, boolean removeSubtuples);   NTuplesLocationsGeneralSystematicSupplier(BoardPosList[] positionsList, RectSize boardSize,
			SymmetryExpander expander, boolean removeSubtuples);   NTuplesLocationsGeneralSystematicSupplier(BoardPosList positions, RectSize boardSize, SymmetryExpander expander,
			boolean removeSubtuples); private  NTuplesLocationsGeneralSystematicSupplier(String[] shapes, RectSize boardSize,
			SymmetryExpander symmetryExpander, boolean removeSubtuples); @Override List<List<int[]>> get(); @Override String toString();  }