use of core.column_field.ColumnField in project solution-finder by knewjade.
the class FilterOnDemandBasicSolutions method addColumnSmallField.
private RecursiveMinoFields addColumnSmallField(ColumnField basicField) {
Field wallField = createWallField(basicField);
ColumnSmallField initOuterField = ColumnFieldFactory.createField();
RecursiveMinoFields recursiveMinoFields = calculate(basicField, initOuterField, wallField);
return new FilteredRecursiveMinoFields(recursiveMinoFields, solutionFilter);
}
use of core.column_field.ColumnField in project solution-finder by knewjade.
the class MinoPackingTaskWidthForWidth2 method createTask.
private PackingTask createTask(PackSearcher searcher, long innerFieldBoard, MinoFieldMemento memento, int index) {
long fillBoard = searcher.getSizedBit().getFillBoard();
ColumnSmallField over = ColumnFieldFactory.createField(innerFieldBoard & ~fillBoard);
ColumnField outerField = searcher.getInOutPairFields().get(index).getOuterField();
if (over.canMerge(outerField)) {
over.merge(outerField);
ColumnSmallField innerField = ColumnFieldFactory.createField(innerFieldBoard & fillBoard);
return new MinoPackingTaskWidthForWidth2(searcher, innerField, over, memento, index);
}
return EMPTY_TASK;
}
use of core.column_field.ColumnField in project solution-finder by knewjade.
the class MinoPackingTaskWidthForWidth2 method split.
private PackingTask split(MinoField minoField) {
ColumnField minoOuterField = minoField.getOuterField();
// 注目範囲外outerで重なりがないか確認
if (outerField.canMerge(minoOuterField)) {
// 有効なおきかた
SizedBit sizedBit = searcher.getSizedBit();
ColumnField mergedOuterField = outerField.freeze(sizedBit.getHeight());
mergedOuterField.merge(minoOuterField);
long innerFieldBoard = mergedOuterField.getBoard(0) >> sizedBit.getMaxBitDigit();
MinoFieldMemento nextMemento = memento.concat(minoField);
return checkAndCreateTask(innerFieldBoard, nextMemento, index + 1);
}
return EMPTY_TASK;
}
use of core.column_field.ColumnField in project solution-finder by knewjade.
the class MinoPackingTaskWidthForWidth2 method splitAndFixResult.
private Stream<Result> splitAndFixResult(MinoField minoField) {
ColumnField minoOuterField = minoField.getOuterField();
// 注目範囲外outerで重なりがないか確認
if (outerField.canMerge(minoOuterField)) {
// 有効なおきかた
SizedBit sizedBit = searcher.getSizedBit();
ColumnField mergedOuterField = outerField.freeze(searcher.getSizedBit().getHeight());
mergedOuterField.merge(minoOuterField);
long innerFieldBoard = mergedOuterField.getBoard(0) >> sizedBit.getMaxBitDigit();
MinoFieldMemento nextMemento = memento.concat(minoField);
return searcher.getTaskResultHelper().fixResult(searcher, innerFieldBoard, nextMemento);
}
return Stream.empty();
}
use of core.column_field.ColumnField in project solution-finder by knewjade.
the class MinoPackingTaskWidthForWidth3 method split.
private PackingTask split(MinoField minoField) {
ColumnField outerField = searcher.getInOutPairFields().get(index).getOuterField();
ColumnField minoOuterField = minoField.getOuterField();
// 注目範囲外outerで重なりがないか確認
if (outerField.canMerge(minoOuterField)) {
// 有効なおきかた
SizedBit sizedBit = searcher.getSizedBit();
ColumnField mergedOuterField = outerField.freeze(sizedBit.getHeight());
mergedOuterField.merge(minoOuterField);
ColumnSmallField nextInnerField = ColumnFieldFactory.createField(mergedOuterField.getBoard(0) >> sizedBit.getMaxBitDigit());
MinoFieldMemento nextMemento = memento.concat(minoField);
return checkAndCreateTask(nextInnerField, nextMemento, index + 1);
}
return EMPTY_TASK;
}
Aggregations