Skip to content

Commit ae14a6e

Browse files
committed
Simple descriptions: only filter CONTAINER inputs
These are matched as outputs so we don't want to count them when comparing input parameters. However, MUTABLE inputs *are* matched as inputs, so we don't want to exclude them. Closes #181
1 parent 1171aef commit ae14a6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/simplify/SimplifiedOpDescriptionGenerator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.scijava.ops.engine.matcher.reduce.ReducedOpInfo;
4343
import org.scijava.ops.engine.util.Infos;
4444
import org.scijava.priority.Priority;
45+
import org.scijava.struct.ItemIO;
4546

4647
/**
4748
* An {@link OpDescriptionGenerator} implementation which makes use of
@@ -154,8 +155,9 @@ private List<OpInfo> filterInfos(Iterable<? extends OpInfo> infos,
154155
continue;
155156
}
156157

158+
// Container types are matched as outputs in OpRequests
157159
var numPureInputs = info.inputs().stream() //
158-
.filter(m -> !m.isOutput()) //
160+
.filter(m -> !ItemIO.CONTAINER.equals(m.getIOType())) //
159161
.count();
160162

161163
if (req.getArgs() == null || req.getArgs().length == numPureInputs) {

0 commit comments

Comments
 (0)