@Test public void testCreateRandomIndividual2() throws Exception { BoardPosList positions = new BoardPosList(new BoardPos[] { new BoardPos(2, 1), new BoardPos(2, 2), new BoardPos(3, 2), new BoardPos(4, 2) }); RectSize boardSize = new RectSize(5, 5); List<List<int[]>> ntuples = new NTuplesLocationsGeneralSupplier( new BoardPosList[] {positions}, boardSize, new RotationMirrorSymmetryExpander(boardSize)) .get(); Assert.assertEquals(1, ntuples.size()); Assert.assertEquals(8, ntuples.stream().mapToInt(List::size).sum()); }
@Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, true); for (BoardPosList positions : positionsList) { builder.addLocations(positions.toLocations(boardSize)); } return builder.build(); }
NTuplesLocationsGeneralSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, true); for (BoardPosList positions : positionsList) { builder.addLocations(positions.toLocations(boardSize)); } return builder.build(); } }
NTuplesLocationsGeneralSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, true); for (BoardPosList positions : positionsList) { builder.addLocations(positions.toLocations(boardSize)); } return builder.build(); } NTuplesLocationsGeneralSupplier(String patterns, RectSize boardSize,
			SymmetryExpander symmetryExpander);   NTuplesLocationsGeneralSupplier(BoardPosList[] positionsList, RectSize boardSize,
			SymmetryExpander expander); private  NTuplesLocationsGeneralSupplier(String[] shapes, RectSize boardSize, SymmetryExpander symmetryExpander); }
NTuplesLocationsGeneralSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, true); for (BoardPosList positions : positionsList) { builder.addLocations(positions.toLocations(boardSize)); } return builder.build(); } NTuplesLocationsGeneralSupplier(String patterns, RectSize boardSize,
			SymmetryExpander symmetryExpander);   NTuplesLocationsGeneralSupplier(BoardPosList[] positionsList, RectSize boardSize,
			SymmetryExpander expander); private  NTuplesLocationsGeneralSupplier(String[] shapes, RectSize boardSize, SymmetryExpander symmetryExpander); @Override List<List<int[]>> get(); @Override String toString(); }
NTuplesLocationsGeneralSupplier implements Supplier<List<List<int[]>>> { @Override public List<List<int[]>> get() { NTuplesLocationsBuilder builder = new NTuplesLocationsBuilder(expander, true); for (BoardPosList positions : positionsList) { builder.addLocations(positions.toLocations(boardSize)); } return builder.build(); } NTuplesLocationsGeneralSupplier(String patterns, RectSize boardSize,
			SymmetryExpander symmetryExpander);   NTuplesLocationsGeneralSupplier(BoardPosList[] positionsList, RectSize boardSize,
			SymmetryExpander expander); private  NTuplesLocationsGeneralSupplier(String[] shapes, RectSize boardSize, SymmetryExpander symmetryExpander); @Override List<List<int[]>> get(); @Override String toString();  }