diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100644 index 000000000..d20bbdea7 --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +(cd scijava/scijava-taglets && mvn install) +curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/travis-build.sh +sh travis-build.sh $encrypted_844f7d2110b9_key $encrypted_844f7d2110b9_iv diff --git a/imagej/imagej-ops2/pom.xml b/imagej/imagej-ops2/pom.xml index 5066eb908..164064554 100644 --- a/imagej/imagej-ops2/pom.xml +++ b/imagej/imagej-ops2/pom.xml @@ -12,8 +12,8 @@ net.imagej imagej-ops2 - ImageJ Ops - ImageJ Operations: a framework for reusable algorithms. + ImageJ Ops 2 + ImageJ Operations 2: a framework for reusable algorithms. http://imagej.net/ImageJ_Ops 2014 @@ -210,7 +210,8 @@ ImageJ software for multidimensional image processing and analysis. - org.scijava.* + ${scijava.allowedDuplicateClasses}, org.scijava.*,com.github.therapi.runtimejavadoc.repack.com.eclipsesource.json.* + ${imagej-ops2.allowedDuplicateClasses} deploy-to-imagej @@ -272,7 +273,17 @@ org.scijava - scijava-ops + scijava-ops-api + ${project.version} + + + org.scijava + scijava-ops-spi + ${project.version} + + + org.scijava + scijava-ops-engine ${project.version} @@ -297,10 +308,6 @@ - - com.google.guava - guava - org.apache.commons commons-math3 @@ -320,18 +327,13 @@ - org.junit.jupiter - junit-jupiter-api + junit + junit test org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.vintage - junit-vintage-engine + junit-jupiter-api test diff --git a/imagej/imagej-ops2/src/main/java/module-info.java b/imagej/imagej-ops2/src/main/java/module-info.java index 421aaf29c..f8f361767 100644 --- a/imagej/imagej-ops2/src/main/java/module-info.java +++ b/imagej/imagej-ops2/src/main/java/module-info.java @@ -1,123 +1,120 @@ module net.imagej.ops2 { + exports net.imagej.ops2; // -- Open plugins to scijava-common - opens net.imagej.ops2.coloc to org.scijava, org.scijava.ops; - opens net.imagej.ops2.coloc.icq to org.scijava, org.scijava.ops; - opens net.imagej.ops2.coloc.kendallTau to org.scijava, org.scijava.ops; - opens net.imagej.ops2.coloc.maxTKendallTau to org.scijava, org.scijava.ops; - opens net.imagej.ops2.coloc.pearsons to org.scijava, org.scijava.ops; - opens net.imagej.ops2.coloc.pValue to org.scijava, org.scijava.ops; - opens net.imagej.ops2.convert to org.scijava, org.scijava.ops; - opens net.imagej.ops2.convert.clip to org.scijava, org.scijava.ops; - opens net.imagej.ops2.convert.copy to org.scijava, org.scijava.ops; - opens net.imagej.ops2.copy to org.scijava, org.scijava.ops; - opens net.imagej.ops2.create to org.scijava, org.scijava.ops; - opens net.imagej.ops2.create.img to org.scijava, org.scijava.ops; - opens net.imagej.ops2.create.kernel to org.scijava, org.scijava.ops; - opens net.imagej.ops2.deconvolve to org.scijava, org.scijava.ops; - opens net.imagej.ops2.deconvolve.accelerate to org.scijava, org.scijava.ops; - opens net.imagej.ops2.eval to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.haralick to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.haralick.helper to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.hog to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.lbp2d to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.tamura2d to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.zernike to org.scijava, org.scijava.ops; - opens net.imagej.ops2.features.zernike.helper to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.addNoise to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.bilateral to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.convolve to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.correlate to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.derivative to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.derivativeGauss to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.dog to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.fft to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.fftSize to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.gauss to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.hessian to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.ifft to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.max to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.mean to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.median to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.min to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.pad to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.sigma to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.sobel to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.tubeness to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.variance to org.scijava, org.scijava.ops; - opens net.imagej.ops2.filter.vesselness to org.scijava, org.scijava.ops; - opens net.imagej.ops2.geom to org.scijava, org.scijava.ops; - opens net.imagej.ops2.geom.geom2d to org.scijava, org.scijava.ops; - opens net.imagej.ops2.geom.geom3d to org.scijava, org.scijava.ops; - opens net.imagej.ops2.geom.geom3d.mesh to org.scijava, org.scijava.ops; - opens net.imagej.ops2.identity to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.ascii to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.cooccurrenceMatrix to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.distancetransform to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.equation to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.fill to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.histogram to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.integral to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.invert to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.normalize to org.scijava, org.scijava.ops; - opens net.imagej.ops2.image.watershed to org.scijava, org.scijava.ops; - opens net.imagej.ops2.imagemoments to org.scijava, org.scijava.ops; - opens net.imagej.ops2.imagemoments.centralmoments to org.scijava, org.scijava.ops; - opens net.imagej.ops2.imagemoments.hu to org.scijava, org.scijava.ops; - opens net.imagej.ops2.imagemoments.moments to org.scijava, org.scijava.ops; - opens net.imagej.ops2.imagemoments.normalizedcentralmoments to org.scijava, org.scijava.ops; - opens net.imagej.ops2.labeling to org.scijava, org.scijava.ops; - opens net.imagej.ops2.labeling.cca to org.scijava, org.scijava.ops; - opens net.imagej.ops2.linalg.rotate to org.scijava, org.scijava.ops; - opens net.imagej.ops2.logic to org.scijava, org.scijava.ops; - opens net.imagej.ops2.map.neighborhood to org.scijava, org.scijava.ops; - opens net.imagej.ops2.math to org.scijava, org.scijava.ops; - opens net.imagej.ops2.math.multiply to org.scijava, org.scijava.ops; - opens net.imagej.ops2.morphology to org.scijava, org.scijava.ops; - opens net.imagej.ops2.morphology.thin to org.scijava, org.scijava.ops; - opens net.imagej.ops2.project to org.scijava, org.scijava.ops; - opens net.imagej.ops2.segment.detectJunctions to org.scijava, org.scijava.ops; - opens net.imagej.ops2.segment.detectRidges to org.scijava, org.scijava.ops; - opens net.imagej.ops2.slice to org.scijava, org.scijava.ops; - opens net.imagej.ops2.stats to org.scijava, org.scijava.ops; - opens net.imagej.ops2.stats.regression.leastSquares to org.scijava, org.scijava.ops; - opens net.imagej.ops2.thread.chunker to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.apply to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.huang to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.ij1 to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.intermodes to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.isoData to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.li to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localBernsen to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localContrast to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localMean to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localMedian to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localMidGrey to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localNiblack to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localPhansalkar to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.localSauvola to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.maxEntropy to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.maxLikelihood to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.mean to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.minError to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.minimum to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.moments to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.otsu to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.percentile to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.renyiEntropy to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.rosin to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.shanbhag to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.triangle to org.scijava, org.scijava.ops; - opens net.imagej.ops2.threshold.yen to org.scijava, org.scijava.ops; - opens net.imagej.ops2.topology to org.scijava, org.scijava.ops; - opens net.imagej.ops2.topology.eulerCharacteristic to org.scijava, org.scijava.ops; - opens net.imagej.ops2.transform to org.scijava, org.scijava.ops; - opens net.imagej.ops2.types to org.scijava, org.scijava.ops; - opens net.imagej.ops2.types.adapt to org.scijava, org.scijava.ops; - opens net.imagej.ops2.types.maxValue to org.scijava, org.scijava.ops; - opens net.imagej.ops2.types.minValue to org.scijava, org.scijava.ops; + opens net.imagej.ops2.coloc to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.coloc.icq to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.coloc.kendallTau to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.coloc.maxTKendallTau to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.coloc.pearsons to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.coloc.pValue to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.convert to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.convert.clip to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.convert.copy to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.copy to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.create to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.deconvolve to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.deconvolve.accelerate to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.eval to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.features.haralick to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.features.haralick.helper to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.features.hog to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.features.lbp2d to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.features.tamura2d to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.features.zernike to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.addNoise to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.bilateral to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.convolve to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.correlate to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.derivative to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.derivativeGauss to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.dog to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.fft to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.fftSize to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.gauss to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.hessian to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.ifft to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.max to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.mean to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.median to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.min to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.pad to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.sigma to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.sobel to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.tubeness to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.variance to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.filter.vesselness to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.geom to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.geom.geom2d to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.geom.geom3d to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.identity to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.ascii to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.cooccurrenceMatrix to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.distancetransform to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.equation to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.fill to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.histogram to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.integral to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.invert to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.normalize to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.image.watershed to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.imagemoments to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.imagemoments.centralmoments to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.imagemoments.hu to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.imagemoments.moments to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.imagemoments.normalizedcentralmoments to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.labeling to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.labeling.cca to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.linalg.rotate to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.logic to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.map.neighborhood to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.math to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.math.multiply to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.morphology to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.morphology.thin to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.project to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.segment.detectJunctions to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.segment.detectRidges to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.slice to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.stats to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.stats.regression.leastSquares to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.thread.chunker to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.apply to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.huang to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.ij1 to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.intermodes to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.isoData to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.li to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localBernsen to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localContrast to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localMean to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localMedian to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localMidGrey to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localNiblack to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localPhansalkar to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.localSauvola to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.maxEntropy to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.maxLikelihood to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.mean to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.minError to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.minimum to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.moments to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.otsu to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.percentile to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.renyiEntropy to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.rosin to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.shanbhag to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.triangle to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.threshold.yen to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.topology to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.topology.eulerCharacteristic to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.transform to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.types to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.types.adapt to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.types.maxValue to org.scijava, org.scijava.ops.engine; + opens net.imagej.ops2.types.minValue to org.scijava, org.scijava.ops.engine; requires java.desktop; requires java.scripting; @@ -128,7 +125,7 @@ requires net.imglib2.roi; requires org.joml; requires org.scijava; - requires org.scijava.ops; + requires org.scijava.ops.engine; requires org.scijava.parsington; requires org.scijava.types; @@ -139,5 +136,7 @@ requires imglib2.algorithm.fft; requires mines.jtk; requires org.scijava.function; + requires org.scijava.ops.api; + requires org.scijava.ops.spi; } diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/icq/LiICQ.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/icq/LiICQ.java index c7fa99e4d..432a4a14d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/icq/LiICQ.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/icq/LiICQ.java @@ -38,11 +38,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This algorithm calculates Li et al.'s ICQ (intensity correlation quotient). @@ -53,11 +51,6 @@ * Type of the second image */ @Plugin(type = Op.class, name = "coloc.icq") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "mean1") -@Parameter(key = "mean2") -@Parameter(key = "output") public class LiICQ, U extends RealType, V extends RealType> implements Functions.Arity4, Iterable, DoubleType, DoubleType, Double> { @@ -66,6 +59,15 @@ public class LiICQ, U extends RealType, V extends RealT @OpDependency(name = "stats.mean") private Computers.Arity1, DoubleType> meanUOp; + /** + * TODO + * + * @param image1 + * @param image2 + * @param mean1 + * @param mean2 + * @return the output + */ @Override public Double apply(final Iterable image1, final Iterable image2, final DoubleType mean1, final DoubleType mean2) { @@ -120,15 +122,19 @@ private double computeMeanUOf(final Iterable in) { } @Plugin(type = Op.class, name = "coloc.icq") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "output") class LiICQSimple, U extends RealType, V extends RealType> implements BiFunction, Iterable, Double> { @OpDependency(name = "coloc.icq") private Functions.Arity4, Iterable, DoubleType, DoubleType, Double> colocOp; + /** + * TODO + * + * @param image1 + * @param image2 + * @return the output + */ @Override public Double apply(Iterable image1, Iterable image2) { return colocOp.apply(image1, image2, null, null); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRank.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRank.java index 66c8e620c..feabd2a6e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRank.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRank.java @@ -38,10 +38,8 @@ import net.imglib2.util.IterablePair; import net.imglib2.util.Pair; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This algorithm calculates Kendall's Tau-b rank correlation coefficient @@ -76,12 +74,16 @@ * @param */ @Plugin(type = Op.class, name = "coloc.kendallTau") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "output") public class KendallTauBRank, U extends RealType> /* extends Algorithm */ implements BiFunction, Iterable, Double> { + /** + * TODO + * + * @param image1 + * @param image2 + * @return the output + */ @Override public Double apply(Iterable image1, Iterable image2) { if (!ColocUtil.sameIterationOrder(image1, image2)) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/maxTKendallTau/MTKT.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/maxTKendallTau/MTKT.java index 522025be0..bffdc2a8c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/maxTKendallTau/MTKT.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/maxTKendallTau/MTKT.java @@ -49,11 +49,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; import org.scijava.util.IntArray; /** @@ -68,10 +66,6 @@ * @author Curtis Rueden */ @Plugin(type = Op.class, name = "coloc.maxTKendallTau") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "seed") -@Parameter(key = "output") public class MTKT, U extends RealType> implements Functions.Arity3, RandomAccessibleInterval, Long, Double> { @@ -86,6 +80,14 @@ public class MTKT, U extends RealType> @OpDependency(name = "threshold.otsu") private Computers.Arity1, U> thresholdOpU; + /** + * TODO + * + * @param image1 + * @param image2 + * @param seed + * @return the output + */ @Override public Double apply(final RandomAccessibleInterval image1, final RandomAccessibleInterval image2, final Long seed) { // check image sizes @@ -248,9 +250,6 @@ static double calculateKendallTau(final double[][] rank, } @Plugin(type = Op.class, name = "coloc.maxTKendallTau") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "output") class MTKTSimple, U extends RealType> implements BiFunction, RandomAccessibleInterval, Double> { @@ -260,6 +259,13 @@ class MTKTSimple, U extends RealType> private long seed = 0x89302341; + /** + * TODO + * + * @param image1 + * @param image2 + * @return the output + */ @Override public Double apply(RandomAccessibleInterval image1, RandomAccessibleInterval image2) { return colocOp.apply(image1, image2, seed); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pValue/DefaultPValue.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pValue/DefaultPValue.java index 69be888e1..cd91e8f9a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pValue/DefaultPValue.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pValue/DefaultPValue.java @@ -48,11 +48,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This algorithm repeatedly executes a colocalization algorithm, computing a @@ -62,17 +60,21 @@ * Statistical Approach". */ @Plugin(type = Op.class, name = "coloc.pValue") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "op") -@Parameter(key = "nrRandomizations") -@Parameter(key = "psfSize") -@Parameter(key = "seed") -@Parameter(key = "executorService") -@Parameter(key = "output") public class DefaultPValue, U extends RealType> implements Computers.Arity7, RandomAccessibleInterval, BiFunction, RandomAccessibleInterval, Double>, Integer, Dimensions, Long, ExecutorService, PValueResult> { + /** + * TODO + * + * @param image1 + * @param image2 + * @param op + * @param nrRandomizations + * @param psfSize + * @param seed + * @param executorService + * @param output + */ @Override public void compute(final RandomAccessibleInterval image1, final RandomAccessibleInterval image2, final BiFunction, RandomAccessibleInterval, Double> op, @@ -191,18 +193,22 @@ private static RandomAccessibleInterval trim(final RandomAccessibleInterv } @Plugin(type = Op.class, name = "coloc.pValue") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "op") -@Parameter(key = "nrRandomizations") -@Parameter(key = "executorService") -@Parameter(key = "output") class PValueSimpleWithRandomizations, U extends RealType> implements Computers.Arity5, RandomAccessibleInterval, BiFunction, RandomAccessibleInterval, Double>, Integer, ExecutorService, PValueResult> { @OpDependency(name = "coloc.pValue") private Computers.Arity7, RandomAccessibleInterval, BiFunction, RandomAccessibleInterval, Double>, Integer, Dimensions, Long, ExecutorService, PValueResult> pValueOp; + /** + * TODO + * + * @param image1 + * @param image2 + * @param op + * @param nrRandomizations + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in1, RandomAccessibleInterval in2, BiFunction, RandomAccessibleInterval, Double> in3, Integer in4, @@ -214,17 +220,21 @@ public void compute(RandomAccessibleInterval in1, RandomAccessibleInterval } @Plugin(type = Op.class, name = "coloc.pValue") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "op") -@Parameter(key = "executorService") -@Parameter(key = "output") class PValueSimple, U extends RealType> implements Computers.Arity4, RandomAccessibleInterval, BiFunction, RandomAccessibleInterval, Double>, ExecutorService, PValueResult> { @OpDependency(name = "coloc.pValue") private Computers.Arity5, RandomAccessibleInterval, BiFunction, RandomAccessibleInterval, Double>, Integer, ExecutorService, PValueResult> pValueOp; + /** + * TODO + * + * @param image1 + * @param image2 + * @param op + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in1, RandomAccessibleInterval in2, BiFunction, RandomAccessibleInterval, Double> in3, ExecutorService in4, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pearsons/DefaultPearsons.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pearsons/DefaultPearsons.java index 726f4d7dc..721c851f3 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pearsons/DefaultPearsons.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pearsons/DefaultPearsons.java @@ -35,10 +35,8 @@ import net.imglib2.util.IterablePair; import net.imglib2.util.Pair; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * A class that represents the mean calculation of the two source images in the @@ -47,13 +45,17 @@ * @author Ellen T Arena */ @Plugin(type = Op.class, name = "coloc.pearsons") -@Parameter(key = "image1") -@Parameter(key = "image2") -@Parameter(key = "output") public class DefaultPearsons, U extends RealType> implements BiFunction, Iterable, Double> { + /** + * TODO + * + * @param image1 + * @param image2 + * @return the output + */ @Override public Double apply(final Iterable image1, final Iterable image2) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/ConvertTypes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/ConvertTypes.java index aa5315bba..c5927c551 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/ConvertTypes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/ConvertTypes.java @@ -52,11 +52,9 @@ import net.imglib2.type.numeric.real.FloatType; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Converters for converting between Complex types diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/Converters.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/Converters.java index be0838cf0..19f5f8e75 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/Converters.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/Converters.java @@ -6,11 +6,9 @@ import net.imglib2.type.Type; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class Converters> { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/clip/ClipRealTypes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/clip/ClipRealTypes.java index 41d852383..88354ef31 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/clip/ClipRealTypes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/clip/ClipRealTypes.java @@ -32,10 +32,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copies the value of one {@link RealType} to another, and clips values which @@ -44,12 +42,16 @@ * @author Martin Horn (University of Konstanz) */ @Plugin(type = Op.class, name = "convert.clip") -@Parameter(key = "input") -@Parameter(key = "output") public class ClipRealTypes, O extends RealType> implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final I input, final O output) { final double v = input.getRealDouble(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/copy/CopyRealTypes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/copy/CopyRealTypes.java index 2484c13f7..0185f6300 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/copy/CopyRealTypes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/copy/CopyRealTypes.java @@ -32,10 +32,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copies the value of one {@link RealType} into another using {@code double} @@ -44,12 +42,16 @@ * @author Martin Horn (University of Konstanz) */ @Plugin(type = Op.class, name = "convert.copy") -@Parameter(key = "input") -@Parameter(key = "output") public class CopyRealTypes, O extends RealType> implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final I input, final O output) { output.setReal(input.getRealDouble()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyArrayImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyArrayImg.java index 1edce1c98..47b5789c5 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyArrayImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyArrayImg.java @@ -39,11 +39,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copying {@link ArrayImg} into another {@link ArrayImg} @@ -52,10 +50,14 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.img", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "copy") public class CopyArrayImg, A extends ArrayDataAccess> implements Computers.Arity1, ArrayImg> { + /** + * TODO + * + * @param input + * @param copy + */ @Override public void compute(final ArrayImg input, final ArrayImg output) { @@ -69,14 +71,18 @@ public void compute(final ArrayImg input, final ArrayImg output) { } @Plugin(type = Op.class, name = "copy, copy.img", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "copy") class CopyArrayImgFunction, A extends ArrayDataAccess> implements Function, ArrayImg> { @OpDependency(name = "copy.img") private Computers.Arity1, ArrayImg> copyOp; + /** + * TODO + * + * @param input + * @param copy + */ @Override public ArrayImg apply(ArrayImg input) { // NB: Workaround for ArrayImgFactory not overriding create(Dimensions, T). diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyII.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyII.java index 6033bf832..937519f6c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyII.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyII.java @@ -36,12 +36,10 @@ import net.imglib2.IterableInterval; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Maps; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Maps; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copies an {@link IterableInterval} into another {@link IterableInterval} @@ -50,8 +48,6 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.iterableInterval", priority = 1.0) -@Parameter(key = "input") -@Parameter(key = "output") public class CopyII implements Computers.Arity1, IterableInterval> { // used internally @@ -59,6 +55,12 @@ public class CopyII implements Computers.Arity1, Iterable @OpDependency(name = "copy.type") private Computers.Arity1 copyOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final IterableInterval input, final IterableInterval output) { if (!input.iterationOrder().equals(output.iterationOrder())) @@ -69,8 +71,6 @@ public void compute(final IterableInterval input, final IterableInterval o } @Plugin(type = Op.class, name = "copy, copy.iterableInterval", priority = 1.0) -@Parameter(key = "input") -@Parameter(key = "output") class CopyIIFunction implements Function, IterableInterval> { @OpDependency(name = "create.img") @@ -78,6 +78,12 @@ class CopyIIFunction implements Function, IterableInterva @OpDependency(name = "copy.iterableInterval") private Computers.Arity1, IterableInterval> copyOp; + /** + * TODO + * + * @param input + * @return the output + */ @Override public IterableInterval apply(IterableInterval input) { IterableInterval output = imgCreator.apply(input, input.firstElement()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImg.java index 947ac5b29..72ae90b20 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImg.java @@ -35,11 +35,9 @@ import net.imglib2.type.NativeType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copying {@link Img} into another {@link Img}. Exists mainly for convenience @@ -49,13 +47,17 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.img") -@Parameter(key = "input") -@Parameter(key = "output") public class CopyImg> implements Computers.Arity1, Img> { @OpDependency(name = "copy.iterableInterval") private Computers.Arity1, Iterable> copyComputer; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final Img input, final Img output) { if (!input.iterationOrder().equals(output.iterationOrder())) @@ -65,8 +67,6 @@ public void compute(final Img input, final Img output) { } @Plugin(type = Op.class, name = "copy, copy.img") -@Parameter(key = "input") -@Parameter(key = "output") class CopyImgFunction> implements Function, Img> { @OpDependency(name = "copy.img") @@ -75,6 +75,12 @@ class CopyImgFunction> implements Function, Img, Img> createFunc; + /** + * TODO + * + * @param input + * @return the output + */ @Override public Img apply(Img input) { Img output = createFunc.apply(input); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImgLabeling.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImgLabeling.java index ec5a60eac..d314183ec 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImgLabeling.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImgLabeling.java @@ -38,11 +38,9 @@ import net.imglib2.util.Util; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copying {@link ImgLabeling} into another {@link ImgLabeling} @@ -51,8 +49,6 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.imgLabeling") -@Parameter(key = "input") -@Parameter(key = "output") public class CopyImgLabeling & NativeType, L> implements Computers.Arity1, ImgLabeling> { @@ -61,6 +57,12 @@ public class CopyImgLabeling & NativeType, L> @OpDependency(name = "copy.labelingMapping") private Computers.Arity1, LabelingMapping> mappingCopyOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final ImgLabeling input, final ImgLabeling output) { if (!Intervals.equalDimensions(input, output)) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyLabelingMapping.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyLabelingMapping.java index 9185783db..c9ff90b42 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyLabelingMapping.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyLabelingMapping.java @@ -37,10 +37,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copies a {@link LabelingMapping} into another {@link LabelingMapping} @@ -49,10 +47,14 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.labelingMapping", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class CopyLabelingMapping implements Computers.Arity1, LabelingMapping> { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final LabelingMapping input, final LabelingMapping output) { @@ -63,8 +65,6 @@ public void compute(final LabelingMapping input, final LabelingMapping out } //@Plugin(type = Op.class, name = "copy.labelingMapping", priority = Priority.VERY_HIGH) -//@Parameter(key = "input") -//@Parameter(key = "output") //class CopyLabelingMappingFunction implements Function, LabelingMapping> { // // @OpDependency(name = "copy.labelingMapping") diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyRAI.java index c00fb770e..69ad36566 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyRAI.java @@ -35,11 +35,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copies a {@link RandomAccessibleInterval} into another @@ -49,13 +47,17 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.rai", priority = 1.0) -@Parameter(key = "input") -@Parameter(key = "copy") public class CopyRAI implements Computers.Arity1, RandomAccessibleInterval> { @OpDependency(name = "copy") private Computers.Arity1 mapComputer; + /** + * TODO + * + * @param input + * @param copy + */ @Override public void compute(final RandomAccessibleInterval input, final RandomAccessibleInterval output) { if (!Intervals.equalDimensions(input, output)) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyType.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyType.java index 3c45565df..a1f37fec3 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyType.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyType.java @@ -32,10 +32,8 @@ import net.imglib2.type.Type; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Copy {@link Type} to another {@link Type} @@ -44,10 +42,14 @@ * @param */ @Plugin(type = Op.class, name = "copy, copy.type") -@Parameter(key = "input") -@Parameter(key = "copy") public class CopyType> implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param copy + */ @Override public void compute(final T input, final T output) { output.set(input); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/CreateTypes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/CreateTypes.java index e92f27c8c..40ea1adfd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/CreateTypes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/CreateTypes.java @@ -19,11 +19,9 @@ import net.imglib2.type.numeric.real.FloatType; import org.scijava.function.Producer; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class CreateTypes { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Creators.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Creators.java index 1c3357e06..cb2fdb56b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Creators.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Creators.java @@ -6,14 +6,6 @@ import net.imagej.ImgPlus; import net.imagej.ImgPlusMetadata; -import net.imagej.ops2.create.img.Imgs; -import net.imagej.ops2.create.kernel.DefaultCreateKernel2ndDerivBiGauss; -import net.imagej.ops2.create.kernel.DefaultCreateKernelBiGauss; -import net.imagej.ops2.create.kernel.DefaultCreateKernelGabor; -import net.imagej.ops2.create.kernel.DefaultCreateKernelGauss; -import net.imagej.ops2.create.kernel.DefaultCreateKernelGibsonLanni; -import net.imagej.ops2.create.kernel.DefaultCreateKernelLog; -import net.imagej.ops2.create.kernel.DefaultCreateKernelSobel; import net.imglib2.Cursor; import net.imglib2.Dimensions; import net.imglib2.FinalDimensions; @@ -50,8 +42,8 @@ import org.scijava.Priority; import org.scijava.function.Functions; import org.scijava.function.Producer; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernel2ndDerivBiGauss.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernel2ndDerivBiGauss.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernel2ndDerivBiGauss.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernel2ndDerivBiGauss.java index e34a382e5..64333421a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernel2ndDerivBiGauss.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernel2ndDerivBiGauss.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelBiGauss.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelBiGauss.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelBiGauss.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelBiGauss.java index f78a025b5..671cfdc39 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelBiGauss.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelBiGauss.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGabor.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGabor.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGabor.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGabor.java index 532eedcdb..88ccc1e1c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGabor.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGabor.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGauss.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGauss.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGauss.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGauss.java index 29dd6b65d..4f0eaff9e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGauss.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGauss.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGibsonLanni.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGibsonLanni.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGibsonLanni.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGibsonLanni.java index 9d3106593..c13b66a9b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelGibsonLanni.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelGibsonLanni.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelLog.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelLog.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelLog.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelLog.java index 016da987e..0c1298498 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelLog.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelLog.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelSobel.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelSobel.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelSobel.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelSobel.java index e3993b740..ececfd61c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/kernel/DefaultCreateKernelSobel.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/DefaultCreateKernelSobel.java @@ -26,7 +26,7 @@ * #L% */ -package net.imagej.ops2.create.kernel; +package net.imagej.ops2.create; import java.util.function.BiFunction; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/img/Imgs.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Imgs.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/img/Imgs.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Imgs.java index fb2b9fc88..6e3c0190a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/img/Imgs.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/create/Imgs.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.create.img; +package net.imagej.ops2.create; import net.imglib2.Dimensions; import net.imglib2.Interval; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantFirstGuess.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantFirstGuess.java index 88c0a5a43..6dcdb1e99 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantFirstGuess.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantFirstGuess.java @@ -42,11 +42,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Calculate non-circulant first guess. This is used as part of the Boundary @@ -61,10 +59,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.firstGuess", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "outType") -@Parameter(key = "k") -@Parameter(key = "output") public class NonCirculantFirstGuess, O extends RealType, K extends RealType, C extends ComplexType> implements Functions.Arity3, O, Dimensions, RandomAccessibleInterval> @@ -82,6 +76,14 @@ public class NonCirculantFirstGuess, O extends RealType * image before extension, k is required to calculate the non-circulant * normalization factor */ + /** + * TODO + * + * @param input + * @param outType + * @param k + * @return the output + */ @Override public RandomAccessibleInterval apply(RandomAccessibleInterval in, final O outType, final Dimensions k) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantNormalizationFactor.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantNormalizationFactor.java index a14c92da2..b4aa48903 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantNormalizationFactor.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/NonCirculantNormalizationFactor.java @@ -50,11 +50,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Calculate non-circulant normalization factor. This is used as part of the @@ -70,12 +68,6 @@ @Plugin(type = Op.class, name = "deconvolve.normalizationFactor", priority = Priority.LOW) -@Parameter(key = "io") -@Parameter(key = "k") -@Parameter(key = "l") -@Parameter(key = "fftInput") -@Parameter(key = "fftKernel") -@Parameter(key = "executorService") public class NonCirculantNormalizationFactor, O extends RealType, K extends RealType, C extends ComplexType> implements Inplaces.Arity6_1, Dimensions, Dimensions, RandomAccessibleInterval, RandomAccessibleInterval, ExecutorService> { @@ -123,6 +115,13 @@ public class NonCirculantNormalizationFactor, O extends Re /** * apply the normalization image needed for semi noncirculant model see * http://bigwww.epfl.ch/deconvolution/challenge2013/index.html?p=doc_math_rl + * + * @param io + * @param k + * @param l + * @param fftInput + * @param fftKernel + * @param executorService */ @Override public void mutate(RandomAccessibleInterval arg, final Dimensions k, final Dimensions l, final RandomAccessibleInterval fftInput, final RandomAccessibleInterval fftKernel, final ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyC.java index d887a24f0..0dbe2ab9f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyC.java @@ -45,11 +45,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Richardson Lucy algorithm for (@link RandomAccessibleInterval) (Lucy, L. B. @@ -64,20 +62,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.richardsonLucy", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "fftInput") -@Parameter(key = "fftKernel") -@Parameter(key = "performInputFFT") -@Parameter(key = "performKernelFFT") -@Parameter(key = "complexType") -@Parameter(key = "maxIterations") -@Parameter(key = "accelerator") -@Parameter(key = "updateOp", description = "by default, this should be RichardsonLucyUpdate") -@Parameter(key = "raiExtendedEstimate") -@Parameter(key = "iterativePostProcessingOps") -@Parameter(key = "executorService") -@Parameter(key = "output") public class RichardsonLucyC, O extends RealType, K extends RealType, C extends ComplexType> implements Computers.Arity13, RandomAccessibleInterval, RandomAccessibleInterval, // RandomAccessibleInterval, Boolean, Boolean, C, Integer, Inplaces.Arity1>, // @@ -134,6 +118,24 @@ public class RichardsonLucyC, O extends RealType, K ext @OpDependency(name = "copy.rai") private Computers.Arity1, RandomAccessibleInterval> copy2Op; + /** + * TODO + * + * @param input + * @param kernel + * @param fftInput + * @param fftKernel + * @param performInputFFT + * @param performKernelFFT + * @param complexType + * @param maxIterations + * @param accelerator + * @param updateOp by default, this should be RichardsonLucyUpdate + * @param raiExtendedEstimate + * @param iterativePostProcessingOps + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in, RandomAccessibleInterval kernel, RandomAccessibleInterval fftInput, RandomAccessibleInterval fftKernel, Boolean performInputFFT, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyCorrection.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyCorrection.java index 4420bedb1..dce9f4dc0 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyCorrection.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyCorrection.java @@ -44,11 +44,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Computes Richardson Lucy correction factor for (@link @@ -62,12 +60,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.richardsonLucyCorrection", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "reblurred") -@Parameter(key = "fftBuffer") -@Parameter(key = "fftKernel") -@Parameter(key = "executorService") -@Parameter(key = "output") public class RichardsonLucyCorrection, O extends RealType, C extends ComplexType> implements Computers.Arity5, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, ExecutorService, RandomAccessibleInterval> @@ -105,6 +97,13 @@ public class RichardsonLucyCorrection, O extends RealType< /** * computes the correction factor of the Richardson Lucy Algorithm + * + * @param input + * @param reblurred + * @param fftBuffer + * @param fftKernel + * @param executorService + * @param output */ @Override public void compute(RandomAccessibleInterval observed, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyF.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyF.java index 61ec30465..13e2a8dcd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyF.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyF.java @@ -47,11 +47,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Richardson Lucy function op that operates on (@link RandomAccessibleInterval) @@ -65,18 +63,6 @@ * @param */ @Plugin(type = Op.class, name = "deconvolve.richardsonLucy", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "borderSize") -@Parameter(key = "obfInput") -@Parameter(key = "obfKernel") -@Parameter(key = "outType") -@Parameter(key = "fftType") -@Parameter(key = "maxIterations", description = "max number of iterations") -@Parameter(key = "nonCirculant", description = "indicates whether to use non-circulant edge handling") -@Parameter(key = "accelerate", description = "indicates whether or not to use acceleration") -@Parameter(key = "executorService") -@Parameter(key = "output") public class RichardsonLucyF & NativeType, O extends RealType & NativeType, K extends RealType & NativeType, C extends ComplexType & NativeType> implements Functions.Arity11, RandomAccessibleInterval, long[], OutOfBoundsFactory>, OutOfBoundsFactory>, O, C, Integer, Boolean, Boolean, ExecutorService, RandomAccessibleInterval> { @@ -194,6 +180,22 @@ private void computeFilter(final RandomAccessibleInterval input, filter.compute(paddedInput, paddedKernel, output); } + /** + * TODO + * + * @param input + * @param kernel + * @param borderSize + * @param obfInput + * @param obfKernel + * @param outType + * @param fftType + * @param maxIterations max number of iterations + * @param nonCirculant indicates whether to use non-circulant edge handling + * @param accelerate indicates whether or not to use acceleration + * @param executorService + * @return the output + */ @Override public RandomAccessibleInterval apply(RandomAccessibleInterval input, RandomAccessibleInterval kernel, long[] borderSize, OutOfBoundsFactory> obfInput, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVF.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVF.java index f10177997..b5f5124bd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVF.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVF.java @@ -48,11 +48,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Richardson Lucy with total variation function op that operates on (@link @@ -68,19 +66,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.richardsonLucyTV", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "borderSize") -@Parameter(key = "obfInput") -@Parameter(key = "obfKernel") -@Parameter(key = "outType") -@Parameter(key = "fftType") -@Parameter(key = "maxIterations", description = "max number of iterations") -@Parameter(key = "nonCirculant", description = "indicates whether to use non-circulant edge handling") -@Parameter(key = "accelerate", description = "indicates whether or not to use acceleration") -@Parameter(key = "regularizationFactor") -@Parameter(key = "executorService") -@Parameter(key = "output") public class RichardsonLucyTVF & NativeType, O extends RealType & NativeType, K extends RealType & NativeType, C extends ComplexType & NativeType> implements Functions.Arity12, RandomAccessibleInterval, long[], OutOfBoundsFactory>, OutOfBoundsFactory>, O, C, Integer, Boolean, Boolean, Float, ExecutorService, RandomAccessibleInterval> { @@ -186,6 +171,23 @@ public void computeFilter(final RandomAccessibleInterval input, final RandomA filter.compute(input, kernel, output); } + /** + * TODO + * + * @param input + * @param kernel + * @param borderSize + * @param obfInput + * @param obfKernel + * @param outType + * @param fftType + * @param maxIterations max number of iterations + * @param nonCirculant indicates whether to use non-circulant edge handling + * @param accelerate indicates whether or not to use acceleration + * @param regularizationFactor + * @param executorService + * @param output + */ @Override public RandomAccessibleInterval apply(RandomAccessibleInterval input, RandomAccessibleInterval kernel, long[] borderSize, OutOfBoundsFactory> obfInput, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVUpdate.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVUpdate.java index 1b30e0e00..24c131a49 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVUpdate.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyTVUpdate.java @@ -45,11 +45,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implements update step for Richardson-Lucy algorithm with total variation @@ -63,10 +61,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.richardsonLucyUpdate", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "regularizationFactor") -@Parameter(key = "variation") -@Parameter(key = "output") public class RichardsonLucyTVUpdate & NativeType, I extends RandomAccessibleInterval> implements Computers.Arity3, I> { @@ -76,6 +70,11 @@ public class RichardsonLucyTVUpdate & NativeType, I ext /** * performs update step of the Richardson Lucy with Total Variation Algorithm + * + * @param input + * @param regularizationFactor + * @param variation + * @param output */ @Override public void compute(final I correction, final Float regularizationFactor, RandomAccessibleInterval variation, final I estimate) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyUpdate.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyUpdate.java index c1aa6abff..fa9eb8679 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyUpdate.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/RichardsonLucyUpdate.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implements update step for Richardson-Lucy algorithm on @@ -51,8 +49,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.richardsonLucyUpdate", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class RichardsonLucyUpdate> implements Computers.Arity1, RandomAccessibleInterval> { @@ -62,6 +58,9 @@ public class RichardsonLucyUpdate> implements /** * performs update step of the Richardson Lucy Algorithm + * + * @param input + * @param output */ @Override public void compute(RandomAccessibleInterval correction, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/accelerate/VectorAccelerator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/accelerate/VectorAccelerator.java index a8a9fa49d..ac3c8b533 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/accelerate/VectorAccelerator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/deconvolve/accelerate/VectorAccelerator.java @@ -46,12 +46,10 @@ import org.scijava.Priority; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Adapt; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Vector Accelerator implements acceleration scheme described in Acceleration @@ -63,7 +61,6 @@ */ @Plugin(type = Op.class, name = "deconvolve.accelerate", priority = Priority.NORMAL) -@Parameter(key = "io") public class VectorAccelerator & NativeType> implements Inplaces.Arity1> { @@ -84,6 +81,11 @@ public class VectorAccelerator & NativeType> implements ArrayImgFactory factory; + /** + * TODO + * + * @param io + */ @Override public void mutate(RandomAccessibleInterval yk_iterated) { T type = Util.getTypeFromInterval(yk_iterated); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/DefaultEval.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/DefaultEval.java index 331072c64..8c40a9565 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/DefaultEval.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/DefaultEval.java @@ -32,11 +32,9 @@ import java.util.Map; import org.scijava.function.Functions; -import org.scijava.ops.OpService; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Evaluates an expression. @@ -50,13 +48,17 @@ * @see OpEvaluator */ @Plugin(type = Op.class, name = "eval") -@Parameter(key = "input") -@Parameter(key = "vars") -@Parameter(key = "opService") -@Parameter(key = "output") public class DefaultEval implements Functions.Arity3, OpService, Object> { + /** + * TODO + * + * @param input + * @param vars + * @param opService + * @return the output + */ @Override public Object apply(final String input, final Map vars, final OpService ops) { OpEvaluator e = new OpEvaluator(ops); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/OpEvaluator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/OpEvaluator.java index adbafa415..5b764c333 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/OpEvaluator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/eval/OpEvaluator.java @@ -37,15 +37,16 @@ import java.util.Map; import org.scijava.function.Functions; -import org.scijava.ops.OpService; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.types.Nil; -import org.scijava.types.TypeService; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.engine.util.FunctionUtils; +import org.scijava.ops.spi.Op; import org.scijava.parsington.Operator; import org.scijava.parsington.Operators; import org.scijava.parsington.Variable; import org.scijava.parsington.eval.AbstractStandardStackEvaluator; import org.scijava.parsington.eval.Evaluator; +import org.scijava.types.Nil; +import org.scijava.types.TypeService; /** * A Parsington {@link Evaluator} using available {@link Op}s. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/AbstractHaralickFeature.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/AbstractHaralickFeature.java index 84ec9aa9c..ccdfa4c8d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/AbstractHaralickFeature.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/AbstractHaralickFeature.java @@ -36,7 +36,7 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Abstract class for HaralickFeatures. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultASM.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultASM.java index c6135c6a6..c408d96f5 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultASM.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultASM.java @@ -33,10 +33,8 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -47,13 +45,17 @@ * */ @Plugin(type = Op.class, name = "features.haralick.asm") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultASM> extends AbstractHaralickFeature { + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterPromenence.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterPromenence.java index cfac37ec5..639403e9d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterPromenence.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterPromenence.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -50,11 +48,6 @@ * */ @Plugin(type = Op.class, name = "features.haralick.clusterPromenence") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultClusterPromenence> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocMeanX") @@ -62,6 +55,15 @@ public class DefaultClusterPromenence> extends AbstractHar @OpDependency(name = "features.haralick.coocMeanY") private Function coocMeanYFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterShade.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterShade.java index 30322dcc3..96d61f691 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterShade.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultClusterShade.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Cluster Shade Haralick Feature @@ -49,11 +47,6 @@ * */ @Plugin(type = Op.class, name = "features.haralick.clusterShade") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultClusterShade> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocMeanX") @@ -61,6 +54,15 @@ public class DefaultClusterShade> extends AbstractHaralick @OpDependency(name = "features.haralick.coocMeanY") private Function coocMeanYFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultContrast.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultContrast.java index 51c542567..1769caa73 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultContrast.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultContrast.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -50,16 +48,20 @@ * */ @Plugin(type = Op.class, name = "features.haralick.contrast") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultContrast> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocPXMinusY") private Function coocPXMinusYFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultCorrelation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultCorrelation.java index e5c9ae3fe..14ac6d80b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultCorrelation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultCorrelation.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -51,11 +49,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.correlation") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultCorrelation> extends AbstractHaralickFeature { @@ -69,6 +62,15 @@ public class DefaultCorrelation> extends @OpDependency(name = "features.haralick.coocStdX") private Function coocStdXFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceEntropy.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceEntropy.java index d8d637b7f..31ae51a83 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceEntropy.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceEntropy.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -50,11 +48,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.differenceEntropy") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultDifferenceEntropy> extends AbstractHaralickFeature { // Avoid log 0 @@ -63,6 +56,15 @@ public class DefaultDifferenceEntropy> extends AbstractHar @OpDependency(name = "features.haralick.coocPXMinusY") private Function coocPXMinusYFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceVariance.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceVariance.java index e1d8ea9b9..dca184413 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceVariance.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultDifferenceVariance.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -52,16 +50,20 @@ * Formula based on: http://haralick.org/journals/TexturalFeatures.pdf */ @Plugin(type = Op.class, name = "features.haralick.differenceVariance") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultDifferenceVariance> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocPXMinusY") private Function coocPXMinusYFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultEntropy.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultEntropy.java index 09ce21277..0dd1461b6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultEntropy.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultEntropy.java @@ -33,10 +33,8 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -48,16 +46,20 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.entropy") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultEntropy> extends AbstractHaralickFeature { // Avoid log 0 private static final double EPSILON = Double.MIN_NORMAL; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM1.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM1.java index feeb429eb..2c6d839fe 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM1.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM1.java @@ -37,11 +37,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Information Measure of Correlation 1 Haralick Feature @@ -51,11 +49,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.icm1") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultICM1> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocHXY") @@ -63,6 +56,15 @@ public class DefaultICM1> extends AbstractHaralickFeature< @OpDependency(name = "features.haralick.entropy") private Functions.Arity4, Integer, Integer, MatrixOrientation, DoubleType> entropy; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM2.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM2.java index e1b5ad7fd..3e092bc4a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM2.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultICM2.java @@ -37,11 +37,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Information Measure of Correlation 2 Haralick Feature @@ -50,11 +48,6 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.icm2") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultICM2> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocHXY") @@ -62,6 +55,15 @@ public class DefaultICM2> extends AbstractHaralickFeature< @OpDependency(name = "features.haralick.entropy") private Functions.Arity4, Integer, Integer, MatrixOrientation, DoubleType> entropy; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultIFDM.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultIFDM.java index eac728e63..e203b48cb 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultIFDM.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultIFDM.java @@ -33,10 +33,8 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Inverse Difference Moment Haralick Feature based on @@ -48,13 +46,17 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.ifdm") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultIFDM> extends AbstractHaralickFeature { + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultMaxProbability.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultMaxProbability.java index 56b6c8b3b..998dc8bec 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultMaxProbability.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultMaxProbability.java @@ -33,10 +33,8 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Maximum Probability Haralick Feature @@ -46,13 +44,17 @@ * */ @Plugin(type = Op.class, name = "features.haralick.maxProbability") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultMaxProbability> extends AbstractHaralickFeature { + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumAverage.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumAverage.java index 0b9d2310b..790f2bbc4 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumAverage.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumAverage.java @@ -36,11 +36,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Sum Average Haralick Feature @@ -49,16 +47,20 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.sumAverage") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultSumAverage> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocPXPlusY") private Function coocPXPlusFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumEntropy.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumEntropy.java index 20e6cc257..cc84b5f95 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumEntropy.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumEntropy.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -50,11 +48,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.sumEntropy") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultSumEntropy> extends AbstractHaralickFeature { @@ -64,6 +57,15 @@ public class DefaultSumEntropy> extends @OpDependency(name = "features.haralick.coocPXPlusY") private Function coocPXPlusFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumVariance.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumVariance.java index 0c76782f1..4f1778948 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumVariance.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultSumVariance.java @@ -37,11 +37,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Sum Variance Haralick Feature according to @@ -52,11 +50,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.sumVariance") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultSumVariance> extends AbstractHaralickFeature { @OpDependency(name = "features.haralick.coocPXPlusY") @@ -65,6 +58,15 @@ public class DefaultSumVariance> extends AbstractHaralickF @OpDependency(name = "features.haralick.sumEntropy") private Functions.Arity4, Integer, Integer, MatrixOrientation, RealType> sumEntropyFunc; + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultTextureHomogeneity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultTextureHomogeneity.java index 648f0c0fb..2e1b480f9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultTextureHomogeneity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultTextureHomogeneity.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Texture Homogeneity Haralick Feature @@ -46,13 +44,17 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.textureHomogeneity") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultTextureHomogeneity> extends AbstractHaralickFeature { + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultVariance.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultVariance.java index 11cd6b1d9..d8ec3e214 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultVariance.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/DefaultVariance.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Variance Haralick Feature based on @@ -48,13 +46,17 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.variance") -@Parameter(key = "input") -@Parameter(key = "numGreyLevels") -@Parameter(key = "distance") -@Parameter(key = "matrixOrientation") -@Parameter(key = "output") public class DefaultVariance> extends AbstractHaralickFeature { + /** + * TODO + * + * @param input + * @param numGreyLevels + * @param distance + * @param matrixOrientation + * @return the output + */ @Override public DoubleType apply(final RandomAccessibleInterval input, final Integer numGreyLevels, final Integer distance, final MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocHXY.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocHXY.java index d51cf347f..f1ae7a9ae 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocHXY.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocHXY.java @@ -31,11 +31,9 @@ import java.util.function.Function; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -45,8 +43,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocHXY") -@Parameter(key = "matix") -@Parameter(key = "output") public class CoocHXY implements Function { private static final double EPSILON = Double.MIN_NORMAL; @@ -56,6 +52,12 @@ public class CoocHXY implements Function { @OpDependency(name = "features.haralick.coocPY") private Function coocPYFunc; + /** + * TODO + * + * @param matix + * @return the output + */ @Override public double[] apply(double[][] matrix) { double hx = 0.0d; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanX.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanX.java index abd21172c..e89452cdd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanX.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanX.java @@ -32,11 +32,9 @@ import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -45,13 +43,17 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocMeanX") -@Parameter(key = "input") -@Parameter(key = "output") public class CoocMeanX implements Function { @OpDependency(name = "features.haralick.coocPX") private Function coocPXFunc; + /** + * TODO + * + * @param input + * @return the output + */ @Override public DoubleType apply(double[][] input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanY.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanY.java index b135b7050..d5d67f251 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanY.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocMeanY.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -46,14 +44,18 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocMeanY") -@Parameter(key = "input") -@Parameter(key = "output") public class CoocMeanY implements Function { @OpDependency(name = "features.haralick.coocPY") private Function coocPYFunc; + /** + * TODO + * + * @param input + * @return the output + */ @Override public DoubleType apply(double[][] input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPX.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPX.java index 3d6529588..6979cfb5b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPX.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPX.java @@ -30,10 +30,8 @@ import java.util.function.Function; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -42,10 +40,14 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocPX") -@Parameter(key = "input") -@Parameter(key = "output") public class CoocPX implements Function { + /** + * TODO + * + * @param input + * @return the output + */ @Override public double[] apply(double[][] input) { final int nrGrayLevels = input.length; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXMinusY.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXMinusY.java index afef130aa..871140aa7 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXMinusY.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXMinusY.java @@ -30,10 +30,8 @@ import java.util.function.Function; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -42,10 +40,14 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocPXMinusY") -@Parameter(key = "matrix") -@Parameter(key = "output") public class CoocPXMinusY implements Function { + /** + * TODO + * + * @param matrix + * @return the output + */ @Override public double[] apply(final double[][] matrix) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXPlusY.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXPlusY.java index d4b0ee6bf..31e434453 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXPlusY.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPXPlusY.java @@ -30,10 +30,8 @@ import java.util.function.Function; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -42,10 +40,14 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocPXPlusY") -@Parameter(key = "matrix") -@Parameter(key = "output") public class CoocPXPlusY implements Function { + /** + * TODO + * + * @param matrix + * @return the output + */ @Override public double[] apply(double[][] matrix) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPY.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPY.java index a71d87435..a2706df8c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPY.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocPY.java @@ -30,10 +30,8 @@ import java.util.function.Function; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -42,10 +40,14 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocPY") -@Parameter(key = "matrix") -@Parameter(key = "output") public class CoocPY implements Function { + /** + * TODO + * + * @param matrix + * @return the output + */ @Override public double[] apply(final double[][] matrix) { final int nrGrayLevels = matrix.length; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdX.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdX.java index 1e98c9e1f..f18bc7fe6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdX.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdX.java @@ -32,11 +32,9 @@ import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -46,8 +44,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocStdX") -@Parameter(key = "input") -@Parameter(key = "output") public class CoocStdX implements Function { @OpDependency(name = "features.haralick.coocMeanX") @@ -55,6 +51,12 @@ public class CoocStdX implements Function { @OpDependency(name = "features.haralick.coocPX") private Function coocPXFunc; + /** + * TODO + * + * @param input + * @return the output + */ @Override public DoubleType apply(double[][] input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdY.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdY.java index 160311891..31715b382 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdY.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/haralick/helper/CoocStdY.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * NB: Helper class. Internal usage only. @@ -47,8 +45,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "features.haralick.coocStdY") -@Parameter(key = "input") -@Parameter(key = "output") public class CoocStdY implements Function { @OpDependency(name = "features.haralick.coocMeanY") @@ -56,6 +52,12 @@ public class CoocStdY implements Function { @OpDependency(name = "features.haralick.coocPY") private Function coocPYFunc; + /** + * TODO + * + * @param input + * @return the output + */ @Override public DoubleType apply(double[][] input) { double res = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2D.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2D.java index 9c5dd00a3..0343cc0c0 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2D.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2D.java @@ -59,11 +59,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Calculates a histogram of oriented gradients which is a feature descriptor. @@ -80,11 +78,6 @@ * @author Simon Schmid (University of Konstanz) */ @Plugin(type = Op.class, name = "features.hog") -@Parameter(key = "input") -@Parameter(key = "numOrientations") -@Parameter(key = "spanOfNeighborhood") -@Parameter(key = "executorService") -@Parameter(key = "output") public class HistogramOfOrientedGradients2D> implements Computers.Arity4, Integer, Integer, ExecutorService, RandomAccessibleInterval> { @@ -99,6 +92,15 @@ public class HistogramOfOrientedGradients2D> implements private Converter, FloatType> converterGetMax; @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param numOrientations + * @param spanOfNeighborhood + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in, Integer numOrientations, Integer spanOfNeighborhood, ExecutorService es, RandomAccessibleInterval out) { @@ -274,11 +276,6 @@ private double getMagnitude(final double x, final double y) { } @Plugin(type = Op.class, name = "features.hog") -@Parameter(key = "input") -@Parameter(key = "numOrientations") -@Parameter(key = "spanOfNeighborhood") -@Parameter(key = "executorService") -@Parameter(key = "output") class HistogramOfOrientedGradients2DFunction> implements Functions.Arity4, Integer, Integer, ExecutorService, RandomAccessibleInterval> { @@ -288,6 +285,15 @@ class HistogramOfOrientedGradients2DFunction> implements @OpDependency(name = "features.hog") private Computers.Arity4, Integer, Integer, ExecutorService, RandomAccessibleInterval> hogOp; + /** + * TODO + * + * @param input + * @param numOrientations + * @param spanOfNeighborhood + * @param executorService + * @return the output + */ @Override public RandomAccessibleInterval apply(final RandomAccessibleInterval input, final Integer numOrientations, final Integer spanOfNeighborhood, final ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/lbp2d/DefaultLBP2D.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/lbp2d/DefaultLBP2D.java index a68e06242..2e4cdc533 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/lbp2d/DefaultLBP2D.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/lbp2d/DefaultLBP2D.java @@ -43,11 +43,9 @@ import net.imglib2.view.Views; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of 2d local binary patterns @@ -56,16 +54,20 @@ * @param */ @Plugin(type = Op.class, name = "features.lbp2d") -@Parameter(key = "input") -@Parameter(key = "distance") -@Parameter(key = "histogramSize") -@Parameter(key = "output") public class DefaultLBP2D> implements Functions.Arity3, Integer, Integer, ArrayList> { @OpDependency(name = "image.histogram") private BiFunction, Integer, Histogram1d> histOp; + /** + * TODO + * + * @param input + * @param distance + * @param histogramSize + * @return the output + */ @Override public ArrayList apply(RandomAccessibleInterval input, Integer distance, Integer histogramSize) { ArrayList output = new ArrayList<>(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultCoarsenessFeature.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultCoarsenessFeature.java index 07dbe8dcf..66c1ba012 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultCoarsenessFeature.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultCoarsenessFeature.java @@ -48,11 +48,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -64,8 +62,6 @@ * @param */ @Plugin(type = Op.class, name = "features.tamura.coarseness") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCoarsenessFeature, O extends RealType> implements Computers.Arity1, O> { @@ -74,6 +70,12 @@ public class DefaultCoarsenessFeature, O extends RealType< OutOfBoundsFactory>, RandomAccessibleInterval> meanOp; @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { if (input.numDimensions() != 2) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultContrastFeature.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultContrastFeature.java index 394242a66..340f612c2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultContrastFeature.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultContrastFeature.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of tamura feature contrast. @@ -46,8 +44,6 @@ * @author Andreas Graumann (University of Konstanz) */ @Plugin(type = Op.class, name = "features.tamura.contrast") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultContrastFeature, O extends RealType> implements Computers.Arity1, O> { @@ -58,6 +54,12 @@ public class DefaultContrastFeature, O extends RealType @OpDependency(name = "stats.stdDev") private Function, O> stdOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final IterableInterval input, final O output) { if (input.numDimensions() != 2) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultDirectionalityFeature.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultDirectionalityFeature.java index b4c5baad8..12b01d909 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultDirectionalityFeature.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/tamura2d/DefaultDirectionalityFeature.java @@ -45,11 +45,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of Tamura's Directionality Feature @@ -60,9 +58,6 @@ */ @SuppressWarnings("rawtypes") @Plugin(type = Op.class, name = "features.tamura.directionality") -@Parameter(key = "input") -@Parameter(key = "histogramSize") -@Parameter(key = "output") public class DefaultDirectionalityFeature, O extends RealType> implements Computers.Arity2, Integer, O> { @@ -74,6 +69,13 @@ public class DefaultDirectionalityFeature, O extends RealT private BiFunction> imgCreator; @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param histogramSize + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, Integer histogramSize, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultMagnitudeFeature.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultMagnitudeFeature.java index 184425dea..554480e07 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultMagnitudeFeature.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultMagnitudeFeature.java @@ -28,18 +28,15 @@ */ package net.imagej.ops2.features.zernike; -import net.imagej.ops2.features.zernike.helper.ZernikeMoment; import net.imglib2.IterableInterval; import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -51,16 +48,20 @@ * Input Type */ @Plugin(type = Op.class, name = "features.zernike.magnitude") -@Parameter(key = "input") -@Parameter(key = "order") -@Parameter(key = "repetition") -@Parameter(key = "output") public class DefaultMagnitudeFeature> implements Computers.Arity3, Integer, Integer, DoubleType> { @OpDependency(name = "features.zernike.computer") private Functions.Arity3, Integer, Integer, ZernikeMoment> zernikeOp; + /** + * TODO + * + * @param input + * @param order + * @param repetition + * @param output + */ @Override public void compute(IterableInterval input, Integer order, Integer repetition, DoubleType output) { if (input.numDimensions() != 2) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultPhaseFeature.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultPhaseFeature.java index 20cc83e62..482bf6e59 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultPhaseFeature.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/DefaultPhaseFeature.java @@ -28,18 +28,15 @@ */ package net.imagej.ops2.features.zernike; -import net.imagej.ops2.features.zernike.helper.ZernikeMoment; import net.imglib2.IterableInterval; import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -53,16 +50,20 @@ * Output Type */ @Plugin(type = Op.class, name = "features.zernike.phase") -@Parameter(key = "input") -@Parameter(key = "order") -@Parameter(key = "repetition") -@Parameter(key = "output") public class DefaultPhaseFeature> implements Computers.Arity3, Integer, Integer, DoubleType> { @OpDependency(name = "features.zernike.computer") private Functions.Arity3, Integer, Integer, ZernikeMoment> zernikeOp; + /** + * TODO + * + * @param input + * @param order + * @param repetition + * @param output + */ @Override public void compute(IterableInterval input, Integer order, Integer repetition, DoubleType output) { if (input.numDimensions() != 2) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/Polynom.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/Polynom.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/Polynom.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/Polynom.java index 6041c4f6d..9600ee424 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/Polynom.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/Polynom.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.features.zernike.helper; +package net.imagej.ops2.features.zernike; /** * class used to represent a zernike moment polynomial. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/ZernikeComputer.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/ZernikeComputer.java similarity index 96% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/ZernikeComputer.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/ZernikeComputer.java index 49db9fb4d..bb204bd96 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/ZernikeComputer.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/ZernikeComputer.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.features.zernike.helper; +package net.imagej.ops2.features.zernike; import net.imagej.types.BigComplex; import net.imglib2.Cursor; @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Functions; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @@ -46,13 +44,17 @@ * @author Andreas Graumann (University of Konstanz) */ @Plugin(type = Op.class, name = "features.zernike.computer") -@Parameter(key = "input") -@Parameter(key = "order") -@Parameter(key = "repetition") -@Parameter(key = "zernikeMoment") public class ZernikeComputer> implements Functions.Arity3, Integer, Integer, ZernikeMoment> { + /** + * TODO + * + * @param input + * @param order + * @param repetition + * @param zernikeMoment + */ @Override public ZernikeMoment apply(final IterableInterval ii, final Integer order, final Integer repetition) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/ZernikeMoment.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/ZernikeMoment.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/ZernikeMoment.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/ZernikeMoment.java index f70c33a8b..faac05240 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/helper/ZernikeMoment.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/features/zernike/ZernikeMoment.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.features.zernike.helper; +package net.imagej.ops2.features.zernike; import net.imagej.types.BigComplex; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/FFTMethodsLinearFFTFilterC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/FFTMethodsLinearFFTFilterC.java index ee104ee03..91965bf33 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/FFTMethodsLinearFFTFilterC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/FFTMethodsLinearFFTFilterC.java @@ -40,11 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Convolve op for (@link RandomAccessibleInterval) @@ -56,15 +54,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.linearFilter", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "fftInput") -@Parameter(key = "fftKernel") -@Parameter(key = "performInputFFT") -@Parameter(key = "performKernelFFT") -@Parameter(key = "executorService") -@Parameter(key = "frequencyOp") -@Parameter(key = "output") public class FFTMethodsLinearFFTFilterC, O extends RealType, K extends RealType, C extends ComplexType> implements Computers.Arity8, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, Boolean, Boolean, ExecutorService, Computers.Arity2, RandomAccessibleInterval, RandomAccessibleInterval>, RandomAccessibleInterval> { @@ -83,6 +72,19 @@ public class FFTMethodsLinearFFTFilterC, O extends RealTyp /** * Perform convolution by multiplying the FFTs in the frequency domain */ + /** + * TODO + * + * @param input + * @param kernel + * @param fftInput + * @param fftKernel + * @param performInputFFT + * @param performKernelFFT + * @param executorService + * @param frequencyOp + * @param output + */ @Override public void compute(final RandomAccessibleInterval in, final RandomAccessibleInterval kernel, final RandomAccessibleInterval fftInput, final RandomAccessibleInterval fftKernel, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/addNoise/NoiseAdders.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/addNoise/NoiseAdders.java index 8d301483f..728f9018a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/addNoise/NoiseAdders.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/addNoise/NoiseAdders.java @@ -37,11 +37,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Contains Ops designed to add noise to populated images. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/bilateral/DefaultBilateral.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/bilateral/DefaultBilateral.java index 98ed14dc1..15f4947a8 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/bilateral/DefaultBilateral.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/bilateral/DefaultBilateral.java @@ -41,10 +41,8 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Performs a bilateral filter on an image. @@ -55,11 +53,6 @@ */ @Plugin(type = Op.class, name = "filter.bilateral") -@Parameter(key = "inputRAI", description = "the input data") -@Parameter(key = "sigmaR", description = "range smoothing param, larger sigma means larger effect of intensity differences.") -@Parameter(key = "sigmaS", description = "spatial smoothing param, larger sigma means smoother image.") -@Parameter(key = "radius", description = "defines size of the square of pixels considered at each iteration.") -@Parameter(key = "outputRAI") public class DefaultBilateral, O extends RealType> implements Computers.Arity4, Double, Double, Integer, RandomAccessibleInterval> { @@ -86,6 +79,15 @@ private double getDistance(long[] x, long[] y) { return Math.sqrt(distance); } + /** + * TODO + * + * @param inputRAI the input data + * @param sigmaR range smoothing param, larger sigma means larger effect of intensity differences. + * @param sigmaS spatial smoothing param, larger sigma means smoother image. + * @param radius defines size of the square of pixels considered at each iteration. + * @param outputRAI + */ @Override public void compute(final RandomAccessibleInterval input, final Double sigmaR, final Double sigmaS, final Integer radius, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTC.java index 39bb7a2ad..df00b0e52 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTC.java @@ -37,11 +37,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Convolve op for (@link RandomAccessibleInterval) @@ -53,14 +51,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.convolve", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "fftInput") -@Parameter(key = "fftKernel") -@Parameter(key = "performInputFFT") -@Parameter(key = "performKernelFFT") -@Parameter(key = "executorService") -@Parameter(key = "output") public class ConvolveFFTC, O extends RealType, K extends RealType, C extends ComplexType> implements Computers.Arity7, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, Boolean, Boolean, ExecutorService, RandomAccessibleInterval> { @@ -73,6 +63,18 @@ public class ConvolveFFTC, O extends RealType, K extend /** * Call the linear filter that is set up to perform convolution */ + /** + * TODO + * + * @param input + * @param kernel + * @param fftInput + * @param fftKernel + * @param performInputFFT + * @param performKernelFFT + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in, RandomAccessibleInterval kernel, RandomAccessibleInterval fftInput, RandomAccessibleInterval fftKernel, Boolean performInputFFT, @@ -82,12 +84,6 @@ public void compute(RandomAccessibleInterval in, RandomAccessibleInterval } @Plugin(type = Op.class, name = "filter.convolve", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "fftInput") -@Parameter(key = "fftKernel") -@Parameter(key = "executorService") -@Parameter(key = "output") class ConvolveFFTCSimple, O extends RealType, K extends RealType, C extends ComplexType> implements Computers.Arity5, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, ExecutorService, RandomAccessibleInterval> { @@ -95,6 +91,16 @@ class ConvolveFFTCSimple, O extends RealType, K extends @OpDependency(name = "filter.convolve") private Computers.Arity7, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, Boolean, Boolean, ExecutorService, RandomAccessibleInterval> convolveOp; + /** + * TODO + * + * @param input + * @param kernel + * @param fftInput + * @param fftKernel + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in, RandomAccessibleInterval kernel, RandomAccessibleInterval fftInput, RandomAccessibleInterval fftKernel, ExecutorService es, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTF.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTF.java index 0006e1812..14ca4e3e7 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTF.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveFFTF.java @@ -47,11 +47,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Convolve op for (@link Img) @@ -63,14 +61,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.convolve", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "borderSize") -@Parameter(key = "obfInput") -@Parameter(key = "outType") -@Parameter(key = "fftType") -@Parameter(key = "executorService") -@Parameter(key = "output") public class ConvolveFFTF & NativeType, O extends RealType & NativeType, K extends RealType & NativeType, C extends ComplexType & NativeType> /* extends AbstractFFTFilterF */ implements Functions.Arity7, RandomAccessibleInterval, long[], OutOfBoundsFactory>, O, C, ExecutorService, RandomAccessibleInterval> { @@ -91,6 +81,18 @@ public class ConvolveFFTF & NativeType, O extends RealT @OpDependency(name = "filter.convolve") private Computers.Arity7, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, Boolean, Boolean, ExecutorService, RandomAccessibleInterval> convolveOp; + /** + * TODO + * + * @param input + * @param kernel + * @param borderSize + * @param obfInput + * @param outType + * @param fftType + * @param executorService + * @return the output + */ @Override public RandomAccessibleInterval apply(final RandomAccessibleInterval input, final RandomAccessibleInterval kernel, final long[] borderSize, @@ -164,10 +166,6 @@ public Computers.Arity2, RandomAccessibleInterval } @Plugin(type = Op.class, name = "filter.convolve", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "executorService") -@Parameter(key = "output") class SimpleConvolveFFTF & NativeType, O extends RealType & NativeType, K extends RealType & NativeType, C extends ComplexType & NativeType> implements Functions.Arity3, RandomAccessibleInterval, ExecutorService, RandomAccessibleInterval> { @@ -175,7 +173,15 @@ class SimpleConvolveFFTF & NativeType, O extends RealTy @OpDependency(name = "filter.convolve") Functions.Arity7, RandomAccessibleInterval, long[], OutOfBoundsFactory>, FloatType, ComplexFloatType, ExecutorService, RandomAccessibleInterval> convolveOp; - @Override + /** + * TODO + * + * @param input + * @param kernel + * @param executorService + * @return the output + */ + @Override public RandomAccessibleInterval apply(RandomAccessibleInterval t, RandomAccessibleInterval u, ExecutorService es) { OutOfBoundsFactory> obfInput = new OutOfBoundsConstantValueFactory<>(Util .getTypeFromInterval(t).createVariable()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveC.java index 537e77a5d..96a14142b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveC.java @@ -39,24 +39,26 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Convolves an image naively. */ @Plugin(type = Op.class, name = "filter.convolve") -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "output") public class ConvolveNaiveC, K extends RealType, O extends RealType> implements Computers.Arity2, RandomAccessibleInterval, RandomAccessibleInterval> { // TODO: should this be binary so we can use different kernels?? Not sure.. what // if someone tried to re-use // with a big kernel that should be matched with ConvolveFFT + /** + * TODO + * + * @param input + * @param kernel + * @param output + */ @Override public void compute(final RandomAccessible input, final RandomAccessibleInterval kernel, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveF.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveF.java index 797544e74..2c3bbf6f8 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveF.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/convolve/ConvolveNaiveF.java @@ -45,21 +45,14 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Convolves an image naively (no FFTs). */ @Plugin(type = Op.class, name = "filter.convolve", priority = Priority.HIGH + 1) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "outType") -@Parameter(key = "output") public class ConvolveNaiveF, O extends RealType & NativeType, K extends RealType> implements Functions.Arity4, RandomAccessibleInterval, OutOfBoundsFactory>, O, RandomAccessibleInterval> { @@ -97,6 +90,15 @@ public RandomAccessibleInterval createOutput(RandomAccessibleInterval inpu return createOp.apply(input, outType.createVariable()); } + /** + * TODO + * + * @param input + * @param kernel + * @param outOfBoundsFactory + * @param outType + * @return the output + */ @Override public RandomAccessibleInterval apply(final RandomAccessibleInterval input, final RandomAccessibleInterval kernel, OutOfBoundsFactory> obf, @@ -131,9 +133,6 @@ public RandomAccessibleInterval apply(final RandomAccessibleInterval input } @Plugin(type = Op.class, name = "filter.convolve", priority = Priority.HIGH + 1) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "output") class SimpleConvolveNaiveF, O extends RealType & NativeType, K extends RealType> implements BiFunction, RandomAccessibleInterval, RandomAccessibleInterval> { @@ -141,6 +140,13 @@ class SimpleConvolveNaiveF, O extends RealType & Native @OpDependency(name = "filter.convolve") Functions.Arity4, RandomAccessibleInterval, OutOfBoundsFactory>, O, RandomAccessibleInterval> convolveOp; + /** + * TODO + * + * @param input + * @param kernel + * @return the output + */ @Override public RandomAccessibleInterval apply(RandomAccessibleInterval t, RandomAccessibleInterval u) { return convolveOp.apply(t, u, null, null); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTC.java index 03c1bf7ab..c6404ecb2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTC.java @@ -36,11 +36,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Correlate op for (@link RandomAccessibleInterval) @@ -52,14 +50,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.correlate") -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "fftInput") -@Parameter(key = "fftKernel") -@Parameter(key = "performInputFFT") -@Parameter(key = "performKernelFFT") -@Parameter(key = "executorService") -@Parameter(key = "output") public class CorrelateFFTC, O extends RealType, K extends RealType, C extends ComplexType> implements Computers.Arity7, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, Boolean, Boolean, ExecutorService, RandomAccessibleInterval> { @@ -77,6 +67,18 @@ public class CorrelateFFTC, O extends RealType, K exten /** * Call the linear filter that is set up to perform correlation */ + /** + * TODO + * + * @param input + * @param kernel + * @param fftInput + * @param fftKernel + * @param performInputFFT + * @param performKernelFFT + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval input, RandomAccessibleInterval kernel, RandomAccessibleInterval fftInput, RandomAccessibleInterval fftKernel, Boolean performInputFFT, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTF.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTF.java index 3b4569530..23262a689 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTF.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/correlate/CorrelateFFTF.java @@ -44,11 +44,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Correlate op for (@link Img) @@ -60,15 +58,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.correlate", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "kernel") -@Parameter(key = "borderSize") -@Parameter(key = "obfInput") -@Parameter(key = "obfKernel") -@Parameter(key = "outType") -@Parameter(key = "fftType") -@Parameter(key = "executorService") -@Parameter(key = "output") public class CorrelateFFTF & NativeType, O extends RealType & NativeType, K extends RealType & NativeType, C extends ComplexType & NativeType> // extends AbstractFFTFilterF implements Functions.Arity8, RandomAccessibleInterval, long[], OutOfBoundsFactory>, OutOfBoundsFactory>, O, C, ExecutorService, RandomAccessibleInterval> { @@ -89,6 +78,19 @@ public class CorrelateFFTF & NativeType, O extends Real @OpDependency(name = "filter.correlate") private Computers.Arity7, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, Boolean, Boolean, ExecutorService, RandomAccessibleInterval> correlateOp; + /** + * TODO + * + * @param input + * @param kernel + * @param borderSize + * @param obfInput + * @param obfKernel + * @param outType + * @param fftType + * @param executorService + * @return the output + */ @Override public RandomAccessibleInterval apply(final RandomAccessibleInterval input, final RandomAccessibleInterval kernel, final long[] borderSize, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativeRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativeRAI.java index f65b8beb9..7afd45eb1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativeRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativeRAI.java @@ -41,11 +41,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Calculates the derivative (with sobel kernel) of an image in a given @@ -57,9 +55,6 @@ * type of input */ @Plugin(type = Op.class, name = "filter.partialDerivative") -@Parameter(key = "input") -@Parameter(key = "dimension") -@Parameter(key = "output") public class PartialDerivativeRAI> implements Computers.Arity2, Integer, RandomAccessibleInterval> { @@ -172,6 +167,13 @@ public void setupConvolves(RandomAccessibleInterval input, Integer dimension) } + /** + * TODO + * + * @param input + * @param dimension + * @param output + */ @Override public void compute(RandomAccessibleInterval input, final Integer dimension, RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativesRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativesRAI.java index 7bff4e2ee..f539a8a5c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativesRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivative/PartialDerivativesRAI.java @@ -39,11 +39,9 @@ import net.imglib2.view.composite.RealComposite; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Convenience op for partial derivatives. Calculates all partial derivatives @@ -56,8 +54,6 @@ */ @Plugin(type = Op.class, name = "filter.partialDerivative") -@Parameter(key = "input") -@Parameter(key = "outputComposite") public class PartialDerivativesRAI> implements Function, CompositeIntervalView>> { @@ -67,6 +63,12 @@ public class PartialDerivativesRAI> @OpDependency(name = "create.img") private Function, RandomAccessibleInterval> imgCreator; + /** + * TODO + * + * @param input + * @return the outputComposite + */ @Override public CompositeIntervalView> apply(RandomAccessibleInterval input) { List> derivatives = new ArrayList<>(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivativeGauss/DefaultDerivativeGauss.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivativeGauss/DefaultDerivativeGauss.java index 2ad2d5201..f94224126 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivativeGauss/DefaultDerivativeGauss.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/derivativeGauss/DefaultDerivativeGauss.java @@ -42,11 +42,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Performs the 2-D partial derivative Gaussian kernel convolutions on an image, @@ -55,10 +53,6 @@ * @author Gabe Selzer */ @Plugin(type = Op.class, name = "filter.derivativeGauss") -@Parameter(key = "input") -@Parameter(key = "sigma", description = "the sigma in each dimension of the gaussian") -@Parameter(key = "derivatives", description = "the value at each index indicates the derivative to take in each dimension of the image.") -@Parameter(key = "output") public class DefaultDerivativeGauss> implements Computers.Arity3, double[], int[], RandomAccessibleInterval> { @@ -279,6 +273,14 @@ private > void convolve_n(final RandomAccessibleInterval input, final double[] sigma, final int[] derivatives, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DefaultDoG.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DefaultDoG.java index b7f8bf174..e36bdbbe2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DefaultDoG.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DefaultDoG.java @@ -39,11 +39,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Low-level difference of Gaussians (DoG) implementation which leans on other @@ -54,10 +52,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.DoG") -@Parameter(key = "input") -@Parameter(key = "gauss1") -@Parameter(key = "gauss2") -@Parameter(key = "output") public class DefaultDoG & NativeType> implements Computers.Arity3, Computers.Arity1, RandomAccessibleInterval>, Computers.Arity1, RandomAccessibleInterval>, RandomAccessibleInterval> { @@ -67,6 +61,14 @@ public class DefaultDoG & NativeType> implements @OpDependency(name = "math.subtract") private Computers.Arity2, RandomAccessibleInterval, RandomAccessibleInterval> subtractor; + /** + * TODO + * + * @param input + * @param gauss1 + * @param gauss2 + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Computers.Arity1, RandomAccessibleInterval> gauss1, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DoGVaryingSigmas.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DoGVaryingSigmas.java index ac8df07b9..8cb391b08 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DoGVaryingSigmas.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/dog/DoGVaryingSigmas.java @@ -37,11 +37,9 @@ import net.imglib2.type.numeric.NumericType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Difference of Gaussians (DoG) implementation where sigmas can vary by @@ -51,12 +49,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.DoG") -@Parameter(key = "input") -@Parameter(key = "sigmas1") -@Parameter(key = "sigmas2") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "executorService") -@Parameter(key = "output") public class DoGVaryingSigmas & NativeType> implements Computers.Arity5, double[], double[], OutOfBoundsFactory>, ExecutorService, RandomAccessibleInterval> { @@ -69,6 +61,16 @@ public class DoGVaryingSigmas & NativeType> implemen Computers.Arity1, RandomAccessibleInterval>, RandomAccessibleInterval> dogOp; //TODO: make the outOfBoundsFactory optional (see DoGTest for the default). + /** + * TODO + * + * @param input + * @param sigmas1 + * @param sigmas2 + * @param outOfBoundsFactory + * @param executorService + * @param output + */ @Override public void compute(final RandomAccessibleInterval t, final double[] sigmas1, // final double[] sigmas2, final OutOfBoundsFactory> fac, @@ -87,12 +89,6 @@ public void compute(final RandomAccessibleInterval t, final double[] sigmas1, } @Plugin(type = Op.class, name = "filter.DoG") -@Parameter(key = "input") -@Parameter(key = "sigma1") -@Parameter(key = "sigma2") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "executorService") -@Parameter(key = "output") class DoGSingleSigma & NativeType> implements Computers.Arity5, Double, Double, OutOfBoundsFactory>, ExecutorService, RandomAccessibleInterval> { @@ -100,6 +96,16 @@ class DoGSingleSigma & NativeType> implements private Computers.Arity5, double[], double[], // OutOfBoundsFactory>, ExecutorService, RandomAccessibleInterval> dogOp; + /** + * TODO + * + * @param input + * @param sigma1 + * @param sigma2 + * @param outOfBoundsFactory + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in1, Double in2, Double in3, OutOfBoundsFactory> in4, ExecutorService in5, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/CreateOutputFFTMethods.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/CreateOutputFFTMethods.java index 2b42c4656..96803afd6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/CreateOutputFFTMethods.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/CreateOutputFFTMethods.java @@ -35,11 +35,9 @@ import net.imglib2.img.Img; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Function that creates an output for FFTMethods FFT @@ -48,15 +46,19 @@ * @param */ @Plugin(type = Op.class, name = "filter.createFFTOutput") -@Parameter(key = "Dimensions") -@Parameter(key = "outType") -@Parameter(key = "fast") -@Parameter(key = "output") public class CreateOutputFFTMethods implements Functions.Arity3> { @OpDependency(name = "create.img") private BiFunction> create; + /** + * TODO + * + * @param Dimensions + * @param outType + * @param fast + * @return the output + */ @Override public Img apply(Dimensions paddedDimensions, T outType, Boolean fast) { @@ -69,13 +71,17 @@ public Img apply(Dimensions paddedDimensions, T outType, Boolean fast) { } @Plugin(type = Op.class, name = "filter.createFFTOutput") -@Parameter(key = "Dimensions") -@Parameter(key = "outType") -@Parameter(key = "output") class CreateOutputFFTMethodsSimple implements BiFunction> { @OpDependency(name = "filter.createFFTOutput") private Functions.Arity3> create; + /** + * TODO + * + * @param Dimensions + * @param outType + * @return the output + */ @Override public Img apply(Dimensions paddedDimensions, T outType) { return create.apply(paddedDimensions, outType, true); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpC.java index 3af33a528..197f0aba9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpC.java @@ -38,10 +38,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Forward FFT computer that operates on an RAI and wraps FFTMethods. The input @@ -54,9 +52,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.fft", priority = Priority.NORMAL) -@Parameter(key = "input") -@Parameter(key = "executorService") -@Parameter(key = "output") public class FFTMethodsOpC, C extends ComplexType> implements Computers.Arity2, ExecutorService, RandomAccessibleInterval> { @@ -64,6 +59,13 @@ public class FFTMethodsOpC, C extends ComplexType> /** * Computes an ND FFT using FFTMethods */ + /** + * TODO + * + * @param input + * @param executorService + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final ExecutorService es, final RandomAccessibleInterval output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpF.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpF.java index 66418d2ed..db51050d9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpF.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fft/FFTMethodsOpF.java @@ -41,11 +41,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Function that uses FFTMethods to perform a forward FFT @@ -57,12 +55,6 @@ * TODO Documentation */ @Plugin(type = Op.class, name = "filter.fft", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "borderSize", description = "the size of border to apply in each dimension") -@Parameter(key = "fast", description = "whether to perform a fast FFT; default true") -@Parameter(key = "fftType", description = "the complex type of the output") -@Parameter(key = "executorService") -@Parameter(key = "output") public class FFTMethodsOpF, C extends ComplexType> implements Functions.Arity5, long[], Boolean, C, ExecutorService, RandomAccessibleInterval> { @@ -82,6 +74,16 @@ public class FFTMethodsOpF, C extends ComplexType> impl * FFT implementation the input will be extended to the nearest size that is * supported. */ + /** + * TODO + * + * @param input + * @param borderSize the size of border to apply in each dimension + * @param fast whether to perform a fast FFT; default true + * @param fftType the complex type of the output + * @param executorService + * @return the output + */ @Override public RandomAccessibleInterval apply(final RandomAccessibleInterval input, final long[] borderSize, final Boolean fast, final C fftType, final ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTMethodsSize.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTMethodsSize.java index 4e24a3aee..215d9a299 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTMethodsSize.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTMethodsSize.java @@ -33,10 +33,8 @@ import net.imglib2.algorithm.fft2.FFTMethods; import org.scijava.function.Functions; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op that calculates FFT sizes. @@ -44,12 +42,16 @@ * @author Brian Northan */ @Plugin(type = Op.class, name = "filter.fftSize") -@Parameter(key = "dimensions") -@Parameter(key = "forward") -@Parameter(key = "fast") -@Parameter(key = "output") public class ComputeFFTMethodsSize implements Functions.Arity3 { + /** + * TODO + * + * @param dimensions + * @param forward + * @param fast + * @return the output + */ @Override public long[][] apply(Dimensions inputDimensions, Boolean forward, Boolean fast) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTSize.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTSize.java index 48306651f..1e99b6a63 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTSize.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/ComputeFFTSize.java @@ -37,10 +37,8 @@ import net.imglib2.util.ValuePair; import org.scijava.function.Functions; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op that calculates FFT sizes. @@ -48,14 +46,18 @@ * @author Brian Northan */ @Plugin(type = Op.class, name = "filter.fftSize") -@Parameter(key = "inputDimensions") -@Parameter(key = "paddedSize") -@Parameter(key = "fftSize") -@Parameter(key = "forward") -@Parameter(key = "fast") -@Parameter(key = "outputs") public class ComputeFFTSize implements Functions.Arity5> { + /** + * TODO + * + * @param inputDimensions + * @param paddedSize + * @param fftSize + * @param forward + * @param fast + * @return the outputs + */ @Override public Pair apply(Dimensions inputDimensions, long[] paddedSize, long[] fftSize, Boolean forward, Boolean fast) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/DefaultComputeFFTSize.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/DefaultComputeFFTSize.java index 3d876ad81..3cab630f1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/DefaultComputeFFTSize.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/fftSize/DefaultComputeFFTSize.java @@ -33,10 +33,8 @@ import net.imglib2.Dimensions; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op that calculates FFT fast sizes according to the following logic. @@ -48,11 +46,15 @@ * @author Brian Northan */ @Plugin(type = Op.class, name = "filter.fftSize") -@Parameter(key = "dimensions") -@Parameter(key = "powerOfTwo") -@Parameter(key = "outputSizes") public class DefaultComputeFFTSize implements BiFunction { + /** + * TODO + * + * @param dimensions + * @param powerOfTwo + * @return the outputSizes + */ @Override public long[][] apply(Dimensions inputDimensions, Boolean powerOfTwo) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/gauss/Gaussians.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/gauss/Gaussians.java index efda100d6..d50fbab61 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/gauss/Gaussians.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/gauss/Gaussians.java @@ -47,11 +47,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link OpCollection} containing various wrappings of Gaussian operations. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/hessian/HessianRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/hessian/HessianRAI.java index 225b75627..af3098ab6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/hessian/HessianRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/hessian/HessianRAI.java @@ -39,11 +39,9 @@ import net.imglib2.view.composite.RealComposite; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Hessian filter using the sobel filter with separated kernel. @@ -55,8 +53,6 @@ */ @Plugin(type = Op.class, name = "filter.hessian") -@Parameter(key = "input") -@Parameter(key = "output") public class HessianRAI> implements Function, CompositeIntervalView>> { @@ -66,6 +62,12 @@ public class HessianRAI> @OpDependency(name = "create.img") private Function, RandomAccessibleInterval> createRAI; + /** + * TODO + * + * @param input + * @return the output + */ @Override public CompositeIntervalView> apply(RandomAccessibleInterval input) { List> derivatives = new ArrayList<>(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpC.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpC.java index 248e836ac..472bb4311 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpC.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpC.java @@ -38,11 +38,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Inverse FFT computer that operates on an RAI and wraps FFTMethods. The input @@ -55,9 +53,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.ifft") -@Parameter(key = "input") -@Parameter(key = "executorService") -@Parameter(key = "output") public class IFFTMethodsOpC, T extends RealType> implements Computers.Arity2, ExecutorService, RandomAccessibleInterval> { @@ -67,6 +62,13 @@ public class IFFTMethodsOpC, T extends RealType> /** * Compute an ND inverse FFT */ + /** + * TODO + * + * @param input + * @param executorService + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final ExecutorService es, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpI.java index 9b7397701..81cd2fc25 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/ifft/IFFTMethodsOpI.java @@ -36,10 +36,8 @@ import net.imglib2.type.numeric.ComplexType; import org.scijava.function.Inplaces; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Inverse FFT inplace operator -- complex to complex only, output size must @@ -50,14 +48,18 @@ * @author Brian Northan */ @Plugin(type = Op.class, name = "filter.ifft") -@Parameter(key = "input") -@Parameter(key = "executorService") public class IFFTMethodsOpI> implements Inplaces.Arity2_1, ExecutorService> { /** * Compute an ND inverse FFT */ + /** + * TODO + * + * @param input + * @param executorService + */ @Override public void mutate(final RandomAccessibleInterval inout, final ExecutorService es) { if (!conforms(inout)) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/max/DefaultMaxFilter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/max/DefaultMaxFilter.java index 151f2dfe5..b7bb2f157 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/max/DefaultMaxFilter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/max/DefaultMaxFilter.java @@ -36,11 +36,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of {@link MaxFilterOp}. @@ -50,10 +48,6 @@ * type */ @Plugin(type = Op.class, name = "filter.max") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class DefaultMaxFilter implements Computers.Arity3, Shape, OutOfBoundsFactory>, RandomAccessibleInterval> { @@ -63,6 +57,14 @@ public class DefaultMaxFilter implements @OpDependency(name = "map.neighborhood") private Computers.Arity3, Shape, Computers.Arity1, V>, RandomAccessibleInterval> mapper; + /** + * TODO + * + * @param input + * @param shape + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final OutOfBoundsFactory> outOfBoundsFactory, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/mean/DefaultMeanFilter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/mean/DefaultMeanFilter.java index 0e017e7c9..d09826505 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/mean/DefaultMeanFilter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/mean/DefaultMeanFilter.java @@ -36,11 +36,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of {@link MeanFilterOp}. @@ -50,10 +48,6 @@ * type */ @Plugin(type = Op.class, name = "filter.mean") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class DefaultMeanFilter implements Computers.Arity3, Shape, OutOfBoundsFactory>, RandomAccessibleInterval> { @@ -63,6 +57,14 @@ public class DefaultMeanFilter implements @OpDependency(name = "map.neighborhood") private Computers.Arity3, Shape, Computers.Arity1, V>, RandomAccessibleInterval> mapper; + /** + * TODO + * + * @param input + * @param shape + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final OutOfBoundsFactory> outOfBoundsFactory, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/median/DefaultMedianFilter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/median/DefaultMedianFilter.java index 3908c0217..fe57f7154 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/median/DefaultMedianFilter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/median/DefaultMedianFilter.java @@ -35,11 +35,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of {@link MedianFilterOp}. @@ -49,10 +47,6 @@ * type */ @Plugin(type = Op.class, name = "filter.median") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class DefaultMedianFilter implements Computers.Arity3, Shape, OutOfBoundsFactory>, RandomAccessibleInterval> { @@ -62,6 +56,14 @@ public class DefaultMedianFilter implements @OpDependency(name = "map.neighborhood") private Computers.Arity3, Shape, Computers.Arity1, V>, RandomAccessibleInterval> mapper; + /** + * TODO + * + * @param input + * @param shape + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final OutOfBoundsFactory> outOfBoundsFactory, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/min/DefaultMinFilter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/min/DefaultMinFilter.java index d4a2622aa..1df004451 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/min/DefaultMinFilter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/min/DefaultMinFilter.java @@ -35,11 +35,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of {@link MinFilterOp}. @@ -49,10 +47,6 @@ * type */ @Plugin(type = Op.class, name = "filter.min") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class DefaultMinFilter implements Computers.Arity3, Shape, OutOfBoundsFactory>, RandomAccessibleInterval> { @@ -62,6 +56,14 @@ public class DefaultMinFilter implements @OpDependency(name = "map.neighborhood") private Computers.Arity3, Shape, Computers.Arity1, V>, RandomAccessibleInterval> mapper; + /** + * TODO + * + * @param input + * @param shape + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final OutOfBoundsFactory> outOfBoundsFactory, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadInputFFT.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadInputFFT.java index 6d6677baa..ac7407b5d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadInputFFT.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadInputFFT.java @@ -37,12 +37,10 @@ import net.imglib2.type.numeric.ComplexType; import org.scijava.Priority; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Adapt; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to pad the image using the default FFT padding scheme. @@ -53,11 +51,6 @@ * @author Brian Northan */ @Plugin(type = Op.class, name = "filter.padInputFFT", priority = Priority.NORMAL) -@Parameter(key = "input") -@Parameter(key = "paddedDimensions") -@Parameter(key = "fast") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class DefaultPadInputFFT, I extends RandomAccessibleInterval, O extends RandomAccessibleInterval> extends PadInputFFT { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadShiftKernelFFT.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadShiftKernelFFT.java index 8de884891..19219157f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadShiftKernelFFT.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/DefaultPadShiftKernelFFT.java @@ -37,12 +37,10 @@ import net.imglib2.type.numeric.ComplexType; import org.scijava.Priority; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Adapt; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to pad the kernel using the default FFT padding scheme and shift the @@ -54,9 +52,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.padShiftFFTKernel", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "paddedDimensions") -@Parameter(key = "output") public class DefaultPadShiftKernelFFT, I extends RandomAccessibleInterval, O extends RandomAccessibleInterval> extends PadShiftKernel { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInput.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInput.java index 717afcd28..f99d011e1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInput.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInput.java @@ -42,11 +42,9 @@ import org.scijava.Priority; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to pad the image by extending the borders @@ -57,10 +55,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.padInput", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "paddedDimensions") -@Parameter(key = "outOfBoundsFactory", description = "The OutOfBoundsFactory used to extend the image") -@Parameter(key = "output") public class PadInput, I extends RandomAccessibleInterval, O extends RandomAccessibleInterval> implements Functions.Arity3>, O> { @@ -69,6 +63,14 @@ public class PadInput, I extends RandomAccessibleInterv @Override @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param paddedDimensions + * @param outOfBoundsFactory The OutOfBoundsFactory used to extend the image + * @return the output + */ public O apply(final I input, final Dimensions paddedDimensions, OutOfBoundsFactory> obf) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFT.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFT.java index 065e91c18..a22e20b2d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFT.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFT.java @@ -43,7 +43,7 @@ import net.imglib2.view.Views; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Abstract Op used to pad the image by extending the borders optionally using diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFTMethods.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFTMethods.java index 969bb082c..0b1527133 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFTMethods.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadInputFFTMethods.java @@ -37,12 +37,10 @@ import org.scijava.Priority; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Adapt; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to pad the image to a size that is compatible with FFTMethods @@ -53,11 +51,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.padInputFFTMethods", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "paddedDimensions") -@Parameter(key = "fast") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class PadInputFFTMethods, I extends RandomAccessibleInterval, O extends RandomAccessibleInterval> extends PadInputFFT { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernel.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernel.java index f46fc3f42..feeebecf8 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernel.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernel.java @@ -40,11 +40,9 @@ import net.imglib2.util.Util; import net.imglib2.view.Views; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to pad a kernel and shift the center of the kernel to the origin @@ -55,9 +53,6 @@ * @param */ @Plugin(type = Op.class, name = "filter.padShiftKernel") -@Parameter(key = "kernel") -@Parameter(key = "paddedDimensions") -@Parameter(key = "output") public class PadShiftKernel, I extends RandomAccessibleInterval, O extends RandomAccessibleInterval> implements BiFunction { @@ -70,6 +65,13 @@ public class PadShiftKernel, I extends RandomAccessible @Override @SuppressWarnings("unchecked") + /** + * TODO + * + * @param kernel + * @param paddedDimensions + * @return the output + */ public O apply(final I kernel, final Dimensions paddedDimensions) { Dimensions paddedFFTInputDimensions; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernelFFTMethods.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernelFFTMethods.java index 853134f9a..b244b17f0 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernelFFTMethods.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PadShiftKernelFFTMethods.java @@ -37,12 +37,10 @@ import org.scijava.Priority; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Adapt; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to pad a kernel to a size that is compatible with FFTMethods and @@ -55,9 +53,6 @@ */ @Plugin(type = Op.class, name = "filter.padShiftKernelFFTMethods", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "paddedDimensions") -@Parameter(key = "output") public class PadShiftKernelFFTMethods, I extends RandomAccessibleInterval, O extends RandomAccessibleInterval> extends PadShiftKernel { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalCentered.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalCentered.java index 7283233f0..99375adcc 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalCentered.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalCentered.java @@ -39,10 +39,8 @@ import net.imglib2.type.numeric.ComplexType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to calculate and return a centered padding interval given an input @@ -54,14 +52,18 @@ * @param */ @Plugin(type = Op.class, name = "filter.padIntervalCentered", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "paddedDimensions") -@Parameter(key = "output") public class PaddingIntervalCentered, I extends RandomAccessibleInterval, O extends Interval> implements BiFunction { @Override @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param paddedDimensions + * @return the output + */ public O apply(final I input, final Dimensions paddedDimensions) { final long[] paddedSize = new long[paddedDimensions.numDimensions()]; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalOrigin.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalOrigin.java index 6f4d426bb..74a441ce6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalOrigin.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/pad/PaddingIntervalOrigin.java @@ -37,10 +37,8 @@ import net.imglib2.type.numeric.ComplexType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Op used to translate the center of an interval the origin. This is needed for @@ -52,14 +50,18 @@ * @param */ @Plugin(type = Op.class, name = "filter.padIntervalOrigin", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "interval") -@Parameter(key = "output") public class PaddingIntervalOrigin, I extends RandomAccessibleInterval, O extends Interval> implements BiFunction { @Override @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param interval + * @return the output + */ public O apply(final I input, final Interval centeredInterval) { int numDimensions = input.numDimensions(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sigma/DefaultSigmaFilter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sigma/DefaultSigmaFilter.java index 1ee6ec4c4..4d01b6f09 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sigma/DefaultSigmaFilter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sigma/DefaultSigmaFilter.java @@ -38,11 +38,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of {@link SigmaFilterOp}. @@ -52,12 +50,6 @@ * type */ @Plugin(type = Op.class, name = "filter.sigma", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "range") -@Parameter(key = "minPixelFraction") -@Parameter(key = "output") public class DefaultSigmaFilter, V extends RealType> implements Computers.Arity5, Shape, OutOfBoundsFactory>, Double, Double, RandomAccessibleInterval> { @@ -67,6 +59,16 @@ public class DefaultSigmaFilter, V extends RealType> im @OpDependency(name = "map.neighborhood") private Computers.Arity3, Shape, Computers.Arity2, T, V>, RandomAccessibleInterval> mapper; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param outOfBoundsFactory + * @param range + * @param minPixelFraction + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, OutOfBoundsFactory> outOfBoundsFactory, final Double range, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sobel/SobelRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sobel/SobelRAI.java index 5c3a7c368..04caa761b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sobel/SobelRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/sobel/SobelRAI.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Sobel filter implementation using separated sobel kernel. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "filter.sobel") -@Parameter(key = "input") -@Parameter(key = "output") public class SobelRAI> implements Computers.Arity1, RandomAccessibleInterval> { @@ -70,6 +66,12 @@ public class SobelRAI> @OpDependency(name = "filter.partialDerivative") private Computers.Arity2, Integer, RandomAccessibleInterval> derivativeComputer; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(RandomAccessibleInterval input, RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/tubeness/DefaultTubeness.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/tubeness/DefaultTubeness.java index 8bf70a8ad..35c72c254 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/tubeness/DefaultTubeness.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/tubeness/DefaultTubeness.java @@ -50,11 +50,9 @@ import org.scijava.Cancelable; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * The Tubeness filter: enhance filamentous structures of a specified thickness. @@ -96,11 +94,6 @@ * the type of the source pixels. Must extends {@link RealType}. */ @Plugin(type = Op.class, name = "filter.tubeness") -@Parameter(key = "input") -@Parameter(key = "executorService") -@Parameter(key = "sigma") -@Parameter(key = "calibration") -@Parameter(key = "output") public class DefaultTubeness> implements Computers.Arity4, ExecutorService, Double, double[], IterableInterval>, Cancelable { @@ -115,6 +108,15 @@ public class DefaultTubeness> implements @OpDependency(name = "project") private Computers.Arity3, Computers.Arity1, DoubleType>, Integer, IterableInterval> projector; + /** + * TODO + * + * @param input + * @param executorService + * @param sigma + * @param calibration + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, ExecutorService es, final Double sigma, final double[] calibration, final IterableInterval tubeness) { @@ -253,16 +255,20 @@ public String getCancelReason() { } @Plugin(type = Op.class, name = "filter.tubeness") -@Parameter(key = "input") -@Parameter(key = "executorService") -@Parameter(key = "sigma") -@Parameter(key = "output") class DefaultTubenessWithoutCalibration> implements Computers.Arity3, ExecutorService, Double, IterableInterval> { @OpDependency(name = "filter.tubeness") Computers.Arity4, ExecutorService, Double, double[], IterableInterval> tubenessOp; + /** + * TODO + * + * @param input + * @param executorService + * @param sigma + * @param output + */ @Override public void compute(RandomAccessibleInterval in1, ExecutorService in2, Double in3, IterableInterval out) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/variance/DefaultVarianceFilter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/variance/DefaultVarianceFilter.java index 1e1893c47..8ebc46764 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/variance/DefaultVarianceFilter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/variance/DefaultVarianceFilter.java @@ -36,11 +36,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of {@link VarianceFilterOp}. @@ -50,10 +48,6 @@ * type */ @Plugin(type = Op.class, name = "filter.variance") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "outOfBoundsFactory") -@Parameter(key = "output") public class DefaultVarianceFilter implements Computers.Arity3, Shape, OutOfBoundsFactory>, RandomAccessibleInterval> { @@ -63,6 +57,14 @@ public class DefaultVarianceFilter implements @OpDependency(name = "map.neighborhood") private Computers.Arity3, Shape, Computers.Arity1, V>, RandomAccessibleInterval> mapper; + /** + * TODO + * + * @param input + * @param shape + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final OutOfBoundsFactory> outOfBoundsFactory, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/vesselness/DefaultFrangi.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/vesselness/DefaultFrangi.java index 8667a1a4b..2cad0c3df 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/vesselness/DefaultFrangi.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/filter/vesselness/DefaultFrangi.java @@ -42,10 +42,8 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; import Jama.EigenvalueDecomposition; import Jama.Matrix; @@ -59,10 +57,6 @@ * @author Gabe Selzer */ @Plugin(type = Op.class, name = "filter.frangiVesselness") -@Parameter(key = "input") -@Parameter(key = "spacing", description = "physicl distance between data points") -@Parameter(key = "scale", description = "size of vessels to search for") -@Parameter(key = "output") public class DefaultFrangi, U extends RealType> implements Computers.Arity3, double[], Integer, RandomAccessibleInterval> { @@ -101,6 +95,14 @@ private double derive(double val1, double val2, double distance) { return ((val2 - val1) / distance); } + /** + * TODO + * + * @param input + * @param spacing physicl distance between data points + * @param scale size of vessels to search for + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final double[] spacing, final Integer scale, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoundarySizeConvexHull.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoundarySizeConvexHull.java index 4aca0d9b6..671b8a0d1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoundarySizeConvexHull.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoundarySizeConvexHull.java @@ -34,7 +34,7 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Generic implementation of diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoxivity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoxivity.java index 27e149371..7b2c6c9ba 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoxivity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractBoxivity.java @@ -34,7 +34,7 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Boxivity}. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractConvexity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractConvexity.java index 9beeb0bc3..835c534e2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractConvexity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractConvexity.java @@ -34,7 +34,7 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Convexity}. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSizeConvexHull.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSizeConvexHull.java index 4eef74f0d..bed78d32e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSizeConvexHull.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSizeConvexHull.java @@ -34,7 +34,7 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.SizeConvexHull} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSolidity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSolidity.java index 9eb2de413..0d8676b5f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSolidity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/AbstractSolidity.java @@ -34,7 +34,7 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Solidity}. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidII.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidII.java index b023b3119..2849c8945 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidII.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidII.java @@ -36,10 +36,8 @@ import net.imglib2.RealPoint; import net.imglib2.roi.IterableRegion; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This {@link Op} computes the centroid of a {@link IterableRegion} (Label). @@ -47,10 +45,14 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.centroid", priority = 1) -@Parameter(key = "input") -@Parameter(key = "centroid") public class CentroidII implements Function, RealLocalizable> { + /** + * TODO + * + * @param input + * @param centroid + */ @Override public RealLocalizable apply(final IterableInterval input) { int numDimensions = input.numDimensions(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidLabelRegion.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidLabelRegion.java index 1db843e60..23cbad356 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidLabelRegion.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidLabelRegion.java @@ -36,10 +36,8 @@ import net.imglib2.roi.IterableRegion; import net.imglib2.roi.labeling.LabelRegion; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This {@link Op} computes the centroid of a {@link IterableRegion} (Label). @@ -47,10 +45,14 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.centroid", priority = 2) -@Parameter(key = "input") -@Parameter(key = "centroid") public class CentroidLabelRegion implements Function, RealLocalizable> { + /** + * TODO + * + * @param input + * @param centroid + */ @Override public RealLocalizable apply(final LabelRegion input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidMesh.java index 062690ae8..01cee9376 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidMesh.java @@ -36,11 +36,9 @@ import net.imglib2.RealPoint; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.centroid}. @@ -50,13 +48,17 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.centroid", label = "Geometric: Centroid") -@Parameter(key = "input") -@Parameter(key = "centroid") public class CentroidMesh implements Function { @OpDependency(name = "geom.size") private Function sizeFunc; + /** + * TODO + * + * @param input + * @param centroid + */ @Override public RealLocalizable apply(final Mesh input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidPolygon.java index 99520c13f..db83cd663 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/CentroidPolygon.java @@ -36,11 +36,9 @@ import net.imglib2.roi.geom.real.Polygon2D; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.centroid}. @@ -48,13 +46,17 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.centroid", label = "Geometric: Center of Gravity") -@Parameter(key = "input") -@Parameter(key = "centroid") public class CentroidPolygon implements Function { @OpDependency(name = "geom.size") private Function sizeFunc; + /** + * TODO + * + * @param input + * @param centroid + */ @Override public RealLocalizable apply(final Polygon2D input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/DefaultCenterOfGravity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/DefaultCenterOfGravity.java index ac6635ad0..3110d17bb 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/DefaultCenterOfGravity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/DefaultCenterOfGravity.java @@ -38,10 +38,8 @@ import net.imglib2.roi.IterableRegion; import net.imglib2.type.numeric.RealType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This {@link Op} computes the center of gravity of a {@link IterableRegion} @@ -50,10 +48,14 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.centerOfGravity") -@Parameter(key = "input") -@Parameter(key = "centerOfGravity") public class DefaultCenterOfGravity> implements Function, RealLocalizable> { + /** + * TODO + * + * @param input + * @param centerOfGravity + */ @Override public RealLocalizable apply(final IterableInterval input) { final int numDimensions = input.numDimensions(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/SizeII.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/SizeII.java index b192e7053..48687d701 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/SizeII.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/SizeII.java @@ -35,10 +35,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Size}. @@ -46,10 +44,14 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.size", label = "Geometric: Size", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "size") public class SizeII implements Function, DoubleType> { + /** + * TODO + * + * @param input + * @param size + */ @Override public DoubleType apply(IterableInterval input) { return new DoubleType(input.size()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundarySizeConvexHullPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundarySizeConvexHullPolygon.java index a3f193347..8ba0b458c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundarySizeConvexHullPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundarySizeConvexHullPolygon.java @@ -33,15 +33,11 @@ import net.imglib2.roi.geom.real.Polygon2D; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boundarySizeConvexHull", label = "Geometric (2D): Perimeter Convex Hull", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "boundarySizeConvexHull") public class DefaultBoundarySizeConvexHullPolygon extends AbstractBoundarySizeConvexHull {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundingBox.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundingBox.java index 6225edb02..9365cf640 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundingBox.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoundingBox.java @@ -39,10 +39,8 @@ import net.imglib2.roi.geom.real.DefaultWritablePolygon2D; import net.imglib2.roi.geom.real.Polygon2D; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.boundingBox}. @@ -50,10 +48,14 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boundingBox") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultBoundingBox implements Function { + /** + * TODO + * + * @param input + * @return the output + */ @Override public Polygon2D apply(final Polygon2D input) { double min_x = Double.POSITIVE_INFINITY; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoxivityPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoxivityPolygon.java index 54bc5a822..8f3059f09 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoxivityPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultBoxivityPolygon.java @@ -33,15 +33,11 @@ import net.imglib2.roi.geom.real.Polygon2D; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boxivity", label = "Geometric (2D): Rectangularity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "boxivity") public class DefaultBoxivityPolygon extends AbstractBoxivity {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultCircularity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultCircularity.java index 3a20ec25a..9030f1ad3 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultCircularity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultCircularity.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.circularity}. @@ -49,8 +47,6 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.circularity", label = "Geometric (2D): Circularity") -@Parameter(key = "input") -@Parameter(key = "circularity") public class DefaultCircularity implements Computers.Arity1 { @OpDependency(name = "geom.size") @@ -58,6 +54,12 @@ public class DefaultCircularity implements Computers.Arity1 perimeterFunc; + /** + * TODO + * + * @param input + * @param circularity + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(4 * Math.PI diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultContour.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultContour.java index 6f032e4c2..8e948c8d4 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultContour.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultContour.java @@ -44,10 +44,8 @@ import net.imglib2.util.Util; import net.imglib2.view.Views; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.contour}. @@ -60,9 +58,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.contour") -@Parameter(key = "input") -@Parameter(key = "useJacobs", description = "Set this flag to use refined Jacobs stopping criteria") -@Parameter(key = "contour") public class DefaultContour> implements BiFunction, Boolean, Polygon2D> { @@ -186,6 +181,13 @@ public void backtrackSpecial() { } } + /** + * TODO + * + * @param input + * @param useJacobs Set this flag to use refined Jacobs stopping criteria + * @param contour + */ @Override public Polygon2D apply(final RandomAccessibleInterval input, final Boolean useJacobs) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexHull2D.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexHull2D.java index c9066467f..c12f3d170 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexHull2D.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexHull2D.java @@ -40,10 +40,8 @@ import net.imglib2.roi.geom.real.DefaultWritablePolygon2D; import net.imglib2.roi.geom.real.Polygon2D; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.convexHull}. @@ -51,10 +49,14 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.convexHull") -@Parameter(key = "input") -@Parameter(key = "convexHull") public class DefaultConvexHull2D implements Function { + /** + * TODO + * + * @param input + * @param convexHull + */ @Override public Polygon2D apply(final Polygon2D input) { // create a copy of points because se will get resorted, etc. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexityPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexityPolygon.java index b454deb6a..77c0d2e50 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexityPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultConvexityPolygon.java @@ -32,15 +32,11 @@ import net.imglib2.roi.geom.real.Polygon2D; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.convexity", label = "Geometric (2D): Convexity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "convexity") public class DefaultConvexityPolygon extends AbstractConvexity {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultEccentricity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultEccentricity.java index 791483e14..9222b465b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultEccentricity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultEccentricity.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.eccentricity}. @@ -50,8 +48,6 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.eccentricity", label = "Geometric (2D): Eccentricity") -@Parameter(key = "input") -@Parameter(key = "eccentricity") public class DefaultEccentricity implements Computers.Arity1 { @OpDependency(name = "geom.minorAxis") @@ -59,6 +55,12 @@ public class DefaultEccentricity implements Computers.Arity1 majorAxisFunc; + /** + * TODO + * + * @param input + * @param eccentricity + */ @Override public void compute(final Polygon2D input, final DoubleType output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultElongation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultElongation.java index cc97bdf64..ad264c898 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultElongation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultElongation.java @@ -38,11 +38,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.mainElongation} based on @@ -52,13 +50,17 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.mainElongation", label = "Geometric (2D): Elongation") -@Parameter(key = "input") -@Parameter(key = "elongation") public class DefaultElongation implements Computers.Arity1 { @OpDependency(name = "geom.smallestEnclosingBoundingBox") private Function minimumBoundingBoxFunc; + /** + * TODO + * + * @param input + * @param elongation + */ @Override public void compute(final Polygon2D input, final DoubleType output) { final List minBB = GeomUtils.vertices(minimumBoundingBoxFunc.apply(input)); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsAngle.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsAngle.java index 592532b78..a1eb93cbe 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsAngle.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsAngle.java @@ -34,10 +34,8 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.feretsAngle}. @@ -45,10 +43,14 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.feretsAngle", label = "Geometric (2D): Ferets Angle") -@Parameter(key = "points") -@Parameter(key = "feretsAngle") public class DefaultFeretsAngle implements Computers.Arity1, DoubleType> { + /** + * TODO + * + * @param points + * @param feretsAngle + */ @Override public void compute(final Pair input, final DoubleType output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameter.java index 820bb73c6..f0618dd4c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameter.java @@ -34,10 +34,8 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.feretsDiameter}. @@ -45,10 +43,14 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.feretsDiameter", label = "Geometric (2D): Ferets Diameter") -@Parameter(key = "points") -@Parameter(key = "feretsDiameter") public class DefaultFeretsDiameter implements Computers.Arity1, DoubleType> { + /** + * TODO + * + * @param points + * @param feretsDiameter + */ @Override public void compute(final Pair input, final DoubleType output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameterForAngle.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameterForAngle.java index 096574a81..c58b8e005 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameterForAngle.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultFeretsDiameterForAngle.java @@ -38,11 +38,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Ferets Diameter for a certain angle. @@ -50,14 +48,18 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.feretsDiameter") -@Parameter(key = "input") -@Parameter(key = "angle") -@Parameter(key = "feretsDiameter") public class DefaultFeretsDiameterForAngle implements Computers.Arity2 { @OpDependency(name = "geom.convexHull") private Function function; + /** + * TODO + * + * @param input + * @param angle + * @param feretsDiameter + */ @Override public void compute(Polygon2D input, final Double angle, DoubleType output) { final List points = GeomUtils.vertices(function.apply(input)); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMajorAxis.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMajorAxis.java index 7f765dd54..8a4b2d566 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMajorAxis.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMajorAxis.java @@ -36,11 +36,9 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.majorAxis}. @@ -48,13 +46,17 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.majorAxis", label = "Geometric (2D): Major Axis") -@Parameter(key = "input") -@Parameter(key = "majorAxis") public class DefaultMajorAxis implements Computers.Arity1 { @OpDependency(name = "geom.secondMoment") private Function> minorMajorAxisFunc; + /** + * TODO + * + * @param input + * @param majorAxis + */ @Override public void compute(final Polygon2D input, final DoubleType output) { output.set(minorMajorAxisFunc.apply(input).getB()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeret.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeret.java index 6108694af..30bc07bcb 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeret.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeret.java @@ -38,11 +38,9 @@ import net.imglib2.util.Pair; import net.imglib2.util.ValuePair; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Maximum Feret of a polygon. @@ -50,13 +48,17 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.maximumFeret") -@Parameter(key = "input") -@Parameter(key = "maximumFeret") public class DefaultMaximumFeret implements Function> { @OpDependency(name = "geom.convexHull") private Function function; + /** + * TODO + * + * @param input + * @param maximumFeret + */ @Override public Pair apply(Polygon2D input) { final List points = GeomUtils.vertices(function.apply(input)); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretAngle.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretAngle.java index 6bf5a59df..b142ca803 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretAngle.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretAngle.java @@ -36,15 +36,11 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "geom.maximumFeretsAngle") -@Parameter(key = "input") -@Parameter(key = "maxFeretsAngle") public class DefaultMaximumFeretAngle implements Computers.Arity1 { @OpDependency(name = "geom.maximumFeret") @@ -52,6 +48,12 @@ public class DefaultMaximumFeretAngle implements Computers.Arity1, DoubleType> feretAngle; + /** + * TODO + * + * @param input + * @param maxFeretsAngle + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(feretAngle.apply(maxFeret.apply(input)).get()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretDiameter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretDiameter.java index 69d967c99..c5716a579 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretDiameter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMaximumFeretDiameter.java @@ -36,15 +36,11 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "geom.maximumFeretsDiameter") -@Parameter(key = "input") -@Parameter(key = "maxFeretsDiameter") public class DefaultMaximumFeretDiameter implements Computers.Arity1 { @OpDependency(name = "geom.maximumFeret") @@ -52,6 +48,12 @@ public class DefaultMaximumFeretDiameter implements Computers.Arity1, DoubleType> feretDiameter; + /** + * TODO + * + * @param input + * @param maxFeretsDiameter + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(feretDiameter.apply(maxFeret.apply(input)).get()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeret.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeret.java index 90755c5d2..32020eeec 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeret.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeret.java @@ -41,11 +41,9 @@ import org.apache.commons.math3.geometry.euclidean.twod.Line; import org.apache.commons.math3.geometry.euclidean.twod.Vector2D; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Minimum Feret of a polygon. @@ -53,13 +51,17 @@ * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.minimumFeret") -@Parameter(key = "input") -@Parameter(key = "minFeret") public class DefaultMinimumFeret implements Function> { @OpDependency(name = "geom.convexHull") private Function function; + /** + * TODO + * + * @param input + * @param minFeret + */ @Override public Pair apply(Polygon2D input) { final List points = GeomUtils.vertices(function.apply(input)); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretAngle.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretAngle.java index 3f692f141..2a72eec09 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretAngle.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretAngle.java @@ -36,15 +36,11 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "geom.minimumFeretsAngle") -@Parameter(key = "input") -@Parameter(key = "minFeretAngle") public class DefaultMinimumFeretAngle implements Computers.Arity1 { @OpDependency(name = "geom.minimumFeret") @@ -52,6 +48,12 @@ public class DefaultMinimumFeretAngle implements Computers.Arity1, DoubleType> feretAngle; + /** + * TODO + * + * @param input + * @param minFeretAngle + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(feretAngle.apply(minFeret.apply(input)).get()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretDiameter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretDiameter.java index 2011676c6..fe6fb5afc 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretDiameter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinimumFeretDiameter.java @@ -36,15 +36,11 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "geom.minimumFeretsDiameter") -@Parameter(key = "input") -@Parameter(key = "minFeretDiameter") public class DefaultMinimumFeretDiameter implements Computers.Arity1 { @OpDependency(name = "geom.minimumFeret") @@ -52,6 +48,12 @@ public class DefaultMinimumFeretDiameter implements Computers.Arity1, DoubleType> feretDiameter; + /** + * TODO + * + * @param input + * @param minFeretDiameter + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(feretDiameter.apply(minFeret.apply(input)).get()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorAxis.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorAxis.java index 05129a14e..f1b9523ee 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorAxis.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorAxis.java @@ -36,11 +36,9 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.minorAxis}. @@ -48,13 +46,17 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.minorAxis", label = "Geometric (2D): Minor Axis") -@Parameter(key = "input") -@Parameter(key = "minorAxis") public class DefaultMinorAxis implements Computers.Arity1 { @OpDependency(name = "geom.secondMoment") private Function> minorMajorAxisFunc; + /** + * TODO + * + * @param input + * @param minorAxis + */ @Override public void compute(final Polygon2D input, final DoubleType output) { output.set(minorMajorAxisFunc.apply(input).getA()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorMajorAxis.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorMajorAxis.java index ee0fccedc..52911be17 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorMajorAxis.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultMinorMajorAxis.java @@ -42,10 +42,8 @@ import net.imglib2.util.Pair; import net.imglib2.util.ValuePair; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.secondMultiVariate}. @@ -53,8 +51,6 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.secondMoment") -@Parameter(key = "input") -@Parameter(key = "minorMajorAxisPair") public class DefaultMinorMajorAxis implements Function> { /** @@ -192,6 +188,12 @@ private double getX(final Polygon2D input, final int index) { return input.vertex(i).getDoublePosition(0); } + /** + * TODO + * + * @param input + * @param minorMajorAxisPair + */ @Override public Pair apply(final Polygon2D input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultPerimeterLength.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultPerimeterLength.java index 7a362083d..decc35cab 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultPerimeterLength.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultPerimeterLength.java @@ -37,10 +37,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.boundarySize}. @@ -48,10 +46,14 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boundarySize", label = "Geometric (2D): Perimeter") -@Parameter(key = "input") -@Parameter(key = "boundarySize") public class DefaultPerimeterLength implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param boundarySize + */ @Override public void compute(final Polygon2D input, final DoubleType output) { double perimeter = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultRoundness.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultRoundness.java index 97e14420a..a22cc2b38 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultRoundness.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultRoundness.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.roundness}. @@ -49,8 +47,6 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.roundness", label = "Geometric (2D): Roundness") -@Parameter(key = "input") -@Parameter(key = "roundness") public class DefaultRoundness implements Computers.Arity1 { @OpDependency(name = "geom.size") @@ -58,6 +54,12 @@ public class DefaultRoundness implements Computers.Arity1 @OpDependency(name = "geom.majorAxis") private Function majorAxisFunc; + /** + * TODO + * + * @param input + * @param roundness + */ @Override public void compute(final Polygon2D input, final DoubleType output) { output.set(4 * (areaFunc.apply(input).getRealDouble() diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizeConvexHullPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizeConvexHullPolygon.java index 23123f3de..35f917f01 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizeConvexHullPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizeConvexHullPolygon.java @@ -33,15 +33,11 @@ import net.imglib2.roi.geom.real.Polygon2D; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.sizeConvexHull", label = "Geometric (2D): Size ConvexHull", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "sizeConvexHull") public class DefaultSizeConvexHullPolygon extends AbstractSizeConvexHull {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizePolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizePolygon.java index f75d3c0c3..d7a4347c9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizePolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSizePolygon.java @@ -37,10 +37,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Specific implementation of {@link Area} for a Polygon2D. @@ -48,10 +46,14 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.size", label = "Geometric (2D): Size", priority = Priority.VERY_HIGH - 1) -@Parameter(key = "input") -@Parameter(key = "size") public class DefaultSizePolygon implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param size + */ @Override public void compute(Polygon2D input, DoubleType output) { double sum = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSmallestEnclosingRectangle.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSmallestEnclosingRectangle.java index d19802bd1..106a1c3b4 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSmallestEnclosingRectangle.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSmallestEnclosingRectangle.java @@ -40,11 +40,9 @@ import net.imglib2.roi.geom.real.Polygon2D; import net.imglib2.type.numeric.real.DoubleType; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.smallestBoundingBox}. @@ -52,8 +50,6 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.smallestEnclosingBoundingBox", label = "Geometric (2D): Smallest Enclosing Rectangle") -@Parameter(key = "input") -@Parameter(key = "smallestEnclosingBoundingBox") public class DefaultSmallestEnclosingRectangle implements Function { @OpDependency(name = "geom.convexHull") @@ -101,6 +97,12 @@ private Polygon2D rotate(final Polygon2D inPoly, final double angle, final RealL return new DefaultWritablePolygon2D(out); } + /** + * TODO + * + * @param input + * @param smallestEnclosingBoundingBox + */ @Override public Polygon2D apply(final Polygon2D input) { // ensure validity of inputs diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSolidityPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSolidityPolygon.java index 19a5cad19..082f7bd6f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSolidityPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultSolidityPolygon.java @@ -33,15 +33,11 @@ import net.imglib2.roi.geom.real.Polygon2D; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.solidity", label = "Geometric (2D): Solidity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "solidity") public class DefaultSolidityPolygon extends AbstractSolidity {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountConvexHullPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountConvexHullPolygon.java index 035fc69ee..812f1f456 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountConvexHullPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountConvexHullPolygon.java @@ -36,23 +36,25 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.verticesCountConvexHull", label = "Geometric (2D): Convex Hull Vertices Count", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "verticesCountConvexHull") public class DefaultVerticesCountConvexHullPolygon implements Computers.Arity1 { @OpDependency(name = "geom.convexHull") private Function convexHullFunc; + /** + * TODO + * + * @param input + * @param verticesCountConvexHull + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(convexHullFunc.apply(input).numVertices()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountPolygon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountPolygon.java index 83234aa3b..943e51fe3 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountPolygon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/DefaultVerticesCountPolygon.java @@ -34,19 +34,21 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz, University of Konstanz */ @Plugin(type = Op.class, name = "geom.verticesCount", label = "Geometric (2D): Convex Hull Vertices Count", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "verticesCount") public class DefaultVerticesCountPolygon implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param verticesCount + */ @Override public void compute(Polygon2D input, DoubleType output) { output.set(input.numVertices()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/LabelRegionToPolygonConverter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/LabelRegionToPolygonConverter.java index c8172bd9f..3b1321122 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/LabelRegionToPolygonConverter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom2d/LabelRegionToPolygonConverter.java @@ -41,12 +41,11 @@ import org.scijava.convert.AbstractConverter; import org.scijava.convert.ConversionRequest; import org.scijava.convert.Converter; -import org.scijava.function.Functions; -import org.scijava.ops.OpService; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.OpService; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; +import org.scijava.types.Nil; /** * Converts a {@link LabelRegion} to a polygon @@ -67,7 +66,7 @@ public class LabelRegionToPolygonConverter extends @Override public T convert(final Object src, final Class dest) { if (contourFunc == null) { - contourFunc = FunctionUtils.match(ops.env(), "geom.contour", new Nil>() {}, new Nil() {}, + contourFunc = OpBuilder.matchFunction(ops.env(), "geom.contour", new Nil>() {}, new Nil() {}, new Nil() {}); } // FIXME: can we make this faster? diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/AbstractVertexInterpolator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/AbstractVertexInterpolator.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/AbstractVertexInterpolator.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/AbstractVertexInterpolator.java index 301788527..59d62d152 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/AbstractVertexInterpolator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/AbstractVertexInterpolator.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; /** * This is the {@link AbstractVertexInterpolator}. A vertex interpolator diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/BitTypeVertexInterpolator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/BitTypeVertexInterpolator.java similarity index 97% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/BitTypeVertexInterpolator.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/BitTypeVertexInterpolator.java index bfe3f5166..45ff6f860 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/BitTypeVertexInterpolator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/BitTypeVertexInterpolator.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; /** * The {@link BitTypeVertexInterpolator} returns the point which is in the diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultBoxivityMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultBoxivityMesh.java index 7cd6be9c0..5d779052a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultBoxivityMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultBoxivityMesh.java @@ -33,17 +33,13 @@ import net.imagej.ops2.geom.AbstractBoxivity; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boxivity", label = "Geometric (3D): Boxivity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "boxivity") public class DefaultBoxivityMesh extends AbstractBoxivity { } diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultCompactness.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultCompactness.java index db66992cb..b9757b111 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultCompactness.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultCompactness.java @@ -36,11 +36,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Compactness}. @@ -54,8 +52,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.compactness", label = "Geometric (3D): Compactness", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "compactness") public class DefaultCompactness implements Computers.Arity1 { @OpDependency(name = "geom.boundarySize") @@ -64,6 +60,12 @@ public class DefaultCompactness implements Computers.Arity1 { @OpDependency(name = "geom.size") private Function volume; + /** + * TODO + * + * @param input + * @param compactness + */ @Override public void compute(final Mesh input, final DoubleType output) { final double s3 = Math.pow(surfaceArea.apply(input).get(), 3); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexHull3D.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexHull3D.java index 7ca2e10d0..eaf1a8b5a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexHull3D.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexHull3D.java @@ -40,17 +40,12 @@ import net.imagej.mesh.Mesh; import net.imagej.mesh.naive.NaiveDoubleMesh; -import net.imagej.ops2.geom.geom3d.mesh.Horizon; -import net.imagej.ops2.geom.geom3d.mesh.TriangularFacet; -import net.imagej.ops2.geom.geom3d.mesh.Vertex; import net.imglib2.util.Pair; import net.imglib2.util.ValuePair; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This quickhull implementation is based on the paper @@ -62,8 +57,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.convexHull") -@Parameter(key = "input") -@Parameter(key = "convexHull") public class DefaultConvexHull3D implements Function { @@ -80,6 +73,12 @@ public class DefaultConvexHull3D implements Function // return epsilon; // } + /** + * TODO + * + * @param input + * @param convexHull + */ @Override public Mesh apply(final Mesh input) { Mesh output = new NaiveDoubleMesh(); @@ -612,11 +611,15 @@ else if (v.getZ() < minZ) { } @Plugin(type = Op.class, name = "geom.convexHullEpsilon") -@Parameter(key = "input") -@Parameter(key = "epsilon") class DefaultConvexHull3DEpsilon implements Function { + /** + * TODO + * + * @param input + * @param epsilon + */ @Override public Double apply(final Mesh input) { Set vertices = new LinkedHashSet<>(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexityMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexityMesh.java index 00046d460..cda31fd22 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexityMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultConvexityMesh.java @@ -33,15 +33,11 @@ import net.imagej.ops2.geom.AbstractConvexity; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.convexity", label = "Geometric (3D): Convexity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "convexity") public class DefaultConvexityMesh extends AbstractConvexity {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3D.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3D.java index 603d45c26..618911174 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3D.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3D.java @@ -38,11 +38,9 @@ import org.apache.commons.math3.linear.BlockRealMatrix; import org.apache.commons.math3.linear.RealMatrix; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This {@link Op} computes the 2nd multi variate of a {@link IterableRegion} @@ -53,13 +51,17 @@ * BooleanType */ @Plugin(type = Op.class, name = "geom.secondMoment") -@Parameter(key = "iterableRegion") -@Parameter(key = "inertiaTensor") public class DefaultInertiaTensor3D> implements Function, RealMatrix> { @OpDependency(name = "geom.centroid") private Function, RealLocalizable> centroid; + /** + * TODO + * + * @param iterableRegion + * @param inertiaTensor + */ @Override public RealMatrix apply(final IterableRegion input) { // ensure validity of inputs diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3DMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3DMesh.java index ed543fefd..31cbcefc6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3DMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultInertiaTensor3DMesh.java @@ -38,11 +38,9 @@ import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.commons.math3.linear.BlockRealMatrix; import org.apache.commons.math3.linear.RealMatrix; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This {@link Op} computes the 2nd multi variate of a {@link Mesh} (Label). @@ -50,13 +48,17 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.secondMoment") -@Parameter(key = "input") -@Parameter(key = "inertiaTensor") public class DefaultInertiaTensor3DMesh implements Function { @OpDependency(name = "geom.centroid") private Function centroid; + /** + * TODO + * + * @param input + * @param inertiaTensor + */ @Override public RealMatrix apply(final Mesh input) { // ensure validity of inputs diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMainElongation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMainElongation.java index 574bf3417..89ff3626b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMainElongation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMainElongation.java @@ -38,11 +38,9 @@ import org.apache.commons.math3.linear.RealMatrix; import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.MainElongation} @@ -53,13 +51,17 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.mainElongation", label = "Geometric (3D): Main Elongation", priority = Priority.VERY_HIGH) -@Parameter(key = "inputMesh") -@Parameter(key = "output") public class DefaultMainElongation implements Computers.Arity1 { @OpDependency(name = "geom.secondMoment") private Function inertiaTensor; + /** + * TODO + * + * @param inputMesh + * @param output + */ @Override public void compute(final Mesh input, final DoubleType output) { final RealMatrix it = inertiaTensor.apply(input); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMarchingCubes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMarchingCubes.java index 2d2b6e5c9..fda0aee1d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMarchingCubes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMarchingCubes.java @@ -33,8 +33,6 @@ import net.imagej.mesh.Mesh; import net.imagej.mesh.naive.NaiveDoubleMesh; -import net.imagej.ops2.geom.geom3d.mesh.DefaultVertexInterpolator; -import net.imagej.ops2.geom.geom3d.mesh.VertexInterpolator; import net.imglib2.Cursor; import net.imglib2.FinalInterval; import net.imglib2.RandomAccessibleInterval; @@ -45,11 +43,9 @@ import org.apache.commons.math3.util.MathArrays; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This is a marching cubes implementation. It is inspired by Paul Bourke's @@ -61,10 +57,6 @@ * BooleanType */ @Plugin(type = Op.class, name = "geom.marchingCubes") -@Parameter(key = "input") -@Parameter(key = "isolevel") -@Parameter(key = "interpolatorClass") -@Parameter(key = "output") public class DefaultMarchingCubes> implements Functions.Arity3, Double, VertexInterpolator, Mesh> { @@ -75,6 +67,14 @@ public class DefaultMarchingCubes> private VertexInterpolator interpolatorClass; @SuppressWarnings({ "unchecked" }) + /** + * TODO + * + * @param input + * @param isolevel + * @param interpolatorClass + * @return the output + */ @Override public Mesh apply(final RandomAccessibleInterval input, Double isolevel, VertexInterpolator interpolatorClass) { @@ -557,14 +557,18 @@ private Cursor getCube(final ExtendedRandomAccessibleInterval> implements Function, Mesh> { @OpDependency(name = "geom.marchingCubes") private Functions.Arity3, Double, VertexInterpolator, Mesh> marchingOp; + /** + * TODO + * + * @param input + * @return the output + */ @Override public Mesh apply(RandomAccessibleInterval t) { return marchingOp.apply(t, null, null); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMedianElongation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMedianElongation.java index 828ce0a9a..564eef299 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMedianElongation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultMedianElongation.java @@ -38,11 +38,9 @@ import org.apache.commons.math3.linear.RealMatrix; import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of @@ -54,13 +52,17 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.medianElongation", label = "Geometric (3D): Median Elongation", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "medianElongation") public class DefaultMedianElongation implements Computers.Arity1 { @OpDependency(name = "geom.secondMoment") private Function inertiaTensor; + /** + * TODO + * + * @param input + * @param medianElongation + */ @Override public void compute(final Mesh input, final DoubleType output) { final RealMatrix it = inertiaTensor.apply(input); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSolidityMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSolidityMesh.java index 7a8c6ac4e..086a6fab9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSolidityMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSolidityMesh.java @@ -33,15 +33,11 @@ import net.imagej.ops2.geom.AbstractSolidity; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.solidity", label = "Geometric (3D): Solidity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "solidity") public class DefaultSolidityMesh extends AbstractSolidity {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSparenessMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSparenessMesh.java index f57b7c8d1..27c27d8df 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSparenessMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSparenessMesh.java @@ -38,11 +38,9 @@ import org.apache.commons.math3.linear.RealMatrix; import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Spareness}. @@ -52,8 +50,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.spareness", label = "Geometric (3D): Spareness", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "spareness") public class DefaultSparenessMesh implements Computers.Arity1 { @OpDependency(name = "geom.secondMoment") @@ -62,6 +58,12 @@ public class DefaultSparenessMesh implements Computers.Arity1 @OpDependency(name = "geom.size") private Function volume; + /** + * TODO + * + * @param input + * @param spareness + */ @Override public void compute(final Mesh input, final DoubleType output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSphericity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSphericity.java index c1354cbcb..f331ba2b5 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSphericity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSphericity.java @@ -36,11 +36,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Sphericity}. @@ -50,8 +48,6 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.sphericity", label = "Geometric (3D): Sphericity", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "sphericity") public class DefaultSphericity implements Computers.Arity1 { @OpDependency(name = "geom.size") @@ -59,6 +55,12 @@ public class DefaultSphericity implements Computers.Arity1 { @OpDependency(name = "geom.boundarySize") private Function areaFunc; + /** + * TODO + * + * @param input + * @param sphericity + */ @Override public void compute(final Mesh input, final DoubleType output) { final double sphereArea = Math.pow(Math.PI, 1 / 3d) * Math.pow(6 * volumeFunc.apply(input).get(), 2 / 3d); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceArea.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceArea.java index 1d500c58f..6ba7b3fdd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceArea.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceArea.java @@ -36,10 +36,8 @@ import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.BoundarySize}. @@ -47,10 +45,14 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boundarySize", label = "Geometric (3D): Surface Area", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "boundarySize") public class DefaultSurfaceArea implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param boundarySize + */ @Override public void compute(final Mesh input, final DoubleType output) { double total = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceAreaConvexHullMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceAreaConvexHullMesh.java index 355754bd8..e9f941383 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceAreaConvexHullMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultSurfaceAreaConvexHullMesh.java @@ -33,15 +33,11 @@ import net.imagej.ops2.geom.AbstractBoundarySizeConvexHull; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.boundarySizeConvexHull", label = "Geometric (3D): Surface Area Convex Hull", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "boundarySizeConvexHull") public class DefaultSurfaceAreaConvexHullMesh extends AbstractBoundarySizeConvexHull {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/DefaultVertexInterpolator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVertexInterpolator.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/DefaultVertexInterpolator.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVertexInterpolator.java index e93b479a3..995e5355e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/DefaultVertexInterpolator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVertexInterpolator.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; /** * Linearly interpolate the position where an isosurface cuts an edge between diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountConvexHullMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountConvexHullMesh.java index 718dde97d..fff895062 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountConvexHullMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountConvexHullMesh.java @@ -36,23 +36,25 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.verticesCountConvexHull", label = "Geometric (3D): Convex Hull Vertices Count", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "verticesCountConvexHull") public class DefaultVerticesCountConvexHullMesh implements Computers.Arity1 { @OpDependency(name = "geom.convexHull") private Function convexHullFunc; + /** + * TODO + * + * @param input + * @param verticesCountConvexHull + */ @Override public void compute(final Mesh input, final DoubleType output) { output.set(convexHullFunc.apply(input).vertices().size()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountMesh.java index a2548a674..7caf0b72a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVerticesCountMesh.java @@ -34,10 +34,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@code geom.boundaryPixelCount}. @@ -45,10 +43,14 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.verticesCount", label = "Geometric3D: Surface Vertices Count", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "verticesCountMesh") public class DefaultVerticesCountMesh implements Computers.Arity1 { + /** + * TODO + * + * @param input + * @param verticesCountMesh + */ @Override public void compute(final Mesh input, final DoubleType output) { output.set(input.vertices().size()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeConvexHullMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeConvexHullMesh.java index 5925f4c7f..43ead00cf 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeConvexHullMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeConvexHullMesh.java @@ -33,15 +33,11 @@ import net.imagej.ops2.geom.AbstractSizeConvexHull; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.sizeConvexHull", label = "Geometric (3D): Convex Hull Volume", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "volumeConvexHullMesh") public class DefaultVolumeConvexHullMesh extends AbstractSizeConvexHull {} diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeMesh.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeMesh.java index 70e9b954c..4cb2f699d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeMesh.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVolumeMesh.java @@ -36,10 +36,8 @@ import org.apache.commons.math3.util.MathArrays; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generic implementation of {@link net.imagej.ops2.Ops.Geometric.Size}. @@ -47,10 +45,14 @@ * @author Tim-Oliver Buchholz (University of Konstanz) */ @Plugin(type = Op.class, name = "geom.size", label = "Geometric3D: Volume", priority = Priority.VERY_HIGH - 1) -@Parameter(key = "input") -@Parameter(key = "volume") public class DefaultVolumeMesh implements Function { + /** + * TODO + * + * @param input + * @param volume + */ @Override public DoubleType apply(final Mesh input) { double volume = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVoxelization3D.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVoxelization3D.java index 8f4ce35e7..dc89c8734 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVoxelization3D.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/DefaultVoxelization3D.java @@ -44,11 +44,9 @@ import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -53,8 +51,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "image.integral", priority = Priority.LOW + 1) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultIntegralImg, O extends RealType> extends AbstractIntegralImg { @Override diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/SquareIntegralImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/SquareIntegralImg.java index 0e6d743ed..76b9aa809 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/SquareIntegralImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/SquareIntegralImg.java @@ -36,10 +36,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -54,8 +52,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "image.squareIntegral", priority = Priority.LOW + 1) -@Parameter(key = "input") -@Parameter(key = "output") public class SquareIntegralImg, O extends RealType> extends AbstractIntegralImg { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/WrappedIntegralImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/WrappedIntegralImg.java index 8faa39643..1fcdd4183 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/WrappedIntegralImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/WrappedIntegralImg.java @@ -38,10 +38,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Wrapper op for the creation of integral images with @@ -51,14 +49,18 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "image.integral", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "output") public class WrappedIntegralImg> implements Function, RandomAccessibleInterval> { private IntegralImg integralImg; + /** + * TODO + * + * @param input + * @return the output + */ @Override public RandomAccessibleInterval apply( final RandomAccessibleInterval input) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertII.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertII.java index c1db8be72..d15efa397 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertII.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertII.java @@ -36,24 +36,19 @@ //import net.imglib2.type.numeric.RealType; //import net.imglib2.type.numeric.integer.UnsignedVariableBitLengthType; // -//import org.scijava.ops.OpDependency; +//import org.scijava.ops.spi.OpDependency; +//import org.scijava.ops.spi.OpDependency; //import org.scijava.ops.core.Op; //import org.scijava.functions.Computers; //import org.scijava.functions.Computers; //import org.scijava.functions.Computers; -//import org.scijava.param.Parameter; //import org.scijava.plugin.Plugin; -//import org.scijava.struct.ItemIO; // ///** // * @author Martin Horn (University of Konstanz) // * @author Gabe Selzer // */ //@Plugin(type = Op.class, name = "image.invert") -//@Parameter(key = "input") -//@Parameter(key = "min") -//@Parameter(key = "max") -//@Parameter(key = "invertedOutput") //public class InvertII> implements // Computers.Arity3, T, T, IterableInterval> //{ diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertIIInteger.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertIIInteger.java index 65fdaa8c7..e8614d028 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertIIInteger.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/InvertIIInteger.java @@ -39,23 +39,18 @@ //import net.imglib2.type.numeric.integer.UnsignedLongType; // //import org.scijava.Priority; -//import org.scijava.ops.OpDependency; +//import org.scijava.ops.spi.OpDependency; +//import org.scijava.ops.spi.OpDependency; //import org.scijava.ops.core.Op; //import org.scijava.functions.Computers; //import org.scijava.functions.Computers; //import org.scijava.functions.Computers; -//import org.scijava.param.Parameter; //import org.scijava.plugin.Plugin; -//import org.scijava.struct.ItemIO; // ///** // * @author Gabe Selzer // */ //@Plugin(type = Op.class, name = "image.invert", priority = Priority.HIGH) -//@Parameter(key = "input") -//@Parameter(key = "min") -//@Parameter(key = "max") -//@Parameter(key = "invertedOutput") //public class InvertIIInteger> implements // Computers.Arity3, T, T, IterableInterval> //{ diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/Inverters.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/Inverters.java index b27516e18..1ee2ecfea 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/Inverters.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/invert/Inverters.java @@ -13,8 +13,8 @@ import net.imglib2.util.Util; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIComputer.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIComputer.java index 4717b0708..745531551 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIComputer.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIComputer.java @@ -39,11 +39,9 @@ import net.imglib2.util.Util; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Normalizes an {@link RandomAccessibleInterval} given its minimum and maximum to @@ -58,12 +56,6 @@ * input. */ @Plugin(type = Op.class, name = "image.normalize") -@Parameter(key = "input") -@Parameter(key = "sourceMin") -@Parameter(key = "sourceMax") -@Parameter(key = "targetMin") -@Parameter(key = "targetMax") -@Parameter(key = "output") public class NormalizeIIComputer, O extends RealType> implements Computers.Arity5, I, I, O, O, RandomAccessibleInterval> { @@ -90,6 +82,16 @@ private double[] getBounds(final RandomAccessibleInterval input, final I sour return result; } + /** + * TODO + * + * @param input + * @param sourceMin + * @param sourceMax + * @param targetMin + * @param targetMax + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final I sourceMin, final I sourceMax, final O targetMin, final O targetMax, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIFunction.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIFunction.java index ad3cf8745..74b80cf9a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIFunction.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIIFunction.java @@ -37,11 +37,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Normalizes an {@link RandomAccessibleInterval} given its minimum and maximum to @@ -52,12 +50,6 @@ * @param */ @Plugin(type = Op.class, name = "image.normalize") -@Parameter(key = "input") -@Parameter(key = "sourceMin") -@Parameter(key = "sourceMax") -@Parameter(key = "targetMin") -@Parameter(key = "targetMax") -@Parameter(key = "output") public class NormalizeIIFunction, O extends RealType> implements Functions.Arity5, I, I, O, O, RandomAccessibleInterval> @@ -69,6 +61,16 @@ public class NormalizeIIFunction, O extends RealType> @OpDependency(name = "image.normalize") private Computers.Arity5, I, I, O, O, RandomAccessibleInterval> normalizer; + /** + * TODO + * + * @param input + * @param sourceMin + * @param sourceMax + * @param targetMin + * @param targetMax + * @return the output + */ @Override public RandomAccessibleInterval apply( final RandomAccessibleInterval input, final I sourceMin, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazy.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazy.java index 235686836..7a052aa94 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazy.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazy.java @@ -37,11 +37,9 @@ import net.imglib2.util.Util; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Normalizes an {@link RandomAccessibleInterval} given its minimum and maximum to @@ -55,8 +53,6 @@ * @param - the type of the output image */ @Plugin(type = Op.class, name = "image.normalize") -@Parameter(key = "input") -@Parameter(key = "output") public class NormalizeIILazy, O extends RealType> implements Computers.Arity1, RandomAccessibleInterval> { @@ -66,6 +62,12 @@ public class NormalizeIILazy, O extends RealType> @OpDependency(name = "image.normalize") private Computers.Arity5, I, I, O, O, RandomAccessibleInterval> normalizerFunc; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(RandomAccessibleInterval img, RandomAccessibleInterval output) { Pair sourceMinMax = minMaxFunc.apply(img); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazyFunction.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazyFunction.java index 15b375dca..52833ed41 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazyFunction.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/normalize/NormalizeIILazyFunction.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Normalizes an {@link RandomAccessibleInterval} given its minimum and maximum to @@ -53,8 +51,6 @@ * @param - the type of the output image */ @Plugin(type = Op.class, name = "image.normalize") -@Parameter(key = "input") -@Parameter(key = "output") public class NormalizeIILazyFunction> implements Function, RandomAccessibleInterval> { @@ -64,6 +60,12 @@ public class NormalizeIILazyFunction> @OpDependency(name = "image.normalize") private Computers.Arity1, RandomAccessibleInterval> normalizer; + /** + * TODO + * + * @param input + * @return the output + */ @Override public RandomAccessibleInterval apply(RandomAccessibleInterval img) { RandomAccessibleInterval output = createFunc.apply(img); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/Watershed.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/Watershed.java index e13d0525b..944119a2d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/Watershed.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/Watershed.java @@ -56,11 +56,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -93,11 +91,6 @@ * @author Simon Schmid (University of Konstanz) */ @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "mask") -@Parameter(key = "outputLabeling") public class Watershed, B extends BooleanType> implements Computers.Arity4, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> { @@ -116,6 +109,15 @@ public class Watershed, B extends BooleanType> implemen /** Default label for mask */ private static final int MASK = -3; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param mask + * @param outputLabeling + */ @Override public void compute(final RandomAccessibleInterval in, final Boolean useEightConnectivity, final Boolean drawWatersheds, final RandomAccessibleInterval mask, @@ -385,16 +387,20 @@ public void compute(final RandomAccessibleInterval in, final Boolean useEight } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "outputLabeling") class WatershedMaskless, B extends BooleanType> implements Computers.Arity3, Boolean, Boolean, ImgLabeling> { @OpDependency(name = "image.watershed") private Computers.Arity4, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> watershedOp; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param outputLabeling + */ @Override public void compute(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, ImgLabeling outputLabeling) { @@ -404,11 +410,6 @@ public void compute(RandomAccessibleInterval in, Boolean useEightConnectivity } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "mask") -@Parameter(key = "outputLabeling") class WatershedFunction, B extends BooleanType> implements Functions.Arity4, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> { @@ -417,6 +418,15 @@ class WatershedFunction, B extends BooleanType> @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param mask + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, RandomAccessibleInterval mask) { @@ -427,10 +437,6 @@ public ImgLabeling apply(RandomAccessibleInterval in, Boole } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "outputLabeling") class WatershedFunctionMaskless, B extends BooleanType> implements Functions.Arity3, Boolean, Boolean, ImgLabeling> { @@ -439,6 +445,14 @@ class WatershedFunctionMaskless, B extends BooleanType> @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinary.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinary.java index 5ad31ca7e..55543239f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinary.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinary.java @@ -43,11 +43,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -84,13 +82,6 @@ * @author Simon Schmid (University of Konstanz) */ @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "mask") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") public class WatershedBinary, B extends BooleanType> implements Computers.Arity6, Boolean, Boolean, double[], RandomAccessibleInterval, ExecutorService, ImgLabeling> { @@ -108,6 +99,17 @@ public class WatershedBinary, B extends BooleanType> @OpDependency(name = "image.watershed") private Computers.Arity4, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> watershedOp; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param mask + * @param executorService + * @param outputLabeling + */ @Override public void compute(final RandomAccessibleInterval in, final Boolean useEightConnectivity, final Boolean drawWatersheds, final double[] sigma, final RandomAccessibleInterval mask, @@ -141,18 +143,22 @@ public void compute(final RandomAccessibleInterval in, final Boolean useEight } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") class WatershedBinaryMaskless, B extends BooleanType> implements Computers.Arity5, Boolean, Boolean, double[], ExecutorService, ImgLabeling> { @OpDependency(name = "image.watershed") private Computers.Arity6, Boolean, Boolean, double[], RandomAccessibleInterval, ExecutorService, ImgLabeling> watershedOp; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param executorService + * @param outputLabeling + */ @Override public void compute(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, double[] sigma, ExecutorService es, ImgLabeling outputLabeling) { @@ -162,13 +168,6 @@ public void compute(RandomAccessibleInterval in, Boolean useEightConnectivity } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "mask") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") class WatershedBinaryFunction, B extends BooleanType> implements Functions.Arity6, Boolean, Boolean, double[], RandomAccessibleInterval, ExecutorService, ImgLabeling> { @@ -177,6 +176,17 @@ class WatershedBinaryFunction, B extends BooleanType @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param mask + * @param executorService + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, double[] sigma, RandomAccessibleInterval mask, ExecutorService es) { @@ -187,12 +197,6 @@ public ImgLabeling apply(RandomAccessibleInterval in, Boole } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") class WatershedBinaryFunctionMaskless, B extends BooleanType> implements Functions.Arity5, Boolean, Boolean, double[], ExecutorService, ImgLabeling> { @@ -201,6 +205,16 @@ class WatershedBinaryFunctionMaskless, B extends Boolea @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param executorService + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, double[] sigma, ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinarySingleSigma.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinarySingleSigma.java index 2065efeab..925b715f1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinarySingleSigma.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedBinarySingleSigma.java @@ -44,11 +44,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -84,13 +82,6 @@ * @author Simon Schmid (University of Konstanz) */ @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "mask") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") public class WatershedBinarySingleSigma, B extends BooleanType> implements Computers.Arity6, Boolean, Boolean, Double, RandomAccessibleInterval, ExecutorService, ImgLabeling> { @@ -107,6 +98,17 @@ public class WatershedBinarySingleSigma, B extends Bool @OpDependency(name = "image.watershed") private Computers.Arity4, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> watershedOp; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param mask + * @param executorService + * @param outputLabeling + */ @Override public void compute(final RandomAccessibleInterval in, final Boolean useEightConnectivity, final Boolean drawWatersheds, final Double sigma, final RandomAccessibleInterval mask, @@ -136,18 +138,22 @@ public void compute(final RandomAccessibleInterval in, final Boolean useEight } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") class WatershedBinarySingleSigmaMaskless, B extends BooleanType> implements Computers.Arity5, Boolean, Boolean, Double, ExecutorService, ImgLabeling> { @OpDependency(name = "image.watershed") private Computers.Arity6, Boolean, Boolean, Double, RandomAccessibleInterval, ExecutorService, ImgLabeling> watershedOp; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param executorService + * @param outputLabeling + */ @Override public void compute(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, Double sigma, ExecutorService es, ImgLabeling outputLabeling) { @@ -157,13 +163,6 @@ public void compute(RandomAccessibleInterval in, Boolean useEightConnectivity } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "mask") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") class WatershedBinarySingleSigmaFunction, B extends BooleanType> implements Functions.Arity6, Boolean, Boolean, Double, RandomAccessibleInterval, ExecutorService, ImgLabeling> { @@ -172,6 +171,17 @@ class WatershedBinarySingleSigmaFunction, B extends Boolea @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param mask + * @param executorService + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, Double sigma, RandomAccessibleInterval mask, ExecutorService es) { @@ -182,12 +192,6 @@ public ImgLabeling apply(RandomAccessibleInterval in, Boole } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "sigma") -@Parameter(key = "executorService") -@Parameter(key = "outputLabeling") class WatershedBinarySigngleSigmaFunctionMaskless, B extends BooleanType> implements Functions.Arity5, Boolean, Boolean, Double, ExecutorService, ImgLabeling> { @@ -196,6 +200,16 @@ class WatershedBinarySigngleSigmaFunctionMaskless, B exten @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param useEightConnectivity + * @param drawWatersheds + * @param sigma + * @param executorService + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, Boolean useEightConnectivity, Boolean drawWatersheds, Double sigma, ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedSeeded.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedSeeded.java index fbf69a912..217f90b73 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedSeeded.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/watershed/WatershedSeeded.java @@ -66,11 +66,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * The Watershed algorithm segments and labels a grayscale image analogous to a @@ -102,12 +100,6 @@ * @author Simon Schmid (University of Konstanz) */ @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "seeds") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "mask") -@Parameter(key = "output") public class WatershedSeeded, B extends BooleanType> implements Computers.Arity5, ImgLabeling, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> { @@ -133,6 +125,16 @@ public class WatershedSeeded, B extends BooleanType> im private static final AtomicLong seq = new AtomicLong(); @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param seeds + * @param useEightConnectivity + * @param drawWatersheds + * @param mask + * @param output + */ @Override public void compute(final RandomAccessibleInterval in, final ImgLabeling seeds, final Boolean useEightConnectivity, final Boolean drawWatersheds, @@ -389,17 +391,21 @@ public int compareTo(WatershedVoxel o) { // Convenience Ops @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "seeds") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "outputLabeling") class WatershedSeededMaskless, B extends BooleanType> implements Computers.Arity4, ImgLabeling, Boolean, Boolean, ImgLabeling> { @OpDependency(name = "image.watershed") private Computers.Arity5, ImgLabeling, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> watershedOp; + /** + * TODO + * + * @param input + * @param seeds + * @param useEightConnectivity + * @param drawWatersheds + * @param outputLabeling + */ @Override public void compute(RandomAccessibleInterval in, ImgLabeling seeds, Boolean useEightConnectivity, Boolean drawWatersheds, @@ -410,11 +416,6 @@ public void compute(RandomAccessibleInterval in, ImgLabeling, B extends BooleanType> implements Functions.Arity4, ImgLabeling, Boolean, Boolean, ImgLabeling> { @@ -423,6 +424,15 @@ class WatershedSeededMasklessFunction, B extends BooleanTy @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param seeds + * @param useEightConnectivity + * @param drawWatersheds + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, ImgLabeling seeds, Boolean useEightConnectivity, Boolean drawWatersheds) { @@ -433,12 +443,6 @@ public ImgLabeling apply(RandomAccessibleInterval in, ImgLa } @Plugin(type = Op.class, name = "image.watershed") -@Parameter(key = "input") -@Parameter(key = "seeds") -@Parameter(key = "useEightConnectivity") -@Parameter(key = "drawWatersheds") -@Parameter(key = "mask") -@Parameter(key = "outputLabeling") class WatershedSeededFunction, B extends BooleanType> implements Functions.Arity5, ImgLabeling, Boolean, Boolean, RandomAccessibleInterval, ImgLabeling> { @@ -447,6 +451,16 @@ class WatershedSeededFunction, B extends BooleanType> i @OpDependency(name = "create.imgLabeling") private BiFunction> labelingCreator; + /** + * TODO + * + * @param input + * @param seeds + * @param useEightConnectivity + * @param drawWatersheds + * @param mask + * @return the outputLabeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval in, ImgLabeling seeds, Boolean useEightConnectivity, Boolean drawWatersheds, RandomAccessibleInterval mask) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/AbstractImageMomentOp.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/AbstractImageMomentOp.java index 9b461f98f..a9e4b9bee 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/AbstractImageMomentOp.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/AbstractImageMomentOp.java @@ -33,7 +33,7 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpService; +import org.scijava.ops.engine.OpService; /** * Abstract {@code ImageMomentOp}. Provides {@link OpService} and create the diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment00.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment00.java index 3d7fda12c..bfe0f9cb8 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment00.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment00.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment00}. @@ -49,8 +47,6 @@ * @param output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment00", label = "Image Moment: CentralMoment00") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment00, O extends RealType> implements AbstractImageMomentOp { @@ -58,6 +54,12 @@ public class DefaultCentralMoment00, O extends RealType @OpDependency(name = "imageMoments.moment00") private Computers.Arity1, O> moment00Cmp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { moment00Cmp.compute(input, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment01.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment01.java index 7ab6a8c17..389fc0253 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment01.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment01.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment01} directly. @@ -49,8 +47,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.centralMoment01", label = "Image Moment: CentralMoment01", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment01, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment02.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment02.java index 7335878d0..e06b1e8d4 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment02.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment02.java @@ -39,11 +39,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment02}. @@ -56,8 +54,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment02", label = "Image Moment: CentralMoment02") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment02, O extends RealType> implements AbstractImageMomentOp { @@ -69,6 +65,12 @@ public class DefaultCentralMoment02, O extends RealType @OpDependency(name = "math.power") private Computers.Arity2 powerOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O moment00 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment03.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment03.java index f7ea540ad..5221fda93 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment03.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment03.java @@ -39,11 +39,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment03} using @@ -56,8 +54,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment03", label = "Image Moment: CentralMoment03") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment03, O extends RealType> implements AbstractImageMomentOp { @@ -68,6 +64,12 @@ public class DefaultCentralMoment03, O extends RealType @OpDependency(name = "math.power") private Computers.Arity2 powerOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment10.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment10.java index d9e7af3bb..2b637c3b9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment10.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment10.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment10} directly. @@ -49,8 +47,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.centralMoment10", label = "Image Moment: CentralMoment10", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment10, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment11.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment11.java index 71377692b..0945fe35f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment11.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment11.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment11}. @@ -52,8 +50,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment11", label = "Image Moment: CentralMoment11") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment11, O extends RealType> implements AbstractImageMomentOp { @@ -69,6 +65,12 @@ public class DefaultCentralMoment11, O extends RealType @OpDependency(name = "imageMoments.moment11") private Computers.Arity1, O> moment11Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O moment00 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment12.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment12.java index 3f0975949..eb7576974 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment12.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment12.java @@ -39,11 +39,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment12}. @@ -56,8 +54,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment12", label = "Image Moment: CentralMoment12") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment12, O extends RealType> implements AbstractImageMomentOp { @@ -70,6 +66,12 @@ public class DefaultCentralMoment12, O extends RealType @OpDependency(name = "imageMoments.moment10") private Computers.Arity1, O> moment10Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment20.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment20.java index 065f41696..e3a0cb401 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment20.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment20.java @@ -38,11 +38,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment20}. @@ -55,8 +53,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment20", label = "Image Moment: CentralMoment20") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment20, O extends RealType> implements AbstractImageMomentOp { @@ -66,6 +62,12 @@ public class DefaultCentralMoment20, O extends RealType @OpDependency(name = "imageMoments.moment10") private Computers.Arity1, O> moment10Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment21.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment21.java index 05e0f6a8d..eb7f25d2a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment21.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment21.java @@ -39,11 +39,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment21}. @@ -56,8 +54,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment21", label = "Image Moment: CentralMoment21") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment21, O extends RealType> implements AbstractImageMomentOp { @@ -70,6 +66,12 @@ public class DefaultCentralMoment21, O extends RealType @OpDependency(name = "imageMoments.moment10") private Computers.Arity1, O> moment10Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O moment00 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment30.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment30.java index 0bc18ef3e..1d08fdd55 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment30.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/DefaultCentralMoment30.java @@ -39,11 +39,9 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment30}. @@ -56,8 +54,6 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment30", label = "Image Moment: CentralMoment30") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultCentralMoment30, O extends RealType> implements AbstractImageMomentOp { @@ -70,6 +66,12 @@ public class DefaultCentralMoment30, O extends RealType @OpDependency(name = "math.power") private Computers.Arity2 powerOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment00.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment00.java index 129642c87..2b42fba69 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment00.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment00.java @@ -35,10 +35,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment00} directly. @@ -51,11 +49,15 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment00", label = "Image Moment: CentralMoment00", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class IterableCentralMoment00, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final IterableInterval input, final O output) { if (input.numDimensions() != 2) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment11.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment11.java index 5d885cd63..660ed9762 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment11.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/centralmoments/IterableCentralMoment11.java @@ -35,10 +35,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.centralMoment11} directly. @@ -51,11 +49,15 @@ * output type */ @Plugin(type = Op.class, name = "imageMoments.centralMoment11", label = "Image Moment: CentralMoment11", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class IterableCentralMoment11, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final IterableInterval input, final O output) { if (input.numDimensions() != 2) throw new IllegalArgumentException( diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment1.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment1.java index 436c32d23..daf998ce6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment1.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment1.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment1}. @@ -50,8 +48,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment1", label = "Image Moment: HuMoment1") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment1, O extends RealType> implements AbstractImageMomentOp { @@ -62,6 +58,12 @@ public class DefaultHuMoment1, O extends RealType> @OpDependency(name = "imageMoments.normalizedCentralMoment02") private Computers.Arity1, O> normalizedCentralMoment02Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O n20 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment2.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment2.java index cf349a08b..b90bf9f70 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment2.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment2.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment2}. @@ -53,8 +51,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment2", label = "Image Moment: HuMoment2") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment2, O extends RealType> implements AbstractImageMomentOp { @OpDependency(name = "imageMoments.normalizedCentralMoment20") @@ -66,6 +62,12 @@ public class DefaultHuMoment2, O extends RealType> impl @OpDependency(name = "imageMoments.normalizedCentralMoment11") private Computers.Arity1, O> normalizedCentralMoment11Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment3.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment3.java index e25064aaa..0b9745ae1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment3.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment3.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment3}. @@ -52,8 +50,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment3", label = "Image Moment: HuMoment3") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment3, O extends RealType> implements AbstractImageMomentOp { @OpDependency(name = "imageMoments.normalizedCentralMoment30") @@ -68,6 +64,12 @@ public class DefaultHuMoment3, O extends RealType> impl @OpDependency(name = "imageMoments.normalizedCentralMoment03") private Computers.Arity1, O> normalizedCentralMoment03Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment4.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment4.java index 9c31a73ee..d029989fd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment4.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment4.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment4}. @@ -52,8 +50,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment4", label = "Image Moment: HuMoment4") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment4, O extends RealType> implements AbstractImageMomentOp { @OpDependency(name = "imageMoments.normalizedCentralMoment30") @@ -68,6 +64,12 @@ public class DefaultHuMoment4, O extends RealType> impl @OpDependency(name = "imageMoments.normalizedCentralMoment03") private Computers.Arity1, O> normalizedCentralMoment03Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment5.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment5.java index 20ed5efea..610b5118e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment5.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment5.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment5}. @@ -52,8 +50,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment5", label = "Image Moment: HuMoment5") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment5, O extends RealType> implements AbstractImageMomentOp { @OpDependency(name = "imageMoments.normalizedCentralMoment30") @@ -68,6 +64,12 @@ public class DefaultHuMoment5, O extends RealType> impl @OpDependency(name = "imageMoments.normalizedCentralMoment03") private Computers.Arity1, O> normalizedCentralMoment03Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O n30 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment6.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment6.java index b2ef4680e..eded13aa2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment6.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment6.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment6}. @@ -52,8 +50,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment6", label = "Image Moment: HuMoment6") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment6, O extends RealType> implements AbstractImageMomentOp { @OpDependency(name = "imageMoments.normalizedCentralMoment30") @@ -77,6 +73,12 @@ public class DefaultHuMoment6, O extends RealType> impl @OpDependency(name = "imageMoments.normalizedCentralMoment20") private Computers.Arity1, O> normalizedCentralMoment20Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O n02 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment7.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment7.java index e1e1411cd..e4e7a0f1e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment7.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/hu/DefaultHuMoment7.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.huMoment7}. @@ -52,8 +50,6 @@ * @see This page */ @Plugin(type = Op.class, name = "imageMoments.huMoment7", label = "Image Moment: HuMoment7") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultHuMoment7, O extends RealType> implements AbstractImageMomentOp { @OpDependency(name = "imageMoments.normalizedCentralMoment30") @@ -68,6 +64,12 @@ public class DefaultHuMoment7, O extends RealType> impl @OpDependency(name = "imageMoments.normalizedCentralMoment03") private Computers.Arity1, O> normalizedCentralMoment03Func; + /** + * TODO + * + * @param input + * @param output + */ @Override public void computeMoment(final RandomAccessibleInterval input, final O output) { final O n03 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment00.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment00.java index 98341a776..cffd8aa26 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment00.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment00.java @@ -39,10 +39,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.moment00}. @@ -54,8 +52,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.moment00", label = "Image Moment: Moment00", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultMoment00, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment01.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment01.java index 4cc75ccce..cd263b607 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment01.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment01.java @@ -39,10 +39,8 @@ import net.imglib2.util.Intervals; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.moment01}. @@ -54,8 +52,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.moment01", label = "Image Moment: Moment01", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultMoment01, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment10.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment10.java index bd1dcfd9b..08d718111 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment10.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment10.java @@ -39,10 +39,8 @@ import net.imglib2.util.Intervals; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.moment10}. @@ -54,8 +52,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.moment10", label = "Image Moment: Moment10", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultMoment10, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment11.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment11.java index d8970c4a3..ee4d060f1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment11.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/moments/DefaultMoment11.java @@ -39,10 +39,8 @@ import net.imglib2.util.Intervals; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.moment11}. @@ -54,8 +52,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.moment11", label = "Image Moment: Moment11", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultMoment11, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment02.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment02.java index 966095e31..cb11611ca 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment02.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment02.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment02}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment02", label = "Image Moment: NormalizedCentralMoment02") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment02, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment03.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment03.java index 30fa93fd2..fcad70d6b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment03.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment03.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment03}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment03", label = "Image Moment: NormalizedCentralMoment03") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment03, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment11.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment11.java index cd180dbe0..279eecfec 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment11.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment11.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment11}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment11", label = "Image Moment: NormalizedCentralMoment11") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment11, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment12.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment12.java index 4d80d1321..05febca3a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment12.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment12.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment12}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment12", label = "Image Moment: NormalizedCentralMoment12") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment12, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment20.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment20.java index d608f20a8..aa97c7c30 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment20.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment20.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment20}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment20", label = "Image Moment: NormalizedCentralMoment20") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment20, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment21.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment21.java index a16c4a1eb..704cb5f94 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment21.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment21.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment21}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment21", label = "Image Moment: NormalizedCentralMoment21") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment21, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment30.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment30.java index a6115c1da..c888953a7 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment30.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/imagemoments/normalizedcentralmoments/DefaultNormalizedCentralMoment30.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code imageMoments.normalizedCentralMoment30}. @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "imageMoments.normalizedCentralMoment30", label = "Image Moment: NormalizedCentralMoment30") -@Parameter(key = "input") -@Parameter(key = "output") public class DefaultNormalizedCentralMoment30, O extends RealType> implements AbstractImageMomentOp { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/MergeLabeling.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/MergeLabeling.java index e3113c5b9..4ed101e0e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/MergeLabeling.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/MergeLabeling.java @@ -47,11 +47,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Merges the labels of two {@link ImgLabeling} within a defined mask (if @@ -60,10 +58,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "labeling.merge") -@Parameter(key = "labeling1") -@Parameter(key = "labeling2") -@Parameter(key = "mask") -@Parameter(key = "combinedLabeling") public class MergeLabeling, B extends BooleanType> implements Functions.Arity3, ImgLabeling, RandomAccessibleInterval, ImgLabeling> { @@ -74,6 +68,14 @@ public class MergeLabeling, B extends BooleanType private Function, LabelingType, LabelingType>, Computers.Arity2>, Iterable>, Iterable>>> adaptor; @SuppressWarnings({ "unchecked", "rawtypes", "hiding" }) + /** + * TODO + * + * @param labeling1 + * @param labeling2 + * @param mask + * @param combinedLabeling + */ @Override public ImgLabeling apply(final ImgLabeling input1, final ImgLabeling input2, final RandomAccessibleInterval mask) { @@ -112,15 +114,19 @@ public void compute(final LabelingType input1, final LabelingType input2, } @Plugin(type = Op.class, name = "labeling.merge") -@Parameter(key = "labeling1") -@Parameter(key = "labeling2") -@Parameter(key = "combinedLabeling") class MergeLabelingMaskless, B extends BooleanType> implements BiFunction, ImgLabeling, ImgLabeling> { @OpDependency(name = "labeling.merge") private Functions.Arity3, ImgLabeling, RandomAccessibleInterval, ImgLabeling> mergeOp; + /** + * TODO + * + * @param labeling1 + * @param labeling2 + * @param combinedLabeling + */ @Override public ImgLabeling apply(ImgLabeling t, ImgLabeling u) { return mergeOp.apply(t, u, null); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/cca/DefaultCCA.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/cca/DefaultCCA.java index b05826d14..8d8ae700e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/cca/DefaultCCA.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/labeling/cca/DefaultCCA.java @@ -42,11 +42,9 @@ import net.imglib2.type.numeric.integer.IntType; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default Implementation wrapping {@link ConnectedComponents} of @@ -55,11 +53,6 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "labeling.cca", priority = 1.0) -@Parameter(key = "input") -@Parameter(key = "executorService") -@Parameter(key = "structuringElement") -@Parameter(key = "labelGenerator") -@Parameter(key = "labeling") public class DefaultCCA, L, I extends IntegerType> implements Functions.Arity4, ExecutorService, StructuringElement, Iterator, ImgLabeling> { @@ -67,6 +60,15 @@ public class DefaultCCA, L, I extends IntegerType> i private BiFunction> imgLabelingCreator; @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param executorService + * @param structuringElement + * @param labelGenerator + * @param labeling + */ @Override public ImgLabeling apply(final RandomAccessibleInterval input, ExecutorService es, StructuringElement se, Iterator labelGenerator) { @@ -79,16 +81,20 @@ public ImgLabeling apply(final RandomAccessibleInterval inp } @Plugin(type = Op.class, name = "labeling.cca", priority = 1.0) -@Parameter(key = "input") -@Parameter(key = "executorService") -@Parameter(key = "structuringElement") -@Parameter(key = "labeling") class SimpleCCA, L, I extends IntegerType> implements Functions.Arity3, ExecutorService, StructuringElement, ImgLabeling> { @OpDependency(name = "labeling.cca") private Functions.Arity4, ExecutorService, StructuringElement, Iterator, ImgLabeling> labeler; @SuppressWarnings("unchecked") + /** + * TODO + * + * @param input + * @param executorService + * @param structuringElement + * @param labeling + */ @Override public ImgLabeling apply(RandomAccessibleInterval input, ExecutorService es, StructuringElement structuringElement) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/linalg/rotate/Rotations.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/linalg/rotate/Rotations.java index bc29beff4..5bdec2e76 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/linalg/rotate/Rotations.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/linalg/rotate/Rotations.java @@ -37,11 +37,9 @@ import org.joml.Vector3d; import org.joml.Vector3f; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Rotates the vector by the quaternion. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/BooleanTypeLogic.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/BooleanTypeLogic.java index c57087503..45f8e68af 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/BooleanTypeLogic.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/BooleanTypeLogic.java @@ -32,11 +32,9 @@ import net.imglib2.type.BooleanType; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Logic operations with {@link BooleanType} as output. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Default.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Default.java index 8577f62b7..8af633849 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Default.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Default.java @@ -33,10 +33,8 @@ import net.imglib2.type.Type; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An Op that sets the output to the defaultVal iff the input is @@ -45,13 +43,17 @@ * @author Leon Yang */ @Plugin(type = Op.class, name = "logic.default") -@Parameter(key = "input") -@Parameter(key = "defaultValue") -@Parameter(key = "output") public class Default, O extends Type> implements Computers.Arity2 { + /** + * TODO + * + * @param input + * @param defaultValue + * @param output + */ @Override public void compute(final I input, final O defaultVal, final O output) { if (!input.get()) output.set(defaultVal); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Ternary.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Ternary.java index bc8148f2e..99a41078b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Ternary.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/logic/Ternary.java @@ -33,10 +33,8 @@ import net.imglib2.type.Type; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An Op that works the same way as the ?: operator. It sets the @@ -46,14 +44,18 @@ * @author Leon Yang */ @Plugin(type = Op.class, name = "logic.match") -@Parameter(key = "input") -@Parameter(key = "ifTrueVal") -@Parameter(key = "ifFalseVal") -@Parameter(key = "output") public class Ternary, O extends Type> implements Computers.Arity3 { + /** + * TODO + * + * @param input + * @param ifTrueVal + * @param ifFalseVal + * @param output + */ @Override public void compute(final I input, final O ifTrueVal, final O ifFalseVal, final O output) { output.set(input.get() ? ifTrueVal : ifFalseVal); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/DefaultMapNeighborhood.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/DefaultMapNeighborhood.java index 3912f24ad..5a6429a25 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/DefaultMapNeighborhood.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/DefaultMapNeighborhood.java @@ -39,10 +39,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Evaluates a {@link UnaryComputerOp} for each {@link Neighborhood} on the @@ -54,13 +52,17 @@ * @param output type */ @Plugin(type = Op.class, name = "map.neighborhood") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "op") -@Parameter(key = "output") public class DefaultMapNeighborhood implements Computers.Arity3, Shape, Computers.Arity1, O>, IterableInterval> { + /** + * TODO + * + * @param input + * @param shape + * @param op + * @param output + */ @Override public void compute(final RandomAccessibleInterval in1, final Shape in2, final Computers.Arity1, O> computer, final IterableInterval out) @@ -91,14 +93,18 @@ public void compute(final RandomAccessibleInterval in1, final Shape in2, * @author Gabriel Selzer */ @Plugin(type = Op.class, name = "map.neighborhood", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "op") -@Parameter(key = "output") class MapNeighborhoodAllRAI implements Computers.Arity3, Shape, Computers.Arity1, O>, RandomAccessibleInterval> { + /** + * TODO + * + * @param input + * @param shape + * @param op + * @param output + */ @Override public void compute(final RandomAccessibleInterval in1, final Shape in2, final Computers.Arity1, O> centerAwareOp, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/MapNeighborhoodWithCenter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/MapNeighborhoodWithCenter.java index 0e69d4dd7..aab5d22a7 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/MapNeighborhoodWithCenter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/map/neighborhood/MapNeighborhoodWithCenter.java @@ -40,11 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Evaluates a {@link CenterAwareComputerOp} for each {@link Neighborhood} on @@ -59,13 +57,17 @@ * @see CenterAwareComputerOp */ @Plugin(type = Op.class, name = "map.neighborhood") -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "op") -@Parameter(key = "output") public class MapNeighborhoodWithCenter implements Computers.Arity3, Shape, Computers.Arity2, I, O>, IterableInterval> { + /** + * TODO + * + * @param input + * @param shape + * @param op + * @param output + */ @Override public void compute(final RandomAccessibleInterval in1, final Shape in2, final Computers.Arity2, I, O> centerAwareOp, final IterableInterval out) @@ -98,14 +100,18 @@ public void compute(final RandomAccessibleInterval in1, final Shape in2, * @author Gabriel Selzer */ @Plugin(type = Op.class, name = "map.neighborhood", priority = Priority.HIGH) -@Parameter(key = "input") -@Parameter(key = "shape") -@Parameter(key = "op") -@Parameter(key = "output") class MapNeighborhoodWithCenterAllRAI implements Computers.Arity3, Shape, Computers.Arity2, I, O>, RandomAccessibleInterval> { + /** + * TODO + * + * @param input + * @param shape + * @param op + * @param output + */ @Override public void compute(final RandomAccessibleInterval in1, final Shape in2, final Computers.Arity2, I, O> centerAwareOp, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryNumericTypeMath.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryNumericTypeMath.java index 24a64282c..49564870b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryNumericTypeMath.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryNumericTypeMath.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Binary Ops of the {@code math} namespace which operate on {@link RealType}s. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryRealTypeMath.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryRealTypeMath.java index 5bd20a28b..925f446e1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryRealTypeMath.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/BinaryRealTypeMath.java @@ -32,11 +32,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Binary Ops of the {@code math} namespace which operate on {@link RealType}s. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/NullaryNumericTypeMath.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/NullaryNumericTypeMath.java index e9309030d..21e723cf8 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/NullaryNumericTypeMath.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/NullaryNumericTypeMath.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.NumericType; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Nullary Ops of the {@code math} namespace which operate on diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/UnaryRealTypeMath.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/UnaryRealTypeMath.java index fdd63a9fd..725900903 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/UnaryRealTypeMath.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/UnaryRealTypeMath.java @@ -36,8 +36,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/multiply/ComplexConjugateMultiplyOp.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/multiply/ComplexConjugateMultiplyOp.java index cbb9936a9..e0d150920 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/multiply/ComplexConjugateMultiplyOp.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/math/multiply/ComplexConjugateMultiplyOp.java @@ -33,15 +33,10 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "math.complexConjugateMultiply", priority = Priority.LOW) -@Parameter(key = "input1") -@Parameter(key = "input2") -@Parameter(key = "output") public class ComplexConjugateMultiplyOp> implements Computers.Arity2 { // TODO: extend common abstract base class which implements Contingent @@ -49,6 +44,13 @@ public class ComplexConjugateMultiplyOp> implements Com // TODO: code generate this and all add ops to generalize them to other // operators. + /** + * TODO + * + * @param input1 + * @param input2 + * @param output + */ @Override public void compute(final T input1, final T input2, final T output) { T temp = input2.copy(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/BlackTopHats.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/BlackTopHats.java index 3723b627e..c5a0fb769 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/BlackTopHats.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/BlackTopHats.java @@ -14,8 +14,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Closes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Closes.java index 120c09a5e..400dc9e72 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Closes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Closes.java @@ -14,8 +14,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Dilations.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Dilations.java index dae7f33e3..20b097d17 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Dilations.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Dilations.java @@ -14,8 +14,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/DistanceTransforms.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/DistanceTransforms.java index 96728b356..495f50661 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/DistanceTransforms.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/DistanceTransforms.java @@ -10,12 +10,10 @@ import org.scijava.function.Computers; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.ExceptionUtils; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.ExceptionUtils; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class DistanceTransforms, U extends RealType> { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Erosions.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Erosions.java index cc1741188..1f61e775c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Erosions.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Erosions.java @@ -14,8 +14,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/ExtractHoles.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/ExtractHoles.java index 1618d6b4e..8e4433e97 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/ExtractHoles.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/ExtractHoles.java @@ -38,11 +38,9 @@ import net.imglib2.type.BooleanType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Extracts the holes from a binary image. @@ -51,9 +49,6 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "morphology.extractHoles") -@Parameter(key = "input") -@Parameter(key = "structElement") -@Parameter(key = "output") public class ExtractHoles> implements Computers.Arity2, Shape, RandomAccessibleInterval> { @@ -63,6 +58,13 @@ public class ExtractHoles> implements @OpDependency(name = "morphology.fillHoles") private Computers.Arity2, Shape, RandomAccessibleInterval> fillHolesComp; + /** + * TODO + * + * @param input + * @param structElement + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape structElement, final RandomAccessibleInterval output) @@ -74,14 +76,18 @@ public void compute(final RandomAccessibleInterval input, } @Plugin(type = Op.class, name = "morphology.extractHoles") -@Parameter(key = "input") -@Parameter(key = "output") class SimpleExtractHolesComputer> implements Computers.Arity1, RandomAccessibleInterval> { @OpDependency(name = "morphology.extractHoles") private Computers.Arity2, Shape, RandomAccessibleInterval> extractOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(RandomAccessibleInterval in1, RandomAccessibleInterval out) { Shape defaultStructElement = new RectangleShape(1, false); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FillHoles.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FillHoles.java index bd72a7f78..f835c4b5d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FillHoles.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FillHoles.java @@ -38,11 +38,9 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Fills the holes of a BooleanType image. @@ -51,19 +49,22 @@ * @author Daniel Seebacher (University of Konstanz) */ @Plugin(type = Op.class, name = "morphology.fillHoles") -@Parameter(key = "input") -@Parameter(key = "structElement") -@Parameter(key = "output") public class FillHoles> implements Computers.Arity2, Shape, RandomAccessibleInterval> { -// @Parameter(required = false) // private Shape structElement = new RectangleShape(1, false); @OpDependency(name = "morphology.floodFill") private Computers.Arity3, Localizable, Shape, RandomAccessibleInterval> floodFillComp; + /** + * TODO + * + * @param input + * @param structElement + * @param output + */ @Override public void compute(final RandomAccessibleInterval op, final Shape structElement, final RandomAccessibleInterval r) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FloodFills.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FloodFills.java index d50da4b3e..239438fc6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FloodFills.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/FloodFills.java @@ -14,11 +14,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class FloodFills, U extends Type> { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Opens.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Opens.java index 3751f44ef..02d25c8df 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Opens.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Opens.java @@ -14,8 +14,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Outline.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Outline.java index 54fddb29d..68a199cdc 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Outline.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Outline.java @@ -45,10 +45,8 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * The Op creates an output interval where the objects are hollow versions from @@ -57,9 +55,6 @@ * @author Richard Domander (Royal Veterinary College, London) */ @Plugin(type = Op.class, name = "morphology.outline") -@Parameter(key = "input") -@Parameter(key = "excludeEdges") -@Parameter(key = "output") public class Outline> implements Computers.Arity2, Boolean, RandomAccessibleInterval> { @@ -82,6 +77,13 @@ public class Outline> * @param output * outlines of the objects in interval */ + /** + * TODO + * + * @param input + * @param excludeEdges + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Boolean excludeEdges, final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Table2Ds.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Table2Ds.java index 8c3a80681..5edfeaca0 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Table2Ds.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/Table2Ds.java @@ -21,11 +21,9 @@ import net.imglib2.type.BooleanType; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Wraps all of input, // final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinHilditch.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinHilditch.java index 98d36406f..8d1e8d119 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinHilditch.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinHilditch.java @@ -32,10 +32,8 @@ import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.logic.BitType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Thinning Operation @@ -44,10 +42,14 @@ * @author Kyle Harrington, Beth Israel Deaconess Medical Center */ @Plugin(type = Op.class, name = "morphology.thinHilditch") -@Parameter(key = "input") -@Parameter(key = "output") public class ThinHilditch extends AbstractThin { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, // final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinMorphological.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinMorphological.java index c8fd2ac52..ef9a4c4c3 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinMorphological.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinMorphological.java @@ -32,10 +32,8 @@ import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.logic.BitType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Thinning Operation @@ -44,10 +42,14 @@ * @author Kyle Harrington, Beth Israel Deaconess Medical Center */ @Plugin(type = Op.class, name = "morphology.thinMorphological") -@Parameter(key = "input") -@Parameter(key = "output") public class ThinMorphological extends AbstractThin { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, // final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinZhangSuen.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinZhangSuen.java index 264de4275..7e10a9dd3 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinZhangSuen.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/morphology/thin/ThinZhangSuen.java @@ -32,10 +32,8 @@ import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.logic.BitType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Thinning Operation @@ -44,10 +42,14 @@ * @author Kyle Harrington, Beth Israel Deaconess Medical Center */ @Plugin(type = Op.class, name = "morphology.thinZhangSuen") -@Parameter(key = "input") -@Parameter(key = "output") public class ThinZhangSuen extends AbstractThin { + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, // final RandomAccessibleInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/DefaultProjectParallel.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/DefaultProjectParallel.java index 812fa435d..e6b784ae1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/DefaultProjectParallel.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/DefaultProjectParallel.java @@ -38,21 +38,23 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "project", priority = Priority.LOW + 1) -@Parameter(key = "input") -@Parameter(key = "op") -@Parameter(key = "dim") -@Parameter(key = "output") public class DefaultProjectParallel implements Computers.Arity3, Computers.Arity1, V>, Integer, RandomAccessibleInterval> { + /** + * TODO + * + * @param input + * @param op + * @param dim + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, Computers.Arity1, V> method, Integer dim, final RandomAccessibleInterval output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/ProjectRAIToIterableInterval.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/ProjectRAIToIterableInterval.java index 28e1f73a0..1ad2fb758 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/ProjectRAIToIterableInterval.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/project/ProjectRAIToIterableInterval.java @@ -38,19 +38,21 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "project", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "op") -@Parameter(key = "dim") -@Parameter(key = "output") public class ProjectRAIToIterableInterval implements Computers.Arity3, Computers.Arity1, V>, Integer, IterableInterval> { + /** + * TODO + * + * @param input + * @param op + * @param dim + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Computers.Arity1, V> method, final Integer dim, final IterableInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectJunctions/DefaultDetectJunctions.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectJunctions/DefaultDetectJunctions.java index fa41a486e..b7f99a98b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectJunctions/DefaultDetectJunctions.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectJunctions/DefaultDetectJunctions.java @@ -44,11 +44,9 @@ import net.imglib2.roi.util.RealLocalizableRealPositionable; import net.imglib2.util.Intervals; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Finds the junctions between a {@link ArrayList} of {@link WritablePolyline}, @@ -62,9 +60,6 @@ * @author Gabe Selzer */ @Plugin(type = Op.class, name = "segment.detectJunctions") -@Parameter(key = "lines") -@Parameter(key = "threshold", description = "Maximum distance between polylines to be considered a junction") -@Parameter(key = "junctions") public class DefaultDetectJunctions implements BiFunction, Double, List> { // @Parameter(required = false) @@ -100,6 +95,13 @@ private RealPoint makeRealPoint(RealLocalizableRealPositionable input) { return new RealPoint(input); } + /** + * TODO + * + * @param lines + * @param threshold Maximum distance between polylines to be considered a junction + * @param junctions + */ @Override public List apply(final List input, final Double threshold) { @@ -317,13 +319,17 @@ private void parallelRoutine(Real } @Plugin(type = Op.class, name = "segment.detectJunctions") -@Parameter(key = "lines") -@Parameter(key = "junctions") class SimpleDetectJunctions implements Function, List> { @OpDependency(name = "segment.detectJunctions") private BiFunction, Double, List> junctionDetector; + /** + * TODO + * + * @param lines + * @param junctions + */ @Override public List apply(List t) { return junctionDetector.apply(t, null); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectRidges/DefaultDetectRidges.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectRidges/DefaultDetectRidges.java index 4ef34ee3b..f7b5c8084 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectRidges/DefaultDetectRidges.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/segment/detectRidges/DefaultDetectRidges.java @@ -48,11 +48,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Performs the Ridge Detection algorithm on a 2-Dimensional, gray-scale image. @@ -60,12 +58,6 @@ * @author Gabe Selzer */ @Plugin(type = Op.class, name = "segment.detectRidges") -@Parameter(key = "input") -@Parameter(key = "width") -@Parameter(key = "lowerThreshold") -@Parameter(key = "higherThreshold") -@Parameter(key = "ridgeLengthMin") -@Parameter(key = "ridges") public class DefaultDetectRidges> implements Functions.Arity5, Double, Double, Double, Integer, List> { @@ -229,6 +221,16 @@ private void getNextPoint(RandomAccess gradientRA, RandomAccess apply(final RandomAccessibleInterval input, final Double width, final Double lowerThreshold, final Double higherThreshold, final Integer ridgeLengthMin) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/slice/SliceRAI2RAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/slice/SliceRAI2RAI.java index 3fcd77477..115b38038 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/slice/SliceRAI2RAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/slice/SliceRAI2RAI.java @@ -34,10 +34,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link SliceOp} implementation for {@link RandomAccessibleInterval} input and @@ -52,14 +50,18 @@ * @author Martin Horn (University of Konstanz) */ @Plugin(type = Op.class, name = "slice", priority = Priority.VERY_HIGH) -@Parameter(key = "input") -@Parameter(key = "Op") -@Parameter(key = "axisIndices") -@Parameter(key = "dropSingleDimensions") -@Parameter(key = "output") public class SliceRAI2RAI implements Computers.Arity4, Computers.Arity1, RandomAccessibleInterval>, int[], Boolean, RandomAccessibleInterval> { + /** + * TODO + * + * @param input + * @param Op + * @param axisIndices + * @param dropSingleDimensions + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Computers.Arity1, RandomAccessibleInterval> op, final int[] axisIndices, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultGeometricMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultGeometricMean.java index 247543dd7..f81bc519f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultGeometricMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultGeometricMean.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.geometricMean} using @@ -51,8 +49,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.geometricMean") -@Parameter(key = "iterableInput") -@Parameter(key = "geometricMean") public class DefaultGeometricMean, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.size") @@ -61,6 +57,12 @@ public class DefaultGeometricMean, O extends RealType> @OpDependency(name = "stats.sumOfLogs") private Computers.Arity1, O> sumOfLogsComputer; + /** + * TODO + * + * @param iterableInput + * @param geometricMean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { final O size = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultHarmonicMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultHarmonicMean.java index f414d0db9..f0bbc2532 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultHarmonicMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultHarmonicMean.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.harmonicMean} using @@ -49,8 +47,6 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.harmonicMean") -@Parameter(key = "iterableInput") -@Parameter(key = "harmonicMean") public class DefaultHarmonicMean, O extends RealType> implements Computers.Arity1, O> { @@ -61,6 +57,12 @@ public class DefaultHarmonicMean, O extends RealType> @OpDependency(name = "stats.sumOfInverses") private Computers.Arity1, O> sumOfInversesComputer; + /** + * TODO + * + * @param iterableInput + * @param harmonicMean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { final O area = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultKurtosis.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultKurtosis.java index 0fcbac050..d5edc2cd9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultKurtosis.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultKurtosis.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.kurtosis} using {@code stats.stdDev} @@ -49,8 +47,6 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.kurtosis") -@Parameter(key = "iterableInput") -@Parameter(key = "kurtosis") public class DefaultKurtosis, O extends RealType> implements Computers.Arity1, O> { @@ -61,6 +57,12 @@ public class DefaultKurtosis, O extends RealType> @OpDependency(name = "stats.moment4AboutMean") private Computers.Arity1, O> moment4AboutMeanComputer; + /** + * TODO + * + * @param iterableInput + * @param kurtosis + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { output.setReal(Double.NaN); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMax.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMax.java index 6a56376ee..9c849f7f7 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMax.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMax.java @@ -37,11 +37,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.max}. Leans on other Ops. @@ -50,13 +48,17 @@ * @param input type */ @Plugin(type = Op.class, name = "stats.max", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "max") public class DefaultMax> implements Computers.Arity1, T> { @OpDependency(name = "stats.minMax") private Function, Pair> minMaxOp; + /** + * TODO + * + * @param iterableInput + * @param max + */ @Override public void compute(final RandomAccessibleInterval input, final T output) { output.set(minMaxOp.apply(input).getB()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMean.java index 8cb5f76fd..5ab59d340 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMean.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.max} using {@code stats.sum} and @@ -51,8 +49,6 @@ */ @Plugin(type = Op.class, name = "stats.mean", priority = Priority.HIGH) -@Parameter(key = "rai") -@Parameter(key = "mean") public class DefaultMean, O extends RealType> implements Computers.Arity1, O> { @@ -63,6 +59,12 @@ public class DefaultMean, O extends RealType> @OpDependency(name = "stats.size") private Computers.Arity1, O> areaComputer; + /** + * TODO + * + * @param rai + * @param mean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMedian.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMedian.java index 67e9e36ca..f695ccdd9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMedian.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMedian.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.median}. @@ -53,14 +51,18 @@ * output type */ @Plugin(type = Op.class, name = "stats.median") -@Parameter(key = "iterableInput") -@Parameter(key = "median") public class DefaultMedian, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.quantile") private Computers.Arity2, Double, O> quantileOp; + /** + * TODO + * + * @param iterableInput + * @param median + */ @Override public void compute(final Iterable input, final O output) { final ArrayList statistics = new ArrayList<>(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMin.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMin.java index d8d64270c..90af396e4 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMin.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMin.java @@ -37,11 +37,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.max}. Leans on other Ops. @@ -50,13 +48,17 @@ * @param input type */ @Plugin(type = Op.class, name = "stats.min", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "max") public class DefaultMin> implements Computers.Arity1, T> { @OpDependency(name = "stats.minMax") private Function, Pair> minMaxOp; + /** + * TODO + * + * @param iterableInput + * @param max + */ @Override public void compute(final RandomAccessibleInterval input, final T output) { output.set(minMaxOp.apply(input).getA()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMinMax.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMinMax.java index 428a419ef..156b78345 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMinMax.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMinMax.java @@ -40,10 +40,8 @@ import net.imglib2.util.ValuePair; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.minMax}. @@ -54,10 +52,14 @@ * input type */ @Plugin(type = Op.class, name = "stats.minMax", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "minMax") public class DefaultMinMax> implements Function, Pair> { + /** + * TODO + * + * @param iterableInput + * @param minMax + */ @Override public Pair apply(final RandomAccessibleInterval input) { // set minVal to the largest possible value and maxVal to the smallest possible. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment1AboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment1AboutMean.java index 8240cefea..0ea32f4da 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment1AboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment1AboutMean.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.moment1AboutMean} @@ -53,11 +51,15 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.moment1AboutMean") -@Parameter(key = "iterableInput") -@Parameter(key = "moment1AboutMean") public class DefaultMoment1AboutMean, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param moment1AboutMean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { output.setZero(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment2AboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment2AboutMean.java index bdedd4976..c5ce2e98f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment2AboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment2AboutMean.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.moment2AboutMean} using @@ -51,13 +49,17 @@ * output type */ @Plugin(type = Op.class, name = "stats.moment2AboutMean", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "moment2AboutMean") public class DefaultMoment2AboutMean, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.momentNAboutMean") private Computers.Arity2, Integer, O> momentComputer; + /** + * TODO + * + * @param iterableInput + * @param moment2AboutMean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { momentComputer.compute(input, 2, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment3AboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment3AboutMean.java index d3950410a..3e32e3b4d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment3AboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment3AboutMean.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.moment3AboutMean} using @@ -51,13 +49,17 @@ * output type */ @Plugin(type = Op.class, name = "stats.moment3AboutMean", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "moment3AboutMean") public class DefaultMoment3AboutMean, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.momentNAboutMean") private Computers.Arity2, Integer, O> momentComputer; + /** + * TODO + * + * @param iterableInput + * @param moment3AboutMean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { momentComputer.compute(input, 3, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment4AboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment4AboutMean.java index 7d61e3d87..1c295f21e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment4AboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMoment4AboutMean.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.moment4AboutMean} using @@ -51,13 +49,17 @@ * output type */ @Plugin(type = Op.class, name = "stats.moment4AboutMean", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "moment4AboutMean") public class DefaultMoment4AboutMean, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.momentNAboutMean") private Computers.Arity2, Integer, O> momentComputer; + /** + * TODO + * + * @param iterableInput + * @param moment4AboutMean + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { momentComputer.compute(input, 4, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMomentNAboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMomentNAboutMean.java index 823608b5d..89b5949df 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMomentNAboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultMomentNAboutMean.java @@ -38,11 +38,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.momentNAboutMean} using @@ -55,8 +53,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.momentNAboutMean", priority = Priority.HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "moment3AboutMean") public class DefaultMomentNAboutMean, O extends RealType> implements Computers.Arity2, Integer, O> { @OpDependency(name = "stats.mean") @@ -66,6 +62,12 @@ public class DefaultMomentNAboutMean, O extends RealType powOp; + /** + * TODO + * + * @param iterableInput + * @param moment3AboutMean + */ @Override public void compute(final RandomAccessibleInterval input, final Integer n, final O output) { final DoubleType mean = new DoubleType(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultPercentile.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultPercentile.java index 103200e75..b47077d56 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultPercentile.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultPercentile.java @@ -32,11 +32,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the n-th {@code stats.percentile}. @@ -50,15 +48,19 @@ * output type */ @Plugin(type = Op.class, name = "stats.percentile") -@Parameter(key = "iterableInput") -@Parameter(key = "percent", min="0", max="100") -@Parameter(key = "percentile") public class DefaultPercentile, O extends RealType> implements Computers.Arity2, Double, O> { @OpDependency(name = "stats.quantile") private Computers.Arity2, Double, O> op; + /** + * TODO + * + * @param iterableInput + * @param percent + * @param percentile + */ @Override public void compute(final Iterable input, final Double percent, final O output) { op.compute(input, percent / 100, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultQuantile.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultQuantile.java index 629e8433f..e3f57f079 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultQuantile.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultQuantile.java @@ -37,10 +37,8 @@ import net.imglib2.util.Intervals; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; import org.scijava.util.ArrayUtils; import org.scijava.util.DoubleArray; @@ -56,13 +54,17 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.quantile") -@Parameter(key = "iterableInput") -@Parameter(key = "quantile", min = "0.0", max = "1.0") -@Parameter(key = "output") public class DefaultQuantile, O extends RealType> implements Computers.Arity2, Double, O> { + /** + * TODO + * + * @param iterableInput + * @param quantile + * @param output + */ @Override public void compute(final Iterable input, final Double quantile, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSize.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSize.java index a97289bcf..d41258d67 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSize.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSize.java @@ -33,10 +33,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.size} of an {@link Interval}. @@ -46,11 +44,15 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.size") -@Parameter(key = "interval") -@Parameter(key = "size") public class DefaultSize, O extends RealType> implements Computers.Arity1 { + /** + * TODO + * + * @param interval + * @param size + */ @Override public void compute(final Interval input, final O output) { output.setOne(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSkewness.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSkewness.java index e4302ed25..a091108eb 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSkewness.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSkewness.java @@ -33,11 +33,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.skewness} using @@ -51,8 +49,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.skewness") -@Parameter(key = "iterableInput") -@Parameter(key = "skewness") public class DefaultSkewness, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.moment3AboutMean") @@ -60,6 +56,12 @@ public class DefaultSkewness, O extends RealType> imple @OpDependency(name = "stats.stdDev") private Computers.Arity1, O> stdDevComputer; + /** + * TODO + * + * @param iterableInput + * @param skewness + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { final O moment3 = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultStandardDeviation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultStandardDeviation.java index 86738ca12..8dbad8d8f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultStandardDeviation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultStandardDeviation.java @@ -34,11 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.stdDev} using @@ -49,8 +47,6 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.stdDev", priority = Priority.HIGH) -@Parameter(key = "raiInput") -@Parameter(key = "stdDev") public class DefaultStandardDeviation, O extends RealType> implements Computers.Arity1, O> { @@ -61,6 +57,12 @@ public class DefaultStandardDeviation, O extends RealType< @OpDependency(name = "math.sqrt") private Computers.Arity1 sqrtComputer; + /** + * TODO + * + * @param raiInput + * @param stdDev + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { O variance = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSum.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSum.java index 0111a39ca..371d4bdfe 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSum.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSum.java @@ -37,10 +37,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sum}. @@ -50,12 +48,16 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.sum", priority = Priority.HIGH) -@Parameter(key = "raiInput") -@Parameter(key = "sum") public class DefaultSum, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param raiInput + * @param sum + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { output.setZero(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfInverses.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfInverses.java index c1c164f3d..40e87d93b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfInverses.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfInverses.java @@ -38,11 +38,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sumOfInverses}. @@ -54,8 +52,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.sumOfInverses", priority = Priority.HIGH) -@Parameter(key = "raiInput") -@Parameter(key = "sumOfInverses") public class DefaultSumOfInverses, O extends RealType> implements Computers.Arity2, O, O> { @OpDependency(name = "create.img") @@ -68,6 +64,12 @@ public class DefaultSumOfInverses, O extends RealType> @OpDependency(name = "stats.sum") private Computers.Arity1, O> sumOp; + /** + * TODO + * + * @param raiInput + * @param sumOfInverses + */ @Override public void compute(final RandomAccessibleInterval input, final O dbzValue, final O output) { RandomAccessibleInterval tmpImg = imgCreator.apply(input, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfLogs.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfLogs.java index f4e18c037..821676178 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfLogs.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfLogs.java @@ -39,11 +39,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sumOfLogs}. @@ -55,8 +53,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.sumOfLogs", priority = Priority.HIGH) -@Parameter(key = "raiInput") -@Parameter(key = "sumOfLogs") public class DefaultSumOfLogs, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "create.img") @@ -68,6 +64,12 @@ public class DefaultSumOfLogs, O extends RealType> impl @OpDependency(name = "stats.sum") private Computers.Arity1, O> sumOp; + /** + * TODO + * + * @param raiInput + * @param sumOfLogs + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { RandomAccessibleInterval logImg = imgCreator.apply(input, new DoubleType()); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfSquares.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfSquares.java index 2b7a53cba..667fa72a5 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfSquares.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultSumOfSquares.java @@ -37,11 +37,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sumOfSquares}. Leans on other Ops. @@ -51,8 +49,6 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.sumOfSquares", priority = Priority.HIGH) -@Parameter(key = "raiInput") -@Parameter(key = "sumOfSquares") public class DefaultSumOfSquares, O extends RealType> implements Computers.Arity1, O> { @@ -66,6 +62,12 @@ public class DefaultSumOfSquares, O extends RealType> @OpDependency(name = "stats.sum") private Computers.Arity1, O> sumOp; + /** + * TODO + * + * @param raiInput + * @param sumOfSquares + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { RandomAccessibleInterval tmpImg = imgCreator.apply(input, output); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultVariance.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultVariance.java index 158177876..e27a6f62a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultVariance.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/DefaultVariance.java @@ -40,11 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.variance} using the @@ -61,8 +59,6 @@ * Wikipedia */ @Plugin(type = Op.class, name = "stats.variance", priority = Priority.HIGH) -@Parameter(key = "raiInput") -@Parameter(key = "variance") public class DefaultVariance, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.mean") @@ -71,6 +67,12 @@ public class DefaultVariance, O extends RealType> imple @OpDependency(name = "stats.size") private Computers.Arity1, LongType> sizeOp; + /** + * TODO + * + * @param raiInput + * @param variance + */ @Override public void compute(final RandomAccessibleInterval input, final O output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralMean.java index d5f269572..7b64e2e1b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralMean.java @@ -39,10 +39,8 @@ import net.imglib2.view.composite.Composite; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.mean} from an integral image using a @@ -53,10 +51,14 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "stats.integralMean") -@Parameter(key = "iterableInput") -@Parameter(key = "integralMean") public class IntegralMean> implements Computers.Arity1>, DoubleType> { + /** + * TODO + * + * @param iterableInput + * @param integralMean + */ @Override public void compute(final RectangleNeighborhood> input, final DoubleType output) { // computation according to diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralSum.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralSum.java index bb932fba6..9b2d02075 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralSum.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralSum.java @@ -37,10 +37,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sum} from an integral image using a @@ -51,10 +49,14 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "stats.integralSum") -@Parameter(key = "iterableInput") -@Parameter(key = "integralSum") public class IntegralSum> implements Computers.Arity1, DoubleType> { + /** + * TODO + * + * @param iterableInput + * @param integralSum + */ @Override public void compute(final RectangleNeighborhood input, final DoubleType output) { // computation according to diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralVariance.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralVariance.java index 4959428ca..582b1b91e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralVariance.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IntegralVariance.java @@ -39,10 +39,8 @@ import net.imglib2.view.composite.Composite; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.variance} from an integral image @@ -53,11 +51,15 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "stats.integralVariance") -@Parameter(key = "iterableInput") -@Parameter(key = "integralVariance") public class IntegralVariance> implements Computers.Arity1>, DoubleType> { + /** + * TODO + * + * @param iterableInput + * @param integralVariance + */ @Override public void compute(final RectangleNeighborhood> input, final DoubleType output) { // computation according to diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableGeometricMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableGeometricMean.java index 01934c284..6de6324bf 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableGeometricMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableGeometricMean.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.geometricMean} directly. @@ -49,10 +47,14 @@ * output type */ @Plugin(type = Op.class, name = "stats.geometricMean", priority = Priority.VERY_HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "geometricMean") public class IterableGeometricMean, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param geometricMean + */ @Override public void compute(final Iterable input, final O output) { double size = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableHarmonicMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableHarmonicMean.java index d6afbe933..f1a4bf83b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableHarmonicMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableHarmonicMean.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.harmonicMean} directly. @@ -49,10 +47,14 @@ * output type */ @Plugin(type = Op.class, name = "stats.harmonicMean", priority = Priority.VERY_HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "harmonicMean") public class IterableHarmonicMean, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param harmonicMean + */ @Override public void compute(final Iterable input, final O output) { double size = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMax.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMax.java index 12b58d1dd..cc41b34a1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMax.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMax.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.max}. @@ -48,10 +46,14 @@ * input type */ @Plugin(type = Op.class, name = "stats.max") -@Parameter(key = "iterableInput") -@Parameter(key = "max") public class IterableMax> implements Computers.Arity1, T> { + /** + * TODO + * + * @param iterableInput + * @param max + */ @Override public void compute(final Iterable input, final T output) { // Re-use output to compare against diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMean.java index 7a89f899f..ec2d57993 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMean.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.mean} directly. @@ -49,10 +47,14 @@ * output type */ @Plugin(type = Op.class, name = "stats.mean", priority = Priority.VERY_HIGH) -@Parameter(key = "iterableInput") -@Parameter(key = "mean") public class IterableMean, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param mean + */ @Override public void compute(final Iterable input, final O output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMin.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMin.java index b14ced9ef..af2e5550e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMin.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMin.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.min}. @@ -48,10 +46,14 @@ * input type */ @Plugin(type = Op.class, name = "stats.min") -@Parameter(key = "iterableInput") -@Parameter(key = "min") public class IterableMin> implements Computers.Arity1, T> { + /** + * TODO + * + * @param iterableInput + * @param min + */ @Override public void compute(final Iterable input, final T output) { // Re-use output to compare against diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMinMax.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMinMax.java index 329464570..63c0f6ca1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMinMax.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMinMax.java @@ -36,10 +36,8 @@ import net.imglib2.util.Pair; import net.imglib2.util.ValuePair; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.minMax}. @@ -50,10 +48,14 @@ * input type */ @Plugin(type = Op.class, name = "stats.minMax") -@Parameter(key = "iterableInput") -@Parameter(key = "minMax") public class IterableMinMax> implements Function, Pair> { + /** + * TODO + * + * @param iterableInput + * @param minMax + */ @Override public Pair apply(final Iterable input) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment3AboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment3AboutMean.java index 96a92fb90..c198b116b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment3AboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment3AboutMean.java @@ -32,11 +32,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.moment3AboutMean} using @@ -50,8 +48,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.moment3AboutMean") -@Parameter(key = "iterableInput") -@Parameter(key = "moment3AboutMean") public class IterableMoment3AboutMean, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.mean") @@ -59,6 +55,12 @@ public class IterableMoment3AboutMean, O extends RealType< @OpDependency(name = "stats.size") private Computers.Arity1, O> sizeComputer; + /** + * TODO + * + * @param iterableInput + * @param moment3AboutMean + */ @Override public void compute(final Iterable input, final O output) { final O mean = output.createVariable(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment4AboutMean.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment4AboutMean.java index ec193935c..26b3a18fa 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment4AboutMean.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableMoment4AboutMean.java @@ -32,11 +32,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.moment4AboutMean} using @@ -50,8 +48,6 @@ * output type */ @Plugin(type = Op.class, name = "stats.moment4AboutMean") -@Parameter(key = "iterableInput") -@Parameter(key = "moment4AboutMean") public class IterableMoment4AboutMean, O extends RealType> implements Computers.Arity1, O> { @OpDependency(name = "stats.mean") @@ -59,6 +55,12 @@ public class IterableMoment4AboutMean, O extends RealType< @OpDependency(name = "stats.size") private Computers.Arity1, O> sizeComputer; + /** + * TODO + * + * @param iterableInput + * @param moment4AboutMean + */ @Override public void compute(final Iterable input, final O output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSize.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSize.java index 037125464..13d6bd1ae 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSize.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSize.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.size}. @@ -47,12 +45,16 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.size", priority = Priority.LOW) -@Parameter(key = "iterableInput") -@Parameter(key = "size") public class IterableSize, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param size + */ @Override public void compute(final Iterable input, final O output) { double size = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableStandardDeviation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableStandardDeviation.java index 8aecdeb2f..cb424919e 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableStandardDeviation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableStandardDeviation.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.stdDev} directly. @@ -49,11 +47,15 @@ * output type */ @Plugin(type = Op.class, name = "stats.stdDev") -@Parameter(key = "iterableInput") -@Parameter(key = "stdDev") public class IterableStandardDeviation, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param stdDev + */ @Override public void compute(final Iterable input, final O output) { double sum = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSum.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSum.java index 0cea35922..67236bca6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSum.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSum.java @@ -32,10 +32,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sum}. @@ -46,12 +44,16 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.sum") -@Parameter(key = "iterableInput") -@Parameter(key = "sum") public class IterableSum, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param sum + */ @Override public void compute(final Iterable input, final O output) { double sum = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfInverses.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfInverses.java index f591357fc..dfdec7c46 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfInverses.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfInverses.java @@ -32,10 +32,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sumOfInverses}. @@ -49,10 +47,14 @@ * output type */ @Plugin(type = Op.class, name = "stats.sumOfInverses") -@Parameter(key = "iterableInput") -@Parameter(key = "sumOfInverses") public class IterableSumOfInverses, O extends RealType> implements Computers.Arity2, O, O> { + /** + * TODO + * + * @param iterableInput + * @param sumOfInverses + */ @Override public void compute(final Iterable input, final O dbzValue, final O output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfLogs.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfLogs.java index 7c880dd57..d3ed3a29f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfLogs.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfLogs.java @@ -32,10 +32,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sumOfLogs}. @@ -48,10 +46,14 @@ * output type */ @Plugin(type = Op.class, name = "stats.sumOfLogs") -@Parameter(key = "iterableInput") -@Parameter(key = "sumOfLogs") public class IterableSumOfLogs, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param sumOfLogs + */ @Override public void compute(final Iterable input, final O output) { double res = 0.0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfSquares.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfSquares.java index 1d30def99..b21f25719 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfSquares.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableSumOfSquares.java @@ -32,10 +32,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.sumOfSquares}. @@ -46,12 +44,16 @@ * @param output type */ @Plugin(type = Op.class, name = "stats.sumOfSquares") -@Parameter(key = "iterableInput") -@Parameter(key = "sumOfSquares") public class IterableSumOfSquares, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param sumOfSquares + */ @Override public void compute(final Iterable input, final O output) { double res = 0.0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableVariance.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableVariance.java index e12d7d3c0..8cc3aa571 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableVariance.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/IterableVariance.java @@ -33,10 +33,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * {@link Op} to calculate the {@code stats.variance} using the online algorithm @@ -53,10 +51,14 @@ * Wikipedia */ @Plugin(type = Op.class, name = "stats.variance") -@Parameter(key = "iterableInput") -@Parameter(key = "variance") public class IterableVariance, O extends RealType> implements Computers.Arity1, O> { + /** + * TODO + * + * @param iterableInput + * @param variance + */ @Override public void compute(final Iterable input, final O output) { int n = 0; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/regression/leastSquares/Quadric.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/regression/leastSquares/Quadric.java index 1d496fd03..24a0d9496 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/regression/leastSquares/Quadric.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/stats/regression/leastSquares/Quadric.java @@ -38,10 +38,8 @@ import org.ojalgo.matrix.BasicMatrix; import org.ojalgo.matrix.PrimitiveMatrix; import org.ojalgo.random.Deterministic; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An op that fits a quadratic surface (quadric) into a set of points. @@ -59,8 +57,6 @@ * @author Richard Domander (Royal Veterinary College, London) */ @Plugin(type = Op.class, name = "stats.leastSquares") -@Parameter(key = "vectorCollection") -@Parameter(key = "outputMatrix") public class Quadric implements Function, Matrix4d> { @@ -71,6 +67,12 @@ public class Quadric implements */ public static final int MIN_DATA = 9; + /** + * TODO + * + * @param vectorCollection + * @return the outputMatrix + */ @Override public Matrix4d apply(final Collection points) { if (points.size() < MIN_DATA) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/ChunkerInterleaved.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/ChunkerInterleaved.java index a30889d0b..d0e91e132 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/ChunkerInterleaved.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/ChunkerInterleaved.java @@ -35,10 +35,8 @@ import org.scijava.Priority; import org.scijava.function.Inplaces; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of a {@link ChunkerOp} that interleaves the chunks. In a @@ -49,13 +47,17 @@ * @author Michael Zinsmaier (University of Konstanz) */ @Plugin(type = Op.class, name = "thread.chunker", priority = Priority.VERY_LOW) -@Parameter(key = "chunk") -@Parameter(key = "numberOfElements") -@Parameter(key = "executorService") public class ChunkerInterleaved implements Inplaces.Arity3_1{ private String cancellationMsg; + /** + * TODO + * + * @param chunk + * @param numberOfElements + * @param executorService + */ @Override public void mutate(final Chunk chunk, final Long numberOfElements, final ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/DefaultChunker.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/DefaultChunker.java index e46bd7a5d..1d9f58f8d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/DefaultChunker.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/thread/chunker/DefaultChunker.java @@ -35,10 +35,8 @@ import java.util.concurrent.Future; import org.scijava.function.Inplaces; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Simple default implementation of a {@link ChunkerOp}. The list of @@ -49,13 +47,17 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "thread.chunker") -@Parameter(key = "chunk") -@Parameter(key = "numberOfElements") -@Parameter(key = "executorService") public class DefaultChunker implements Inplaces.Arity3_1 { private final int STEP_SIZE = 1; + /** + * TODO + * + * @param chunk + * @param numberOfElements + * @param executorService + */ @Override public void mutate(final Chunk chunk, final Long numberOfElements, final ExecutorService es) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdImg.java index ca1492a96..f54a68fa0 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdImg.java @@ -36,7 +36,7 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; +import org.scijava.ops.spi.OpDependency; /** * @author Curtis Rueden diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdIterable.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdIterable.java index 568c7e821..e717568cc 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdIterable.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/AbstractApplyThresholdIterable.java @@ -32,16 +32,12 @@ import net.imglib2.type.logic.BitType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.param.Parameter; -import org.scijava.struct.ItemIO; +import org.scijava.ops.spi.OpDependency; /** * @author Curtis Rueden * @author Christian Dietz (University of Konstanz) */ -@Parameter(key = "input") -@Parameter(key = "output") public abstract class AbstractApplyThresholdIterable implements Computers.Arity1, Iterable> { @@ -49,6 +45,12 @@ public abstract class AbstractApplyThresholdIterable implements @OpDependency(name = "threshold.apply") private Computers.Arity2, T, Iterable> applyThresholdOp; + /** + * TODO + * + * @param input + * @param output + */ @Override public void compute(final Iterable input, final Iterable output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyLocalThresholdIntegral.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyLocalThresholdIntegral.java index f5b1654b2..ba2c5ea89 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyLocalThresholdIntegral.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyLocalThresholdIntegral.java @@ -53,8 +53,8 @@ import net.imglib2.view.composite.GenericComposite; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpExecutionException; +import org.scijava.ops.engine.OpExecutionException; +import org.scijava.ops.spi.OpDependency; /** * Apply a local thresholding method to an image using integral images for speed diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethod.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethod.java index a6ff3106e..777342632 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethod.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethod.java @@ -34,8 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethodLocal.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethodLocal.java index fed4ce24f..0a35ded60 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethodLocal.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ApplyThresholdMethodLocal.java @@ -42,11 +42,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Ops which compute and apply a local threshold to an image. @@ -311,10 +309,6 @@ protected Computers.Arity1, T> getComputeThresholdOp() { } } - @Parameter(key = "input") - @Parameter(key = "inputNeighborhoodShape") - @Parameter(key = "outOfBoundsFactory", required = false) - @Parameter(key = "output") private abstract static class AbstractApplyLocalHistogramBasedThreshold> implements Computers.Arity3, Shape, OutOfBoundsFactory>, // @@ -332,6 +326,14 @@ private abstract static class AbstractApplyLocalHistogramBasedThreshold, T, BitType> thresholdOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param outOfBoundsFactory (required = false) + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyConstantThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyConstantThreshold.java index 095e24d6f..9e82e43b8 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyConstantThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyConstantThreshold.java @@ -35,13 +35,11 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.Adapt; -import org.scijava.ops.util.Maps; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.engine.util.Maps; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Applies the given threshold value to every element along the given @@ -51,10 +49,6 @@ * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.apply") -@Parameter(key = "input") -@Parameter(key = "threshold") -@Parameter(key = "comparator") -@Parameter(key = "output") public class ApplyConstantThreshold> implements Computers.Arity3, T, Comparator, Iterable> { @@ -62,6 +56,14 @@ public class ApplyConstantThreshold> Computers.Arity3, BitType> applyThreshold; // TODO can/should the Comparator be of instead of just ? + /** + * TODO + * + * @param input + * @param threshold + * @param comparator + * @param output + */ @Override public void compute(final Iterable input1, final T input2, final Comparator comparator, final Iterable output) { @@ -78,15 +80,19 @@ public void compute(final Iterable input1, final T input2, final Comparator> implements Computers.Arity2, T, Iterable> { @OpDependency(name = "threshold.apply") Computers.Arity3, T, Comparator, Iterable> applyThreshold; // TODO can/should the Comparator be of instead of just ? + /** + * TODO + * + * @param input + * @param threshold + * @param output + */ @Override public void compute(final Iterable input1, final T input2, final Iterable output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparable.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparable.java index 77feacc64..5244adf79 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparable.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparable.java @@ -32,10 +32,8 @@ import net.imglib2.type.logic.BitType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Applies a threshold value (the second input) to the given comparable object, @@ -45,13 +43,17 @@ * @author Martin Horn (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.apply") -@Parameter(key = "input") -@Parameter(key = "threshold") -@Parameter(key = "output") public class ApplyThresholdComparable implements Computers.Arity2, T, BitType> { + /** + * TODO + * + * @param input + * @param threshold + * @param output + */ @Override public void compute(final Comparable input, final T threshold, final BitType output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparator.java index 690fd1af5..5d5d48be0 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/apply/ApplyThresholdComparator.java @@ -34,10 +34,8 @@ import net.imglib2.type.logic.BitType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Applies a threshold value (the second input) to the given object using the @@ -47,13 +45,17 @@ * @author Curtis Rueden */ @Plugin(type = Op.class, name = "threshold.apply") -@Parameter(key = "input") -@Parameter(key = "threshold") -@Parameter(key = "comparator") -@Parameter(key = "output") public class ApplyThresholdComparator implements Computers.Arity3, BitType> { + /** + * TODO + * + * @param input + * @param threshold + * @param comparator + * @param output + */ @Override public void compute(T input1, T input2, Comparator comparator, BitType out) { out.set(comparator.compare(input1, input2) > 0); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/huang/ComputeHuangThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/huang/ComputeHuangThreshold.java index 688775164..a72b3e25b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/huang/ComputeHuangThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/huang/ComputeHuangThreshold.java @@ -33,10 +33,8 @@ import net.imglib2.histogram.Histogram1d; import net.imglib2.type.numeric.RealType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; //NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold //plugin found in Fiji (version 1.14). @@ -48,12 +46,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.huang") -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeHuangThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ij1/ComputeIJ1Threshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ij1/ComputeIJ1Threshold.java index 80b79f04d..7ad516b58 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ij1/ComputeIJ1Threshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/ij1/ComputeIJ1Threshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). The method was ported from IJ1 by @@ -51,12 +49,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.ij1", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeIJ1Threshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/intermodes/ComputeIntermodesThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/intermodes/ComputeIntermodesThreshold.java index 1a21a6f87..9da08967b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/intermodes/ComputeIntermodesThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/intermodes/ComputeIntermodesThreshold.java @@ -35,11 +35,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.OpExecutionException; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.OpExecutionException; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -52,8 +50,6 @@ */ @Plugin(type = Op.class, name = "threshold.intermodes", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeIntermodesThreshold> extends AbstractComputeThresholdHistogram { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/isoData/ComputeIsoDataThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/isoData/ComputeIsoDataThreshold.java index acf2c1da2..49758da71 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/isoData/ComputeIsoDataThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/isoData/ComputeIsoDataThreshold.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.OpExecutionException; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.OpExecutionException; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -51,12 +49,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.isoData", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeIsoDataThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/li/ComputeLiThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/li/ComputeLiThreshold.java index 3e79eb09b..833e52034 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/li/ComputeLiThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/li/ComputeLiThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -50,12 +48,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.li", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeLiThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/ComputeLocalBernsenThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/ComputeLocalBernsenThreshold.java index 375b010f9..63975d86b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/ComputeLocalBernsenThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/ComputeLocalBernsenThreshold.java @@ -37,11 +37,9 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Local threshold method which is similar to @@ -54,11 +52,6 @@ * @param input type */ @Plugin(type = Op.class, name = "threshold.localBernsen") -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "contrastThreshold") -@Parameter(key = "halfMaxValue") -@Parameter(key = "output") public class ComputeLocalBernsenThreshold> implements Computers.Arity4, T, Double, Double, BitType> { @@ -66,6 +59,15 @@ public class ComputeLocalBernsenThreshold> implements @OpDependency(name = "stats.minMax") private Function, Pair> minMaxOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param contrastThreshold + * @param halfMaxValue + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double contrastThreshold, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/LocalBernsenThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/LocalBernsenThreshold.java index 89ecf5ee7..2c0b8835a 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/LocalBernsenThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localBernsen/LocalBernsenThreshold.java @@ -38,11 +38,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Jonathan Hale @@ -50,12 +48,6 @@ * @param input type */ @Plugin(type = Op.class, name = "threshold.localBernsen") -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "contrastThreshold") -@Parameter(key = "halfMaxValue") -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalBernsenThreshold> implements Computers.Arity5, Shape, Double, Double, OutOfBoundsFactory>, // RandomAccessibleInterval> { @@ -63,6 +55,16 @@ public class LocalBernsenThreshold> implements @OpDependency(name = "threshold.localBernsen") private Computers.Arity4, T, Double, Double, BitType> computeThresholdOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param contrastThreshold + * @param halfMaxValue + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double contrastThreshold, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/ComputeLocalContrastThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/ComputeLocalContrastThreshold.java index 344c2e499..c3c89b948 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/ComputeLocalContrastThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/ComputeLocalContrastThreshold.java @@ -36,11 +36,9 @@ import net.imglib2.util.Pair; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Local threshold method which determines whether a pixel is closer to the @@ -50,9 +48,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.localContrast") -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "output") public class ComputeLocalContrastThreshold> implements Computers.Arity2, T, BitType> { @@ -60,6 +55,13 @@ public class ComputeLocalContrastThreshold> implements @OpDependency(name = "stats.minMax") private Function, Pair> minMaxOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final BitType output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/LocalContrastThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/LocalContrastThreshold.java index 11c1a6ff2..979e6365b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/LocalContrastThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localContrast/LocalContrastThreshold.java @@ -38,21 +38,15 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Jonathan Hale * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.localContrast") -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalContrastThreshold> implements Computers.Arity3, Shape, OutOfBoundsFactory>, // RandomAccessibleInterval> { @@ -60,6 +54,14 @@ public class LocalContrastThreshold> implements @OpDependency(name = "threshold.localContrast") private Computers.Arity2, T, BitType> computeThresholdOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThreshold.java index d97668a12..68ca211cf 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThreshold.java @@ -35,11 +35,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Local threshold method that uses the mean and operates directly of RAIs. @@ -49,10 +47,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.localMean", priority = Priority.LOW) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "c") -@Parameter(key = "output") public class ComputeLocalMeanThreshold> implements Computers.Arity3, T, Double, BitType> { @@ -60,6 +54,14 @@ public class ComputeLocalMeanThreshold> implements @OpDependency(name = "stats.mean") private Computers.Arity1, DoubleType> meanOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param c + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double c, final BitType output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThresholdIntegral.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThresholdIntegral.java index 686df74af..be1a5a0ee 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThresholdIntegral.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/ComputeLocalMeanThresholdIntegral.java @@ -39,11 +39,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -64,10 +62,6 @@ */ @Plugin(type = Op.class, name = "threshold.localMean", priority = Priority.LOW - 1) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "c") -@Parameter(key = "output") public class ComputeLocalMeanThresholdIntegral, U extends RealType> implements Computers.Arity3>, T, Double, BitType> { @@ -75,6 +69,14 @@ public class ComputeLocalMeanThresholdIntegral, U extends @OpDependency(name = "stats.integralMean") private Computers.Arity1>, DoubleType> integralMeanOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param c + * @param output + */ @Override public void compute( final RectangleNeighborhood> inputNeighborhood, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/LocalMeanThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/LocalMeanThreshold.java index 2e075699f..120178927 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/LocalMeanThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMean/LocalMeanThreshold.java @@ -48,11 +48,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implementation of the local mean threshold method for images. Makes use of @@ -64,11 +62,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.localMean", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "c") -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalMeanThreshold> extends ApplyLocalThresholdIntegral implements Computers.Arity4, Shape, Double, OutOfBoundsFactory>, // @@ -82,6 +75,15 @@ public class LocalMeanThreshold> extends @OpDependency(name = "threshold.localMean") private Computers.Arity3>, T, Double, BitType> computeThresholdIntegralOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param c + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double c, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/ComputeLocalMedianThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/ComputeLocalMedianThreshold.java index 0591e5ef7..d540630a9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/ComputeLocalMedianThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/ComputeLocalMedianThreshold.java @@ -34,11 +34,9 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Local threshold method using median. @@ -47,10 +45,6 @@ * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.localMedian") -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "c") -@Parameter(key = "output") public class ComputeLocalMedianThreshold> implements Computers.Arity3, T, Double, BitType> { @@ -58,6 +52,14 @@ public class ComputeLocalMedianThreshold> implements @OpDependency(name = "stats.median") private Computers.Arity1, DoubleType> medianOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param c + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double c, final BitType output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/LocalMedianThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/LocalMedianThreshold.java index afc915340..ef6baee98 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/LocalMedianThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMedian/LocalMedianThreshold.java @@ -38,22 +38,15 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Jonathan Hale * @author Stefan Helfrich (University of Konstanz) */ @Plugin(type = Op.class, name = "threshold.localMedian") -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "c") -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalMedianThreshold> implements Computers.Arity4, Shape, Double, OutOfBoundsFactory>, // RandomAccessibleInterval> { @@ -61,6 +54,15 @@ public class LocalMedianThreshold> implements @OpDependency(name = "threshold.localMedian") private Computers.Arity3, T, Double, BitType> computeThresholdOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param c + * @param outOfBoundsFactory + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double c, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/ComputeLocalMidGreyThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/ComputeLocalMidGreyThreshold.java index c901be476..edbd13459 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/ComputeLocalMidGreyThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/ComputeLocalMidGreyThreshold.java @@ -37,11 +37,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Local threshold method which thresholds against the average of the maximum @@ -52,10 +50,6 @@ */ @Plugin(type = Op.class, name = "threshold.localMidGrey", priority = Priority.LOW) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "c") -@Parameter(key = "output") public class ComputeLocalMidGreyThreshold> implements Computers.Arity3, T, Double, BitType> { @@ -63,6 +57,14 @@ public class ComputeLocalMidGreyThreshold> implements @OpDependency(name = "stats.minMax") private Function, Pair> minMaxOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param c + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double c, final BitType output) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/LocalMidGreyThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/LocalMidGreyThreshold.java index 20526f750..d3dc1220c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/LocalMidGreyThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localMidGrey/LocalMidGreyThreshold.java @@ -39,11 +39,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Jonathan Hale @@ -51,11 +49,6 @@ */ @Plugin(type = Op.class, name = "threshold.localMidGrey", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "c") -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalMidGreyThreshold> implements Computers.Arity4, Shape, Double, OutOfBoundsFactory>, // RandomAccessibleInterval> { @@ -63,6 +56,15 @@ public class LocalMidGreyThreshold> implements @OpDependency(name = "threshold.localMidGrey") private Computers.Arity3, T, Double, BitType> computeThresholdOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param c + * @param outOfBoundsFactory (required = false) + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double c, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThreshold.java index 265242828..717ddbb2f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThreshold.java @@ -35,11 +35,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * LocalThresholdMethod using Niblack's thresholding method. @@ -49,11 +47,6 @@ */ @Plugin(type = Op.class, name = "threshold.localNiblack", priority = Priority.LOW) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "c") -@Parameter(key = "k") -@Parameter(key = "output") public class ComputeLocalNiblackThreshold> implements Computers.Arity4, T, Double, Double, BitType> { @@ -64,6 +57,15 @@ public class ComputeLocalNiblackThreshold> implements @OpDependency(name = "stats.stdDev") private Computers.Arity1, DoubleType> stdDeviationOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param c + * @param k + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double c, final Double k, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThresholdIntegral.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThresholdIntegral.java index 7720b347a..0a77d03b9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThresholdIntegral.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/ComputeLocalNiblackThresholdIntegral.java @@ -40,11 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -64,11 +62,6 @@ */ @Plugin(type = Op.class, name = "threshold.localNiblack", priority = Priority.LOW - 1) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "c") -@Parameter(key = "k") -@Parameter(key = "output") public class ComputeLocalNiblackThresholdIntegral, U extends RealType> implements Computers.Arity4>, T, Double, Double, BitType> @@ -80,6 +73,15 @@ public class ComputeLocalNiblackThresholdIntegral, U exten @OpDependency(name = "stats.integralVariance") private Computers.Arity1>, DoubleType> integralVarianceOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param c + * @param k + * @param output + */ @Override public void compute( final RectangleNeighborhood> inputNeighborhood, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/LocalNiblackThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/LocalNiblackThreshold.java index 699313436..b7d31fd17 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/LocalNiblackThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localNiblack/LocalNiblackThreshold.java @@ -47,20 +47,12 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "threshold.localNiblack", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "c") -@Parameter(key = "k") -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalNiblackThreshold> extends ApplyLocalThresholdIntegral implements Computers.Arity5, Shape, Double, Double, OutOfBoundsFactory>, // @@ -75,6 +67,16 @@ public class LocalNiblackThreshold> extends @OpDependency(name = "threshold.localNiblack") private Computers.Arity4>, T, Double, Double, BitType> computeThresholdIntegralOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param c + * @param k + * @param outOfBoundsFactory (required = false) + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double c, final Double k, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThreshold.java index dc85b4da2..2bc936525 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThreshold.java @@ -35,11 +35,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -69,11 +67,6 @@ */ @Plugin(type = Op.class, name = "threshold.localPhansalkar", priority = Priority.LOW) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "k", required = false) -@Parameter(key = "r", required = false) -@Parameter(key = "output") public class ComputeLocalPhansalkarThreshold> implements Computers.Arity4, T, Double, Double, BitType> { @@ -90,6 +83,15 @@ public class ComputeLocalPhansalkarThreshold> implements @OpDependency(name = "stats.stdDev") private Computers.Arity1, DoubleType> stdDeviationOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param k (required = false) + * @param r (required = false) + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double k, final Double r, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThresholdIntegral.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThresholdIntegral.java index 6ace4015c..4a053a70d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThresholdIntegral.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/ComputeLocalPhansalkarThresholdIntegral.java @@ -40,11 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -64,11 +62,6 @@ */ @Plugin(type = Op.class, name = "threshold.localPhansalkar", priority = Priority.LOW - 1) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "k", required = false) -@Parameter(key = "r", required = false) -@Parameter(key = "output") public class ComputeLocalPhansalkarThresholdIntegral> implements Computers.Arity4>, T, Double, Double, BitType> @@ -86,6 +79,15 @@ public class ComputeLocalPhansalkarThresholdIntegral> @OpDependency(name = "stats.integralVariance") private Computers.Arity1>, DoubleType> integralVarianceOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param k (required = false) + * @param r (required = false) + * @param output + */ @Override public void compute( final RectangleNeighborhood> inputNeighborhood, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/LocalPhansalkarThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/LocalPhansalkarThreshold.java index ac53959f5..5ded94ce9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/LocalPhansalkarThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localPhansalkar/LocalPhansalkarThreshold.java @@ -47,20 +47,12 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "threshold.localPhansalkar", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "k", required = false) -@Parameter(key = "r", required = false) -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalPhansalkarThreshold> extends ApplyLocalThresholdIntegral implements Computers.Arity5, Shape, Double, Double, OutOfBoundsFactory>, // @@ -75,6 +67,16 @@ public class LocalPhansalkarThreshold> extends @OpDependency(name = "threshold.localPhansalkar") private Computers.Arity4>, T, Double, Double, BitType> computeThresholdIntegralOp; + /** + * TODO + * + * @param input + * @param inputneighborhoodshape + * @param k (required = false) + * @Param r (required = false) + * @Param outOfBoundsFactory (required = false) + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double k, final Double r, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThreshold.java index ed8a72e22..85e029a38 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThreshold.java @@ -35,11 +35,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -61,11 +59,6 @@ */ @Plugin(type = Op.class, name = "threshold.localSauvola", priority = Priority.LOW) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "k", required = false) -@Parameter(key = "r", required = false) -@Parameter(key = "output") public class ComputeLocalSauvolaThreshold> implements Computers.Arity4, T, Double, Double, BitType> { @@ -79,6 +72,15 @@ public class ComputeLocalSauvolaThreshold> implements @OpDependency(name = "stats.stdDev") private Computers.Arity1, DoubleType> stdDeviationOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param k (required = false) + * @param r (required = false) + * @param output + */ @Override public void compute(final Iterable inputNeighborhood, final T inputCenterPixel, final Double k, final Double r, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThresholdIntegral.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThresholdIntegral.java index 1dd29f73e..c840ce57d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThresholdIntegral.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/ComputeLocalSauvolaThresholdIntegral.java @@ -40,11 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

@@ -64,11 +62,6 @@ */ @Plugin(type = Op.class, name = "threshold.localSauvola", priority = Priority.LOW - 1) -@Parameter(key = "inputNeighborhood") -@Parameter(key = "inputCenterPixel") -@Parameter(key = "k", required = false) -@Parameter(key = "r", required = false) -@Parameter(key = "output") public class ComputeLocalSauvolaThresholdIntegral> implements Computers.Arity4>, T, Double, Double, BitType> @@ -83,6 +76,15 @@ public class ComputeLocalSauvolaThresholdIntegral> @OpDependency(name = "stats.integralVariance") private Computers.Arity1>, DoubleType> integralVarianceOp; + /** + * TODO + * + * @param inputNeighborhood + * @param inputCenterPixel + * @param k (required = false) + * @param r (required = false) + * @param output + */ @Override public void compute( final RectangleNeighborhood> inputNeighborhood, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/LocalSauvolaThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/LocalSauvolaThreshold.java index 02aad0235..757c47ef6 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/LocalSauvolaThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/localSauvola/LocalSauvolaThreshold.java @@ -47,20 +47,12 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = Op.class, name = "threshold.localSauvola", priority = Priority.LOW) -@Parameter(key = "input") -@Parameter(key = "inputNeighborhoodShape") -@Parameter(key = "k", required = false) -@Parameter(key = "r", required = false) -@Parameter(key = "outOfBoundsFactory", required = false) -@Parameter(key = "output") public class LocalSauvolaThreshold> extends ApplyLocalThresholdIntegral implements Computers.Arity5, Shape, Double, Double, OutOfBoundsFactory>, // @@ -75,6 +67,16 @@ public class LocalSauvolaThreshold> extends @OpDependency(name = "threshold.localSauvola") private Computers.Arity4>, T, Double, Double, BitType> computeThresholdIntegralOp; + /** + * TODO + * + * @param input + * @param inputNeighborhoodShape + * @param k (required = false) + * @param r (required = false) + * @param outOfBoundsFactory (required = false) + * @param output + */ @Override public void compute(final RandomAccessibleInterval input, final Shape inputNeighborhoodShape, final Double k, final Double r, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxEntropy/ComputeMaxEntropyThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxEntropy/ComputeMaxEntropyThreshold.java index 7c8740743..dff6ee314 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxEntropy/ComputeMaxEntropyThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxEntropy/ComputeMaxEntropyThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "threshold.maxEntropy", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeMaxEntropyThreshold> extends AbstractComputeThresholdHistogram { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxLikelihood/ComputeMaxLikelihoodThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxLikelihood/ComputeMaxLikelihoodThreshold.java index 1e5819f19..eff8a1281 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxLikelihood/ComputeMaxLikelihoodThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/maxLikelihood/ComputeMaxLikelihoodThreshold.java @@ -35,10 +35,8 @@ import net.imglib2.histogram.Histogram1d; import net.imglib2.type.numeric.RealType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // This plugin code ported from the original MatLab code of the max likelihood // threshold method (th_maxlik) as written in Antti Niemisto's 1.03 version of @@ -51,14 +49,18 @@ * @author Barry DeZonia */ @Plugin(type = Op.class, name = "threshold.maxLikelihood") -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeMaxLikelihoodThreshold> extends AbstractComputeThresholdHistogram { private static final int MAX_ATTEMPTS = 10000; + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/mean/ComputeMeanThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/mean/ComputeMeanThreshold.java index 193ee47c1..5fb97a6f9 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/mean/ComputeMeanThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/mean/ComputeMeanThreshold.java @@ -33,10 +33,8 @@ import net.imglib2.histogram.Histogram1d; import net.imglib2.type.numeric.RealType; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -48,12 +46,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.mean") -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeMeanThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minError/ComputeMinErrorThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minError/ComputeMinErrorThreshold.java index 50ac37bf7..077f8aec2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minError/ComputeMinErrorThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minError/ComputeMinErrorThreshold.java @@ -36,11 +36,9 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.OpExecutionException; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.OpExecutionException; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -53,12 +51,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.minError", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeMinErrorThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minimum/ComputeMinimumThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minimum/ComputeMinimumThreshold.java index ec175a1ea..6c7172b62 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minimum/ComputeMinimumThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/minimum/ComputeMinimumThreshold.java @@ -35,10 +35,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -50,12 +48,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.minimum", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeMinimumThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/moments/ComputeMomentsThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/moments/ComputeMomentsThreshold.java index 51bd3a7d9..6c4be612c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/moments/ComputeMomentsThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/moments/ComputeMomentsThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -49,12 +47,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.moments", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeMomentsThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/otsu/ComputeOtsuThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/otsu/ComputeOtsuThreshold.java index 6fe37680c..ba7b64a70 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/otsu/ComputeOtsuThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/otsu/ComputeOtsuThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -49,12 +47,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.otsu", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeOtsuThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/percentile/ComputePercentileThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/percentile/ComputePercentileThreshold.java index 68e5a1d70..a7ea2c27b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/percentile/ComputePercentileThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/percentile/ComputePercentileThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -50,8 +48,6 @@ */ @Plugin(type = Op.class, name = "threshold.percentile", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputePercentileThreshold> extends AbstractComputeThresholdHistogram { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/renyiEntropy/ComputeRenyiEntropyThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/renyiEntropy/ComputeRenyiEntropyThreshold.java index d5918ab3d..89beb257b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/renyiEntropy/ComputeRenyiEntropyThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/renyiEntropy/ComputeRenyiEntropyThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -52,8 +50,6 @@ @Plugin(type = Op.class, name = "threshold.renyiEntropy", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeRenyiEntropyThreshold> extends AbstractComputeThresholdHistogram { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/rosin/ComputeRosinThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/rosin/ComputeRosinThreshold.java index c3e36f6f8..7d970a4cd 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/rosin/ComputeRosinThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/rosin/ComputeRosinThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Implements Rosin's threshold method. From : Rosin, Paul L. "Unimodal @@ -51,10 +49,14 @@ * @author Hadrien Mary */ @Plugin(type = Op.class, name = "threshold.rosin", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeRosinThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d histo) { final long[] hist = histo.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/shanbhag/ComputeShanbhagThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/shanbhag/ComputeShanbhagThreshold.java index 24ba10cf7..84d97e6da 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/shanbhag/ComputeShanbhagThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/shanbhag/ComputeShanbhagThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -49,12 +47,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.shanbhag", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeShanbhagThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/triangle/ComputeTriangleThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/triangle/ComputeTriangleThreshold.java index 3e2af7d1b..8e31b1bb1 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/triangle/ComputeTriangleThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/triangle/ComputeTriangleThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -50,12 +48,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.triangle", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeTriangleThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/yen/ComputeYenThreshold.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/yen/ComputeYenThreshold.java index d66f93c0a..a7c2bb948 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/yen/ComputeYenThreshold.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/threshold/yen/ComputeYenThreshold.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.Priority; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; // NB - this plugin adapted from Gabriel Landini's code of his AutoThreshold // plugin found in Fiji (version 1.14). @@ -50,12 +48,16 @@ * @author Gabriel Landini */ @Plugin(type = Op.class, name = "threshold.yen", priority = Priority.HIGH) -@Parameter(key = "inputHistogram") -@Parameter(key = "output") public class ComputeYenThreshold> extends AbstractComputeThresholdHistogram { + /** + * TODO + * + * @param inputHistogram + * @param output + */ @Override public long computeBin(final Histogram1d hist) { final long[] histogram = hist.toLongArray(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/BoxCount.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/BoxCount.java index 96859b1fd..130c31f10 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/BoxCount.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/BoxCount.java @@ -47,10 +47,8 @@ import net.imglib2.view.Views; import org.scijava.function.Functions; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An N-dimensional box counting that can be used to estimate the fractal @@ -327,16 +325,20 @@ private static void generateTranslations(final long numTranslations, } @Plugin(type = Op.class, name = "topology.boxCount") -@Parameter(key = "input") -@Parameter(key = "maxSize") -@Parameter(key = "minSize") -@Parameter(key = "scaling") -@Parameter(key = "gridMoves") -@Parameter(key = "output") class DefaultBoxCount> implements Functions.Arity5, Long, Long, Double, Long, List>> { + /** + * TODO + * + * @param input + * @param maxSize + * @param minSize + * @param scaling + * @param gridMoves + * @return the output + */ @Override public List> apply( RandomAccessibleInterval input, Long maxSize, Long minSize, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26N.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26N.java index 6ccfd1205..66e1fc4d7 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26N.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26N.java @@ -34,10 +34,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An Op which calculates the euler characteristic (χ) of the given 3D binary image.
@@ -69,8 +67,6 @@ * @author David Legland - original MatLab implementation */ @Plugin(type = Op.class, name = "topology.eulerCharacteristic26N") -@Parameter(key = "interval") -@Parameter(key = "output") public class EulerCharacteristic26N> implements Computers.Arity1, DoubleType> { /** Δχ(v) for all configurations of a 2x2x2 voxel neighborhood */ @@ -93,7 +89,13 @@ public class EulerCharacteristic26N> 0, -1, -1, 0, -1, 0, 2, 1, -1, 2, 0, 1, 0, 1, 1, 0 }; - @Override + /** + * TODO + * + * @param interval + * @param output + */ + @Override public void compute(RandomAccessibleInterval interval, DoubleType output) { if(interval.numDimensions() != 3) throw new IllegalArgumentException("Input must have 3 dimensions!"); final RandomAccess access = interval.randomAccess(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26NFloating.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26NFloating.java index 38ca1ac03..544d9b95c 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26NFloating.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCharacteristic26NFloating.java @@ -33,10 +33,8 @@ import net.imglib2.type.numeric.real.DoubleType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An Op which calculates the euler characteristic (χ) of the given binary image. The object in the image @@ -71,8 +69,6 @@ * @author Michael Doube (Royal Veterinary College, London) */ @Plugin(type = Op.class, name = "topology.eulerCharacteristic26NFloating") -@Parameter(key = "interval") -@Parameter(key = "output") public class EulerCharacteristic26NFloating > implements Computers.Arity1, DoubleType> { /** Δχ(v) for all configurations of a 2x2x2 voxel neighborhood */ @@ -215,7 +211,13 @@ public class EulerCharacteristic26NFloating } //endregion - @Override + /** + * TODO + * + * @param interval + * @param output + */ + @Override public void compute(RandomAccessibleInterval interval, DoubleType output) { if(interval.numDimensions() != 3) throw new IllegalArgumentException("Input must have 3 dimensions!"); final Octant octant = new Octant<>(interval); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCorrection.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCorrection.java index efa1c9083..5d9676729 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCorrection.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/topology/eulerCharacteristic/EulerCorrection.java @@ -37,10 +37,8 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An Op which calculates the correction needed to approximate the contribution of the image to the @@ -71,12 +69,16 @@ * NB: Methods are public and static to help testing */ @Plugin(type = Op.class, name = "topology.eulerCorrection") -@Parameter(key = "input") -@Parameter(key = "output") public class EulerCorrection> implements Computers.Arity1, DoubleType> { - @Override + /** + * TODO + * + * @param input + * @param output + */ + @Override public void compute(RandomAccessibleInterval interval, DoubleType output) { if(interval.numDimensions() != 3) throw new IllegalArgumentException("Input must have 3 dimensions!"); final Traverser traverser = new Traverser<>(interval); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/transform/Transforms.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/transform/Transforms.java index 21ed480e4..21f1f4e90 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/transform/Transforms.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/transform/Transforms.java @@ -34,9 +34,9 @@ import org.scijava.Priority; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftComputersToRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftComputersToRAI.java index 906cd81de..6bdc3cb01 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftComputersToRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftComputersToRAI.java @@ -8,9 +8,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** @@ -30,8 +29,6 @@ public class LiftComputersToRAI { @OpField(names = "adapt", priority = Priority.HIGH) - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Computers.Arity1, RandomAccessibleInterval>> lift1 = (computer) -> { return (raiInput, raiOutput) -> { @@ -41,8 +38,6 @@ public class LiftComputersToRAI { }; @OpField(names = "adapt", priority = Priority.HIGH) - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Computers.Arity2, RandomAccessibleInterval, RandomAccessibleInterval>> lift2 = (computer) -> { return (raiInput1, raiInput2, raiOutput) -> { @@ -52,8 +47,6 @@ public class LiftComputersToRAI { }; @OpField(names = "adapt", priority = Priority.HIGH) - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Computers.Arity3, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift3 = (computer) -> { return (raiInput1, raiInput2, raiInput3, raiOutput) -> { @@ -64,8 +57,6 @@ public class LiftComputersToRAI { }; @OpField(names = "adapt", priority = Priority.HIGH) - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Computers.Arity4, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift4 = (computer) -> { return (raiInput1, raiInput2, raiInput3, raiInput4, raiOutput) -> { @@ -76,8 +67,6 @@ public class LiftComputersToRAI { }; @OpField(names = "adapt", priority = Priority.HIGH) - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Computers.Arity5, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift5 = (computer) -> { return (raiInput1, raiInput2, raiInput3, raiInput4, raiInput5, diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAI.java index 34a8f0122..eb60d4a65 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAI.java @@ -14,9 +14,8 @@ import org.scijava.Priority; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** @@ -42,8 +41,6 @@ public class LiftFunctionsToRAI> { @OpField(names = "adapt", priority = Priority.HIGH) - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Function, RandomAccessibleInterval>> lift1 = (function) -> { return (raiInput) -> { @@ -57,8 +54,6 @@ public class LiftFunctionsToRAI> { }; @OpField(names = "adapt") - @Parameter(key = "from") - @Parameter(key = "to") public final Function, BiFunction, RandomAccessibleInterval, RandomAccessibleInterval>> lift2 = (function) -> { return (raiInput1, raiInput2) -> { @@ -73,8 +68,6 @@ public class LiftFunctionsToRAI> { }; @OpField(names = "adapt") - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Functions.Arity3, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift3 = (function) -> { return (raiInput1, raiInput2, raiInput3) -> { @@ -90,8 +83,6 @@ public class LiftFunctionsToRAI> { }; @OpField(names = "adapt") - @Parameter(key = "from") - @Parameter(key = "to") public final Function, Functions.Arity4, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift4 = (function) -> { return (raiInput1, raiInput2, raiInput3, raiInput4) -> { @@ -108,9 +99,7 @@ public class LiftFunctionsToRAI> { }; @OpField(names = "adapt") - @Parameter(key = "from") - @Parameter(key = "to") - public final Function, Functions.Arity5, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift5 = + public final Function, Functions.Arity5, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval, RandomAccessibleInterval>> lift5 = (function) -> { return (raiInput1, raiInput2, raiInput3, raiInput4, raiInput5) -> { O outType = function.apply(Util.getTypeFromInterval(raiInput1), Util diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/RAIToIIOps.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/RAIToIIOps.java index a252ea346..6d4230caa 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/RAIToIIOps.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/adapt/RAIToIIOps.java @@ -6,8 +6,8 @@ import net.imglib2.RandomAccessibleInterval; import net.imglib2.view.Views; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/maxValue/MaxValueRealTypes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/maxValue/MaxValueRealTypes.java index 6d96cc1b3..2797e6d5f 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/maxValue/MaxValueRealTypes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/maxValue/MaxValueRealTypes.java @@ -24,8 +24,8 @@ import net.imglib2.type.numeric.real.DoubleType; import net.imglib2.type.numeric.real.FloatType; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/minValue/MinValueRealTypes.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/minValue/MinValueRealTypes.java index df6dc9824..fe1766360 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/minValue/MinValueRealTypes.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/types/minValue/MinValueRealTypes.java @@ -24,8 +24,8 @@ import net.imglib2.type.numeric.real.DoubleType; import net.imglib2.type.numeric.real.FloatType; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/AbstractOpTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/AbstractOpTest.java index 72042d2c1..f7ddc5b8a 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/AbstractOpTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/AbstractOpTest.java @@ -50,9 +50,9 @@ import org.junit.jupiter.api.BeforeAll; import org.scijava.Context; import org.scijava.cache.CacheService; -import org.scijava.ops.OpService; -import org.scijava.ops.core.Op; -import org.scijava.ops.provenance.OpHistoryService; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.spi.Op; import org.scijava.plugin.PluginService; import org.scijava.thread.ThreadService; import org.scijava.types.TypeService; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/ColocalisationTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/ColocalisationTest.java index 84906856e..d877572d7 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/ColocalisationTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/ColocalisationTest.java @@ -59,9 +59,9 @@ import org.scijava.app.StatusService; import org.scijava.cache.CacheService; import org.scijava.io.location.FileLocation; -import org.scijava.ops.OpService; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.ops.provenance.OpHistoryService; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.OpService; import org.scijava.plugin.PluginService; import org.scijava.thread.ThreadService; import org.scijava.types.TypeService; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/icq/LiICQTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/icq/LiICQTest.java index 25140e084..290e88c79 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/icq/LiICQTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/icq/LiICQTest.java @@ -44,10 +44,9 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; +import org.scijava.types.Nil; /** * Tests {@link net.imagej.ops2.coloc.icq.LiICQ}. @@ -102,7 +101,7 @@ public void testPValue() { 0x01234567); Img ch2 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x98765432); - BiFunction, RandomAccessibleInterval, Double> op = FunctionUtils.match(ops.env(), "coloc.icq", + BiFunction, RandomAccessibleInterval, Double> op = OpBuilder.matchFunction(ops.env(), "coloc.icq", new Nil>() {}, new Nil>() {}, new Nil() {}); PValueResult value = new PValueResult(); ops.op("coloc.pValue").input(ch1, ch2, op, es).output(value).compute(); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRankTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRankTest.java index 5a3a961a5..59e04b20b 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRankTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRankTest.java @@ -29,9 +29,9 @@ package net.imagej.ops2.coloc.kendallTau; +import static org.junit.Assume.assumeTrue; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.Assume.assumeTrue; import java.util.Iterator; import java.util.concurrent.ExecutorService; @@ -50,10 +50,9 @@ import net.imglib2.util.Pair; import org.junit.jupiter.api.Test; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; +import org.scijava.types.Nil; /** * Tests {@link net.imagej.ops2.Ops.Coloc.KendallTau}. @@ -128,7 +127,7 @@ public void testPValue() { 0x98765432); Nil> nilI = new Nil>() {}; Nil> nilRAI = new Nil>() {}; - BiFunction, RandomAccessibleInterval, Double> op = FunctionUtils.match(ops.env(), + BiFunction, RandomAccessibleInterval, Double> op = OpBuilder.matchFunction(ops.env(), "coloc.kendallTau", nilRAI, nilRAI, new Nil() {}); // BiFunction, RandomAccessibleInterval, Double> raiOp = op( // "transform.raiToIterable").input(op).outType( diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/maxTKendallTau/MTKTTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/maxTKendallTau/MTKTTest.java index b5a858e16..4ff2c3792 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/maxTKendallTau/MTKTTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/maxTKendallTau/MTKTTest.java @@ -47,10 +47,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; +import org.scijava.types.Nil; /** * Tests {@link net.imagej.ops2.Ops.Coloc.MaxTKendallTau}. @@ -209,7 +208,7 @@ public void testMTKTpValueNone() { Img vImage1 = ArrayImgs.doubles(values1, values1.length); Img vImage2 = ArrayImgs.doubles(values2, values2.length); BiFunction, RandomAccessibleInterval, Double> op = - FunctionUtils.match(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); + OpBuilder.matchFunction(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); PValueResult value = new PValueResult(); ops.op("coloc.pValue").input(vImage1, vImage2, op, 5, es).output(value).compute(); assertEquals(0.0, value.getPValue(), 0.0); @@ -229,7 +228,7 @@ public void testMTKTpValueAll() { Img vImage1 = ArrayImgs.doubles(values1, values1.length); Img vImage2 = ArrayImgs.doubles(values2, values2.length); BiFunction, RandomAccessibleInterval, Double> op = - FunctionUtils.match(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); + OpBuilder.matchFunction(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); PValueResult value = new PValueResult(); ops.op("coloc.pValue").input(vImage1, vImage2, op, 5, es).output(value).compute(); assertEquals(0.0, value.getPValue(), 0.0); @@ -247,7 +246,7 @@ public void testMTKTpValueRandom() { Img ch2 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x98765432); BiFunction, RandomAccessibleInterval, Double> op = - FunctionUtils.match(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); + OpBuilder.matchFunction(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); PValueResult value = new PValueResult(); ops.op("coloc.pValue").input(ch1, ch2, op, 10, es).output(value).compute(); assertEquals(0.2, value.getPValue(), 0.0); @@ -262,7 +261,7 @@ public void testMTKTpValueImage() { RandomAccessibleInterval cropCh2 = Views.interval(zeroCorrelationImageCh2, new long[] { 0, 0, 0 }, new long[] { 20, 20, 0 }); BiFunction, RandomAccessibleInterval, Double> op = - FunctionUtils.match(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); + OpBuilder.matchFunction(ops.env(), "coloc.maxTKendallTau", new Nil>() {}, new Nil>() {}, new Nil() {}); final int[] blockSize = new int[cropCh1.numDimensions()]; for (int d = 0; d < blockSize.length; d++) { final long size = (long) Math.floor(Math.sqrt(cropCh1.dimension(d))); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pValue/DefaultPValueTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pValue/DefaultPValueTest.java index 693edcbc9..30abbdd28 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pValue/DefaultPValueTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pValue/DefaultPValueTest.java @@ -42,8 +42,8 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import org.scijava.types.Nil; import org.scijava.thread.ThreadService; +import org.scijava.types.Nil; /** * Tests {@link DefaultPValue}. diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pearsons/DefaultPearsonsTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pearsons/DefaultPearsonsTest.java index 0700ea586..5f349990e 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pearsons/DefaultPearsonsTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/coloc/pearsons/DefaultPearsonsTest.java @@ -40,9 +40,9 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import org.scijava.types.Nil; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; +import org.scijava.types.Nil; /** * Tests {@link DefaultPearsons}. @@ -107,7 +107,7 @@ public void testPValue() { Img ch2 = ColocalisationTest.produceMeanBasedNoiseImage(new FloatType(), 24, 24, mean, spread, sigma, 0x98765432); BiFunction, RandomAccessibleInterval, Double> op = - FunctionUtils.match(ops.env(), "coloc.pearsons", new Nil>() {}, new Nil>() {}, new Nil() {}); + OpBuilder.matchFunction(ops.env(), "coloc.pearsons", new Nil>() {}, new Nil>() {}, new Nil() {}); PValueResult value = new PValueResult(); ops.op("coloc.pValue").input(ch1, ch2, op, es).output(value).compute(); assertEquals(0.66, value.getPValue(), 0.0); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/convert/ConvertMapTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/convert/ConvertMapTest.java index baa029624..f67f239d0 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/convert/ConvertMapTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/convert/ConvertMapTest.java @@ -42,7 +42,7 @@ import net.imglib2.util.Intervals; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; /** * Tests that the {@code convert} ops work on {@link Img} objects via diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyArrayImgTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyArrayImgTest.java index a4ade1b69..efea7b768 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyArrayImgTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyArrayImgTest.java @@ -41,7 +41,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.util.MersenneTwisterFast; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyRAITest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyRAITest.java index 08060fc8a..7e88574f2 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyRAITest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/copy/CopyRAITest.java @@ -49,7 +49,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.MersenneTwisterFast; @@ -150,8 +150,8 @@ public void copyRAIWithOutputTest() { public void copyRAIDifferentSizeTest() { // create a copy op - final Computers.Arity1, RandomAccessibleInterval> copy = ComputerUtils - .match(ops.env(), "copy.rai", new Nil>() {}, + final Computers.Arity1, RandomAccessibleInterval> copy = OpBuilder + .matchComputer(ops.env(), "copy.rai", new Nil>() {}, new Nil>() {}); assertNotNull(copy); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgPlusTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgPlusTest.java index 87392eafb..d75113a8f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgPlusTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgPlusTest.java @@ -35,16 +35,15 @@ import java.util.function.Function; import net.imagej.ImgPlus; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Dimensions; import net.imglib2.FinalDimensions; import net.imglib2.img.Img; import net.imglib2.type.numeric.real.DoubleType; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests several ways to create an image @@ -57,8 +56,8 @@ public class CreateImgPlusTest extends AbstractOpTest { @Test public void createImgPlusTest() { - BiFunction> createImgFunc = FunctionUtils.match(ops.env(), "create.img", new Nil() {}, new Nil() {}, new Nil>() {}); - Function, ImgPlus> imgPlusFunction = FunctionUtils.match(ops.env(), "create.imgPlus", new Nil>() {}, new Nil>() {}); + BiFunction> createImgFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() {}, new Nil() {}, new Nil>() {}); + Function, ImgPlus> imgPlusFunction = OpBuilder.matchFunction(ops.env(), "create.imgPlus", new Nil>() {}, new Nil>() {}); assertEquals(imgPlusFunction.apply(createImgFunc.apply(new FinalDimensions(new long[] { 10, 9, 8 }), new DoubleType())).getClass(), ImgPlus.class); } } diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgTest.java index 7cd219c3a..33f60b3ef 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateImgTest.java @@ -35,6 +35,7 @@ import java.util.function.BiFunction; import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Dimensions; import net.imglib2.FinalDimensions; import net.imglib2.FinalInterval; @@ -57,10 +58,8 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.MersenneTwisterFast; @@ -94,7 +93,7 @@ public void testImageMinimum() { } // create img - final Function> createFunc = FunctionUtils.match(ops.env(), "create.img", new Nil() { + final Function> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil>() { }); final Img img = createFunc.apply(new FinalInterval(min, max)); @@ -120,7 +119,7 @@ public void testImageDimensions() { } // create img - BiFunction> createFunc = FunctionUtils.match(ops.env(), "create.img", + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil() { }, new Nil>() { @@ -135,13 +134,13 @@ public void testImageDimensions() { @Test public void testImgFromImg() { // create img - BiFunction> createFuncDimsType = FunctionUtils.match(ops.env(), "create.img", + BiFunction> createFuncDimsType = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil() { }, new Nil>() { }); final Img img = createFuncDimsType.apply(new FinalDimensions(1), new ByteType()); - Function, Img> createFuncImg = FunctionUtils.match(ops.env(), "create.img", + Function, Img> createFuncImg = OpBuilder.matchFunction(ops.env(), "create.img", new Nil>() { }, new Nil>() { }); @@ -157,7 +156,7 @@ public void testImageFactory() { final Dimensions dim = new FinalDimensions(10, 10, 10); Functions.Arity3, Img> createFunc = - FunctionUtils.match(ops.env(), "create.img", new Nil() + OpBuilder.matchFunction(ops.env(), "create.img", new Nil() {}, new Nil() {}, new Nil>() {}, new Nil>() {}); @@ -178,7 +177,7 @@ public void testImageFactory() { public void testImageType() { final Dimensions dim = new FinalDimensions(10, 10, 10); - BiFunction> createFunc = FunctionUtils.match(ops.env(), "create.img", new Nil() {}, new Nil() {}, new Nil>() {}); + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() {}, new Nil() {}, new Nil>() {}); assertEquals(BitType.class, ((Img) createFunc.apply(dim, (T) new BitType())).firstElement().getClass(), "Image Type: "); @@ -202,7 +201,7 @@ public void testImageType() { @Test public void testCreateFromImgSameType() { final Img input = PlanarImgs.bytes(10, 10, 10); - BiFunction> createFunc = FunctionUtils.match(ops.env(), "create.img", + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil() { }, new Nil>() { @@ -218,7 +217,7 @@ public void testCreateFromImgSameType() { @Test public void testCreateFromImgDifferentType() { final Img input = PlanarImgs.bytes(10, 10, 10); - BiFunction> createFunc = FunctionUtils.match(ops.env(), "create.img", + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil() { }, new Nil>() { @@ -236,7 +235,7 @@ public void testCreateFromRaiDifferentType() { final IntervalView input = Views.interval(PlanarImgs.bytes(10, 10, 10), new FinalInterval(new long[] { 10, 10, 1 })); - BiFunction> createFunc = FunctionUtils.match(ops.env(), "create.img", + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil() { }, new Nil>() { @@ -260,7 +259,7 @@ public void testCreateFromRaiDifferentType() { public void testCreateFromIntegerArray() { final Integer[] dims = new Integer[] { 25, 25, 10 }; - Function> createFunc = FunctionUtils.match(ops.env(), "create.img", new Nil() { + Function> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil>() { }); final Img res = createFunc.apply(dims); @@ -278,7 +277,7 @@ public void testCreateFromIntegerArray() { public void testCreateFromLongArray() { final Long[] dims = new Long[] { 25l, 25l, 10l }; - Function> createFunc = FunctionUtils.match(ops.env(), "create.img", new Nil() { + Function> createFunc = OpBuilder.matchFunction(ops.env(), "create.img", new Nil() { }, new Nil>() { }); final Img res = createFunc.apply(dims); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernel2ndDerivBiGaussTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernel2ndDerivBiGaussTest.java index f37dfcc81..f3a91112f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernel2ndDerivBiGaussTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernel2ndDerivBiGaussTest.java @@ -38,7 +38,6 @@ import net.imglib2.type.numeric.real.DoubleType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelBiGaussTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelBiGaussTest.java index 7253ceec0..1bf165755 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelBiGaussTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelBiGaussTest.java @@ -38,7 +38,6 @@ import net.imglib2.type.numeric.real.DoubleType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelDiffractionTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelDiffractionTest.java index 2860a34f2..36d3e98c4 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelDiffractionTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelDiffractionTest.java @@ -33,14 +33,13 @@ import java.util.stream.StreamSupport; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Dimensions; import net.imglib2.FinalDimensions; import net.imglib2.img.Img; import net.imglib2.type.numeric.real.DoubleType; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; import org.scijava.types.Nil; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaborTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaborTest.java index 21de4e9c3..5e373c5fc 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaborTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaborTest.java @@ -33,7 +33,7 @@ import java.util.function.BiFunction; -import net.imagej.ops2.create.kernel.DefaultCreateKernelGabor; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.numeric.ComplexType; @@ -42,10 +42,8 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -62,28 +60,28 @@ public > void testKernelGabor() { final double[] period = { 4.0, 1.0 }; // define functions used in the test - Functions.Arity3> createFunc = FunctionUtils.match(ops.env(), + Functions.Arity3> createFunc = OpBuilder.matchFunction(ops.env(), "create.kernelGabor", new Nil() { }, new Nil() { }, new Nil() { }, new Nil>() { }); - BiFunction> createFuncSingleSigma = FunctionUtils - .match(ops.env(), "create.kernelGabor", new Nil() { + BiFunction> createFuncSingleSigma = OpBuilder + .matchFunction(ops.env(), "create.kernelGabor", new Nil() { }, new Nil() { }, new Nil>() { }); - BiFunction> createFuncDouble = FunctionUtils.match(ops.env(), + BiFunction> createFuncDouble = OpBuilder.matchFunction(ops.env(), "create.kernelGabor", new Nil() { }, new Nil() { }, new Nil>() { }); - BiFunction> createFuncFloat = FunctionUtils.match(ops.env(), + BiFunction> createFuncFloat = OpBuilder.matchFunction(ops.env(), "create.kernelGabor", new Nil() { }, new Nil() { }, new Nil>() { }); - BiFunction> createFuncComplexDouble = FunctionUtils.match(ops.env(), + BiFunction> createFuncComplexDouble = OpBuilder.matchFunction(ops.env(), "create.kernelGabor", new Nil() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaussTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaussTest.java index a81aa9d0d..09cb326aa 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaussTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelGaussTest.java @@ -34,14 +34,13 @@ import java.util.function.BiFunction; import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.numeric.real.DoubleType; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@code CreateKernelGaussDoubleType} and @@ -57,12 +56,12 @@ public void testKernelGauss() { final double sigma = 5.0; final double[] sigmas = {sigma, sigma}; - BiFunction> createFunc = FunctionUtils.match(ops.env(), "create.kernelGauss", new Nil() {}, new Nil() {}, new Nil>() {}); + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.kernelGauss", new Nil() {}, new Nil() {}, new Nil>() {}); final RandomAccessibleInterval gaussianKernel = // createFunc.apply(sigma, sigmas.length); - Function> createFunc2 = FunctionUtils.match(ops.env(), "create.kernelGauss", new Nil() {}, new Nil>() {}); + Function> createFunc2 = OpBuilder.matchFunction(ops.env(), "create.kernelGauss", new Nil() {}, new Nil>() {}); final RandomAccessibleInterval gaussianKernel2 = // diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelLogTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelLogTest.java index bfe971b2b..7c8b78837 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelLogTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateKernelLogTest.java @@ -34,14 +34,13 @@ import java.util.function.BiFunction; import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.numeric.real.DoubleType; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@code CreateKernelLogDoubleType} and @@ -57,7 +56,7 @@ public void testKernelLog() { final double sigma = 5.0; final double[] sigmas = { sigma, sigma }; - BiFunction> func1 = FunctionUtils.match(ops.env(), + BiFunction> func1 = OpBuilder.matchFunction(ops.env(), "create.kernelLog", new Nil() { }, new Nil() { }, new Nil>() { @@ -66,7 +65,7 @@ public void testKernelLog() { final RandomAccessibleInterval logKernel = // func1.apply(sigma, sigmas.length); - Function> func2 = FunctionUtils.match(ops.env(), "create.kernelLog", + Function> func2 = OpBuilder.matchFunction(ops.env(), "create.kernelLog", new Nil() { }, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateLabelingTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateLabelingTest.java index 691c9f0bf..6450e284c 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateLabelingTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/create/CreateLabelingTest.java @@ -34,6 +34,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Dimensions; import net.imglib2.FinalDimensions; import net.imglib2.img.Img; @@ -45,10 +46,8 @@ import net.imglib2.util.Intervals; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.MersenneTwisterFast; @@ -70,7 +69,7 @@ public void testImageDimensions() { final MersenneTwisterFast randomGenerator = new MersenneTwisterFast(SEED); // TODO can we keep this? - BiFunction> createFunc = FunctionUtils.match(ops.env(), + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.imgLabeling", new Nil() { }, new Nil() { }, new Nil>() { @@ -100,8 +99,8 @@ public void testImageFactory() { final Dimensions dim = new FinalDimensions(10, 10, 10); - Functions.Arity3, ImgLabeling> createFunc = FunctionUtils - .match(ops.env(), "create.imgLabeling", new Nil() { + Functions.Arity3, ImgLabeling> createFunc = OpBuilder + .matchFunction(ops.env(), "create.imgLabeling", new Nil() { }, new Nil() { }, new Nil>() { }, new Nil>() { @@ -136,7 +135,7 @@ public void testImageType() { @SuppressWarnings("unchecked") private ImgLabeling createLabelingWithType(final I type) { - BiFunction> createFunc = FunctionUtils.match(ops.env(), + BiFunction> createFunc = OpBuilder.matchFunction(ops.env(), "create.imgLabeling", new Nil() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/eval/EvalTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/eval/EvalTest.java index 6029b91b5..7baef1c39 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/eval/EvalTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/eval/EvalTest.java @@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test; import org.scijava.function.Functions; -import org.scijava.ops.OpService; +import org.scijava.ops.engine.OpService; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2DTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2DTest.java index a52a0c486..2b76981b2 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2DTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/features/hog/HistogramOfOrientedGradients2DTest.java @@ -39,9 +39,8 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.types.Nil; import org.scijava.thread.ThreadService; +import org.scijava.types.Nil; /** * The HoG Op is tested by comparing its result with the ground-truth which was diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/convolve/ConvolveTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/convolve/ConvolveTest.java index b96c6d0d8..34aefc8cd 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/convolve/ConvolveTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/convolve/ConvolveTest.java @@ -149,19 +149,19 @@ // // // Op used to pad the input // final BinaryFunctionOp, Dimensions, RandomAccessibleInterval> padOp = -// (BinaryFunctionOp) FunctionUtils.match(ops.env(), PadInputFFTMethods.class, +// (BinaryFunctionOp) OpBuilder.matchFunction(ops.env(), PadInputFFTMethods.class, // RandomAccessibleInterval.class, RandomAccessibleInterval.class, // Dimensions.class, true); // // // Op used to pad the kernel // final BinaryFunctionOp, Dimensions, RandomAccessibleInterval> padKernelOp = -// (BinaryFunctionOp) FunctionUtils.match(ops.env(), PadShiftKernelFFTMethods.class, +// (BinaryFunctionOp) OpBuilder.matchFunction(ops.env(), PadShiftKernelFFTMethods.class, // RandomAccessibleInterval.class, RandomAccessibleInterval.class, // Dimensions.class, true); // // // Op used to create the complex FFTs // UnaryFunctionOp> createOp = -// (UnaryFunctionOp) FunctionUtils.match(ops.env(), CreateOutputFFTMethods.class, +// (UnaryFunctionOp) OpBuilder.matchFunction(ops.env(), CreateOutputFFTMethods.class, // RandomAccessibleInterval.class, Dimensions.class, // new ComplexFloatType(), true); // diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/derivative/PartialDerivativeFilterTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/derivative/PartialDerivativeFilterTest.java index 34bb5ec0a..0be80d2b0 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/derivative/PartialDerivativeFilterTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/derivative/PartialDerivativeFilterTest.java @@ -43,7 +43,8 @@ import net.imglib2.view.composite.RealComposite; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/hessian/HessianFilterTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/hessian/HessianFilterTest.java index 940f283ff..a355312b0 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/hessian/HessianFilterTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/hessian/HessianFilterTest.java @@ -42,7 +42,8 @@ import net.imglib2.view.composite.RealComposite; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/mean/MeanFilterTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/mean/MeanFilterTest.java index e0364ff52..4ed1cd1bf 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/mean/MeanFilterTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/mean/MeanFilterTest.java @@ -10,7 +10,8 @@ import net.imglib2.type.numeric.integer.ByteType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class MeanFilterTest extends AbstractOpTest{ diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/sobel/SobelFilterTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/sobel/SobelFilterTest.java index 550aa52a8..7fe3b7c11 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/sobel/SobelFilterTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/sobel/SobelFilterTest.java @@ -40,7 +40,8 @@ import net.imglib2.util.Util; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/vesselness/FrangiVesselnessTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/vesselness/FrangiVesselnessTest.java index fe2172ff0..bd8385d9b 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/vesselness/FrangiVesselnessTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/filter/vesselness/FrangiVesselnessTest.java @@ -48,10 +48,9 @@ import org.junit.jupiter.api.Test; import org.scijava.Context; import org.scijava.cache.CacheService; -import org.scijava.ops.OpService; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.ops.provenance.OpHistory; -import org.scijava.ops.provenance.OpHistoryService; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.OpService; import org.scijava.plugin.PluginService; import org.scijava.script.ScriptService; import org.scijava.thread.ThreadService; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/PolygonFeatureTests.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom2d/PolygonFeatureTests.java similarity index 99% rename from imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/PolygonFeatureTests.java rename to imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom2d/PolygonFeatureTests.java index e888c9a4e..6831ec645 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/PolygonFeatureTests.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom2d/PolygonFeatureTests.java @@ -26,13 +26,14 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom; +package net.imagej.ops2.geom.geom2d; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; import net.imagej.ops2.features.AbstractFeatureTest; +import net.imagej.ops2.geom.GeomUtils; import net.imagej.ops2.geom.geom2d.LabelRegionToPolygonConverter; import net.imglib2.RealLocalizable; import net.imglib2.RealPoint; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/MeshFeatureTests.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom3d/MeshFeatureTests.java similarity index 99% rename from imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/MeshFeatureTests.java rename to imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom3d/MeshFeatureTests.java index 9b9123fab..90a0ea93f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/MeshFeatureTests.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom3d/MeshFeatureTests.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom; +package net.imagej.ops2.geom.geom3d; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/QuickHull3DTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom3d/QuickHull3DTest.java similarity index 98% rename from imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/QuickHull3DTest.java rename to imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom3d/QuickHull3DTest.java index 209bbfe3e..24906e8cd 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/QuickHull3DTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/geom/geom3d/QuickHull3DTest.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.geom; +package net.imagej.ops2.geom.geom3d; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -44,7 +44,8 @@ import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; /** * This class tests the {@link DefaultConvexHull3D} implementation. The number diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/ascii/ASCIITest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/ascii/ASCIITest.java index e842c3045..074c49439 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/ascii/ASCIITest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/ascii/ASCIITest.java @@ -38,7 +38,8 @@ import net.imglib2.util.Pair; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformTest.java index 94230f259..6d40405f8 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformTest.java @@ -38,8 +38,9 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; import org.scijava.util.MersenneTwisterFast; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DistanceTransform3DTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DistanceTransform3DTest.java index d782d3692..fabb7f56a 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DistanceTransform3DTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/distancetransform/DistanceTransform3DTest.java @@ -38,8 +38,9 @@ import net.imglib2.type.numeric.real.FloatType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; import org.scijava.util.MersenneTwisterFast; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/histogram/DefaultHistogramTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/histogram/DefaultHistogramTest.java index 409eae0ae..ae0342efb 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/histogram/DefaultHistogramTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/histogram/DefaultHistogramTest.java @@ -9,7 +9,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/integral/IntegralImgTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/integral/IntegralImgTest.java index 7ce703189..3f0b270d5 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/integral/IntegralImgTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/integral/IntegralImgTest.java @@ -49,7 +49,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -78,8 +79,8 @@ public void before() throws Exception { @Test public void testIntegralImageSimilarity() { // should match DefaultIntegralImg - Computers.Arity1, RandomAccessibleInterval> defaultOp = ComputerUtils - .match(ops.env(), "image.integral", new Nil>() { + Computers.Arity1, RandomAccessibleInterval> defaultOp = OpBuilder + .matchComputer(ops.env(), "image.integral", new Nil>() { }, new Nil>() { }); defaultOp.compute(in, out1); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/normalize/NormalizeTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/normalize/NormalizeTest.java index 8720141fa..dd635f0c0 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/normalize/NormalizeTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/normalize/NormalizeTest.java @@ -41,7 +41,8 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedBinaryTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedBinaryTest.java index 4be48f061..dab997b8d 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedBinaryTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedBinaryTest.java @@ -45,8 +45,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; /** diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedTest.java index 935a00d61..07a10506e 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/image/watershed/WatershedTest.java @@ -51,7 +51,8 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.thread.ThreadService; import org.scijava.types.Nil; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3dTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3dTest.java index dbba18b43..68272d780 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3dTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3dTest.java @@ -39,7 +39,8 @@ import org.joml.Quaterniondc; import org.joml.Vector3d; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; /** * Tests for {@link Rotate3d}. diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3fTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3fTest.java index 508658959..2a568624a 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3fTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/linalg/rotate/Rotate3fTest.java @@ -39,7 +39,8 @@ import org.joml.Quaternionfc; import org.joml.Vector3f; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; /** * Tests for {@link Rotate3f}. diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/BooleanTypeLogicTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/BooleanTypeLogicTest.java index ff9eb39fa..127d92c48 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/BooleanTypeLogicTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/BooleanTypeLogicTest.java @@ -36,7 +36,8 @@ import net.imglib2.type.logic.BitType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; /** * Tests {@link BooleanTypeLogic}. diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/ConditionalTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/ConditionalTest.java index dc9551010..a51f4dac9 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/ConditionalTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/logic/ConditionalTest.java @@ -36,7 +36,8 @@ import net.imglib2.type.numeric.integer.ByteType; import org.junit.jupiter.api.Test; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; /** * Tests {@link Ternary} and {@link Default}. diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/math/UnaryRealTypeMathTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/math/UnaryRealTypeMathTest.java index a8ba48a10..a341d608a 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/math/UnaryRealTypeMathTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/math/UnaryRealTypeMathTest.java @@ -38,12 +38,11 @@ import net.imglib2.type.numeric.real.DoubleType; import net.imglib2.type.numeric.real.FloatType; -import org.junit.Rule; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.rules.ExpectedException; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -528,7 +527,7 @@ private void assertRandomGaussian(final double i, final double o, final double i final DoubleType out = new DoubleType(); final long seed = 0xcafebabe12345678L; final Random rng = new Random(seed); - final Computers.Arity2 op = ComputerUtils.match(ops.env(), "math.randomGaussian", + final Computers.Arity2 op = OpBuilder.matchComputer(ops.env(), "math.randomGaussian", new Nil() {}, new Nil() {}, new Nil() {}); op.compute(in, rng, out); assertEquals(o, out.get(), 0); @@ -549,7 +548,7 @@ private void assertRandomUniform(final double i, final double o, final double i2 final DoubleType out = new DoubleType(); final long seed = 0xcafebabe12345678L; final Random rng = new Random(seed); - final Computers.Arity2 op = ComputerUtils.match(ops.env(), "math.randomUniform", + final Computers.Arity2 op = OpBuilder.matchComputer(ops.env(), "math.randomUniform", new Nil() {}, new Nil() {}, new Nil() {}); op.compute(in, rng, out); assertEquals(o, out.get(), 0); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/project/ProjectTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/project/ProjectTest.java index 419ab5c18..6c730ef0f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/project/ProjectTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/project/ProjectTest.java @@ -40,7 +40,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class ProjectTest extends AbstractOpTest { @@ -71,7 +72,7 @@ public void initImg() { out1 = TestImgGeneration.unsignedByteArray(false, 10, 10); out2 = TestImgGeneration.unsignedByteArray(false, 10, 10); - op = ComputerUtils.match(ops.env(), "stats.sum", new Nil>() {}, + op = OpBuilder.matchComputer(ops.env(), "stats.sum", new Nil>() {}, new Nil() {}); } diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/slice/SliceTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/slice/SliceTest.java index e5427250d..e9eb72265 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/slice/SliceTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/slice/SliceTest.java @@ -51,7 +51,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; import org.scijava.types.Nil; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/AbstractThresholdTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/AbstractThresholdTest.java index 983c57366..02a247ab8 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/AbstractThresholdTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/AbstractThresholdTest.java @@ -46,8 +46,8 @@ import net.imglib2.type.numeric.integer.UnsignedShortType; import org.junit.jupiter.api.BeforeEach; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.ListUtils; @@ -85,7 +85,7 @@ public void initialize() { } } - createFunc = FunctionUtils.match(ops.env(), "image.histogram", new Nil>() {}, new Nil() {}, new Nil>() {}); + createFunc = OpBuilder.matchFunction(ops.env(), "image.histogram", new Nil>() {}, new Nil() {}, new Nil>() {}); } protected Histogram1d histogram() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/ComputeThresholdTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/ComputeThresholdTest.java index 8b05ae5e2..4ff98080e 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/ComputeThresholdTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/ComputeThresholdTest.java @@ -35,7 +35,8 @@ import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -182,7 +183,7 @@ private void testComputeThresholdOp(final int expectedOutput, private Computers.Arity1, UnsignedShortType> getComputeThresholdOp(final String name) { - return ComputerUtils.match(ops.env(), name, + return OpBuilder.matchComputer(ops.env(), name, new Nil>() {}, new Nil() {}); } diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/ApplyManualThresholdTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/ApplyManualThresholdTest.java index eec8d50e7..eadcd1f17 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/ApplyManualThresholdTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/ApplyManualThresholdTest.java @@ -39,7 +39,8 @@ import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -52,7 +53,7 @@ public class ApplyManualThresholdTest extends AbstractThresholdTest { @Test public void testApplyThreshold() throws IncompatibleTypeException { Computers.Arity3, UnsignedShortType, Comparator, Iterable> createFunc = - ComputerUtils.match(ops.env(), "threshold.apply", + OpBuilder.matchComputer(ops.env(), "threshold.apply", new Nil>() {}, new Nil() {}, new Nil>() diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/LocalThresholdTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/LocalThresholdTest.java index 1cd4b428a..4169517f2 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/LocalThresholdTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/threshold/apply/LocalThresholdTest.java @@ -74,11 +74,11 @@ import net.imglib2.util.Pair; import net.imglib2.view.Views; -import org.junit.Before; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -265,8 +265,8 @@ public void before() throws Exception { @Test public void testLocalBernsenThreshold() { final Computers.Arity5, Shape, Double, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localBernsen", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localBernsen", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -286,8 +286,8 @@ public void testLocalBernsenThreshold() { @Test public void testLocalContrastThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localContrast", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localContrast", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -305,8 +305,8 @@ public void testLocalContrastThreshold() { @Test public void testLocalHuangThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.huang", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.huang", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -324,8 +324,8 @@ public void testLocalHuangThreshold() { @Test public void testLocalIJ1Threshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.ij1", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.ij1", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -343,8 +343,8 @@ public void testLocalIJ1Threshold() { @Test public void testLocalIntermodesThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.intermodes", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.intermodes", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -363,8 +363,8 @@ public void testLocalIntermodesThreshold() { public void testLocalIsoDataThreshold() { // NB: Test fails for RectangleShapes of span 1 final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.isoData", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.isoData", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -382,8 +382,8 @@ public void testLocalIsoDataThreshold() { @Test public void testLocalLiThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.li", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.li", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -401,8 +401,8 @@ public void testLocalLiThreshold() { @Test public void testLocalMaxEntropyThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.maxEntropy", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.maxEntropy", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -421,8 +421,8 @@ public void testLocalMaxEntropyThreshold() { public void testLocalMaxLikelihoodThreshold() { // NB: Test fails for RectangleShapes of up to span==2 final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.maxLikelihood", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.maxLikelihood", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -440,8 +440,8 @@ public void testLocalMaxLikelihoodThreshold() { @Test public void testLocalThresholdMean() { final Computers.Arity4, Shape, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localMean", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localMean", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -502,8 +502,8 @@ public void testLocalThresholdMean() { @Test public void testLocalMedianThreshold() { final Computers.Arity4, Shape, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localMedian", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localMedian", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -522,8 +522,8 @@ public void testLocalMedianThreshold() { @Test public void testLocalMidGreyThreshold() { final Computers.Arity4, Shape, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localMidGrey", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localMidGrey", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -542,8 +542,8 @@ public void testLocalMidGreyThreshold() { @Test public void testLocalMinErrorThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.minError", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.minError", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -561,8 +561,8 @@ public void testLocalMinErrorThreshold() { @Test public void testLocalMinimumThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.minimum", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.minimum", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -580,8 +580,8 @@ public void testLocalMinimumThreshold() { @Test public void testLocalMomentsThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.moments", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.moments", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -599,8 +599,8 @@ public void testLocalMomentsThreshold() { @Test public void testLocalNiblackThreshold() { final Computers.Arity5, Shape, Double, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localNiblack", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localNiblack", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -662,8 +662,8 @@ public void testLocalNiblackThreshold() { @Test public void testLocalOtsuThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.otsu", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.otsu", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -681,8 +681,8 @@ public void testLocalOtsuThreshold() { @Test public void testLocalPercentileThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.percentile", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.percentile", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -700,8 +700,8 @@ public void testLocalPercentileThreshold() { @Test public void testLocalPhansalkar() { final Computers.Arity5, Shape, Double, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localPhansalkar", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localPhansalkar", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -765,8 +765,8 @@ public void testLocalPhansalkar() { @Test public void testLocalRenyiEntropyThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.renyiEntropy", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.renyiEntropy", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -784,8 +784,8 @@ public void testLocalRenyiEntropyThreshold() { @Test public void testLocalSauvola() { final Computers.Arity5, Shape, Double, Double, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.localSauvola", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.localSauvola", // new Nil>() {}, // new Nil() {}, // new Nil() {}, // @@ -847,8 +847,8 @@ public void testLocalSauvola() { @Test public void testLocalShanbhagThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.shanbhag", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.shanbhag", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -866,8 +866,8 @@ public void testLocalShanbhagThreshold() { @Test public void testLocalTriangleThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.triangle", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.triangle", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -885,8 +885,8 @@ public void testLocalTriangleThreshold() { @Test public void testLocalYenThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.yen", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.yen", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // @@ -904,8 +904,8 @@ public void testLocalYenThreshold() { @Test public void testLocalRosinThreshold() { final Computers.Arity3, Shape, // - OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = ComputerUtils - .match(ops.env(), "threshold.rosin", // + OutOfBoundsFactory>, RandomAccessibleInterval> opToTest = OpBuilder + .matchComputer(ops.env(), "threshold.rosin", // new Nil>() {}, // new Nil() {}, // new Nil>>() {}, // diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseNumericView/CollapseNumericViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseNumericView/CollapseNumericViewTest.java index 9624d4aa7..30af059ea 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseNumericView/CollapseNumericViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseNumericView/CollapseNumericViewTest.java @@ -33,6 +33,7 @@ import java.util.function.BiFunction; import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -44,10 +45,8 @@ import net.imglib2.view.composite.NumericComposite; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -81,8 +80,8 @@ public void defaultCollapseNumericTest() { assertEquals(il2.numDimensions(), opr.numDimensions()); - BiFunction, Integer, CompositeView>> collapseFuncRA = FunctionUtils - .match(ops.env(), "transform.collapseNumericView", + BiFunction, Integer, CompositeView>> collapseFuncRA = OpBuilder + .matchFunction(ops.env(), "transform.collapseNumericView", new Nil>() { }, new Nil() { }, diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseRealView/CollapseRealViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseRealView/CollapseRealViewTest.java index 8a5bffdf2..315625585 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseRealView/CollapseRealViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseRealView/CollapseRealViewTest.java @@ -33,6 +33,7 @@ import java.util.function.BiFunction; import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -44,10 +45,9 @@ import net.imglib2.view.composite.RealComposite; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.CollapseRealView} ops. @@ -66,8 +66,8 @@ public void defaultCollapseRealTest() { Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10 }); - Function, CompositeIntervalView>> collapseFunc = FunctionUtils - .match(ops.env(), "transform.collapseRealView", new Nil>() { + Function, CompositeIntervalView>> collapseFunc = OpBuilder + .matchFunction(ops.env(), "transform.collapseRealView", new Nil>() { }, new Nil>>() { }); @@ -77,8 +77,8 @@ public void defaultCollapseRealTest() { assertEquals(il2.numDimensions(), opr.numDimensions()); - BiFunction, Integer, CompositeView>> collapseFuncRA = FunctionUtils - .match(ops.env(), "transform.collapseRealView", new Nil>() { + BiFunction, Integer, CompositeView>> collapseFuncRA = OpBuilder + .matchFunction(ops.env(), "transform.collapseRealView", new Nil>() { }, new Nil() { }, new Nil>>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseView/CollapseViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseView/CollapseViewTest.java index 4944c9385..40ee07c8e 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseView/CollapseViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/collapseView/CollapseViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -43,10 +44,9 @@ import net.imglib2.view.composite.GenericComposite; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.CollapseView} ops. @@ -64,8 +64,8 @@ public class CollapseViewTest extends AbstractOpTest { public void defaultCollapseTest() { Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10 }); - Function, CompositeIntervalView>> collapseFunc = FunctionUtils - .match(ops.env(), "transform.collapseView", new Nil>() { + Function, CompositeIntervalView>> collapseFunc = OpBuilder + .matchFunction(ops.env(), "transform.collapseView", new Nil>() { }, new Nil>>() { }); @@ -80,8 +80,8 @@ public void collapseRATest() { Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10, 10 }); - Function, CompositeView>> collapseFunc = FunctionUtils - .match(ops.env(), "transform.collapseView", new Nil>() { + Function, CompositeView>> collapseFunc = OpBuilder + .matchFunction(ops.env(), "transform.collapseView", new Nil>() { }, new Nil>>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/concatenateView/ConcatenateViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/concatenateView/ConcatenateViewTest.java index 2a6c334e1..60f7b55ce 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/concatenateView/ConcatenateViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/concatenateView/ConcatenateViewTest.java @@ -49,7 +49,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.MersenneTwisterFast; @@ -108,8 +109,8 @@ private static > void testEqual(final RandomAccessibleI @Test public void defaultConcatenateTest() { - BiFunction>, RandomAccessibleInterval> concatFunc = FunctionUtils - .match(ops.env(), "transform.concatenateView", new Nil() { + BiFunction>, RandomAccessibleInterval> concatFunc = OpBuilder + .matchFunction(ops.env(), "transform.concatenateView", new Nil() { }, new Nil>>() { }, new Nil>() { }); @@ -123,8 +124,8 @@ public void defaultConcatenateTest() { @Test public void concatenateWithAccessModeTest() { - Functions.Arity3>, RandomAccessibleInterval> concatFunc = FunctionUtils - .match(ops.env(), "transform.concatenateView", new Nil() { + Functions.Arity3>, RandomAccessibleInterval> concatFunc = OpBuilder + .matchFunction(ops.env(), "transform.concatenateView", new Nil() { }, new Nil() { }, new Nil>>() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/dropSingleDimensionsView/DropSingletonDimensionsViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/dropSingleDimensionsView/DropSingletonDimensionsViewTest.java index fef57752f..7a100109f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/dropSingleDimensionsView/DropSingletonDimensionsViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/dropSingleDimensionsView/DropSingletonDimensionsViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; import net.imglib2.img.array.ArrayImgFactory; @@ -39,9 +40,8 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -59,8 +59,8 @@ public class DropSingletonDimensionsViewTest extends AbstractOpTest { @Test public void dropSingletonDimensionsTest() { - Function, RandomAccessibleInterval> dropFunc = FunctionUtils - .match(ops.env(), "transform.dropSingletonDimensionsView", new Nil>() { + Function, RandomAccessibleInterval> dropFunc = OpBuilder + .matchFunction(ops.env(), "transform.dropSingletonDimensionsView", new Nil>() { }, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendBorderView/ExtendBorderViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendBorderView/ExtendBorderViewTest.java index 6af6df524..131b3562f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendBorderView/ExtendBorderViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendBorderView/ExtendBorderViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendBorderView} ops. @@ -63,8 +63,8 @@ public class ExtendBorderViewTest extends AbstractOpTest { @Test public void extendBorderTest() { - Function, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendBorderView", raiNil, + Function, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendBorderView", raiNil, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorDoubleView/ExtendMirrorDoubleViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorDoubleView/ExtendMirrorDoubleViewTest.java index 1faad5470..e5ea1b32d 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorDoubleView/ExtendMirrorDoubleViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorDoubleView/ExtendMirrorDoubleViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendMirrorDoubleView} ops. @@ -63,8 +63,8 @@ public class ExtendMirrorDoubleViewTest extends AbstractOpTest { @Test public void extendMirrorDoubleTest() { - Function, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendMirrorDoubleView", raiNil, + Function, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendMirrorDoubleView", raiNil, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorSingleView/ExtendMirrorSingleViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorSingleView/ExtendMirrorSingleViewTest.java index a4c39bb47..58e0c49c0 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorSingleView/ExtendMirrorSingleViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendMirrorSingleView/ExtendMirrorSingleViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendMirrorSingleView} ops. @@ -63,8 +63,8 @@ public class ExtendMirrorSingleViewTest extends AbstractOpTest { @Test public void extendMirrorSingleTest() { - Function, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendMirrorSingleView", raiNil, + Function, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendMirrorSingleView", raiNil, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendPeriodicView/ExtendPeriodicViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendPeriodicView/ExtendPeriodicViewTest.java index bd72fe6b7..6c4805709 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendPeriodicView/ExtendPeriodicViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendPeriodicView/ExtendPeriodicViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendPeriodicView} ops. @@ -63,8 +63,8 @@ public class ExtendPeriodicViewTest extends AbstractOpTest { @Test public void extendPeriodicTest() { - Function, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendPeriodicView", raiNil, + Function, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendPeriodicView", raiNil, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendRandomView/ExtendRandomViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendRandomView/ExtendRandomViewTest.java index 5154908d9..e74904f7a 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendRandomView/ExtendRandomViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendRandomView/ExtendRandomViewTest.java @@ -30,6 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -39,10 +40,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -64,8 +64,8 @@ public class ExtendRandomViewTest extends AbstractOpTest { @Test public void extendRandomTest() { - Functions.Arity3, Double, Double, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendRandomView", raiNil, doubleNil, doubleNil, + Functions.Arity3, Double, Double, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendRandomView", raiNil, doubleNil, doubleNil, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendValueView/ExtendValueViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendValueView/ExtendValueViewTest.java index ba2294171..af1f21c35 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendValueView/ExtendValueViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendValueView/ExtendValueViewTest.java @@ -32,6 +32,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendValueView} ops. @@ -63,8 +63,8 @@ public class ExtendValueViewTest extends AbstractOpTest { @Test public void extendValueTest() { - BiFunction, DoubleType, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendValueView", raiNil, new Nil() { + BiFunction, DoubleType, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendValueView", raiNil, new Nil() { }, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendView/ExtendViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendView/ExtendViewTest.java index b6223c1ad..c413d9d78 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendView/ExtendViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendView/ExtendViewTest.java @@ -32,6 +32,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -43,10 +44,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendView} ops. @@ -65,8 +65,8 @@ public class ExtendViewTest extends AbstractOpTest { @Test public void defaultExtendTest() { - BiFunction, OutOfBoundsFactory>, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendView", raiNil, + BiFunction, OutOfBoundsFactory>, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendView", raiNil, new Nil>>() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendZeroView/ExtendZeroViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendZeroView/ExtendZeroViewTest.java index 61549d7a3..788dbd3eb 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendZeroView/ExtendZeroViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/extendZeroView/ExtendZeroViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ExtendZeroView} ops. @@ -63,8 +63,8 @@ public class ExtendZeroViewTest extends AbstractOpTest { @Test public void extendZeroTest() { - Function, RandomAccessible> extendFunc = FunctionUtils - .match(ops.env(), "transform.extendZeroView", raiNil, + Function, RandomAccessible> extendFunc = OpBuilder + .matchFunction(ops.env(), "transform.extendZeroView", raiNil, new Nil>() { }); Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10 }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/flatIterableView/FlatIterableViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/flatIterableView/FlatIterableViewTest.java index 13dd51bb1..50d6c32cb 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/flatIterableView/FlatIterableViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/flatIterableView/FlatIterableViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.IterableInterval; import net.imglib2.RandomAccessibleInterval; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.FlatIterableView} ops. @@ -64,8 +64,8 @@ public class FlatIterableViewTest extends AbstractOpTest { @Test public void defaultFlatIterableTest() { - Function, IterableInterval> flatIterableFunc = FunctionUtils - .match(ops.env(), "transform.flatIterableView", raiNil, iiNil); + Function, IterableInterval> flatIterableFunc = OpBuilder + .matchFunction(ops.env(), "transform.flatIterableView", raiNil, iiNil); Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10 }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/hyperSliceView/HyperSliceViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/hyperSliceView/HyperSliceViewTest.java index a4e58ccad..aabdfdcb7 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/hyperSliceView/HyperSliceViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/hyperSliceView/HyperSliceViewTest.java @@ -30,6 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -40,10 +41,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -74,8 +74,8 @@ public static RandomAccessible deinterval(RandomAccessibleInterval inp @Test public void defaultHyperSliceTest() { - Functions.Arity3, Integer, Long, MixedTransformView> hyperSliceFunc = FunctionUtils - .match(ops.env(), "transform.hyperSliceView", raNil, integerNil, longNil, + Functions.Arity3, Integer, Long, MixedTransformView> hyperSliceFunc = OpBuilder + .matchFunction(ops.env(), "transform.hyperSliceView", raNil, integerNil, longNil, new Nil>() { }); @@ -95,8 +95,8 @@ public void defaultHyperSliceTest() { @Test public void IntervalHyperSliceTest() { - Functions.Arity3, Integer, Long, IntervalView> hyperSliceFunc = FunctionUtils - .match(ops.env(), "transform.hyperSliceView", raiNil, integerNil, longNil, + Functions.Arity3, Integer, Long, IntervalView> hyperSliceFunc = OpBuilder + .matchFunction(ops.env(), "transform.hyperSliceView", raiNil, integerNil, longNil, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/interpolateView/InterpolateViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/interpolateView/InterpolateViewTest.java index 504a7655d..99c987506 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/interpolateView/InterpolateViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/interpolateView/InterpolateViewTest.java @@ -32,6 +32,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RealRandomAccess; import net.imglib2.RealRandomAccessible; @@ -42,10 +43,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; import org.scijava.util.MersenneTwisterFast; /** @@ -65,8 +65,8 @@ public class InterpolateViewTest extends AbstractOpTest { @Test public void defaultInterpolateTest() { - BiFunction, FloorInterpolatorFactory, RealRandomAccessible> interpolateFunc = FunctionUtils - .match(ops.env(), "transform.interpolateView", new Nil>() { + BiFunction, FloorInterpolatorFactory, RealRandomAccessible> interpolateFunc = OpBuilder + .matchFunction(ops.env(), "transform.interpolateView", new Nil>() { }, new Nil>() { }, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/intervalView/IntervalViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/intervalView/IntervalViewTest.java index 778e511bb..25975fec5 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/intervalView/IntervalViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/intervalView/IntervalViewTest.java @@ -32,6 +32,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.Interval; import net.imglib2.RandomAccess; @@ -43,10 +44,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.MersenneTwisterFast; @@ -67,8 +67,8 @@ public class IntervalViewTest extends AbstractOpTest { @Test public void defaultIntervalTest() { - BiFunction, Interval, IntervalView> intervalFunc = FunctionUtils - .match(ops.env(), "transform.intervalView", new Nil>() { + BiFunction, Interval, IntervalView> intervalFunc = OpBuilder + .matchFunction(ops.env(), "transform.intervalView", new Nil>() { }, new Nil() { }, new Nil>() { }); @@ -94,8 +94,8 @@ public void defaultIntervalTest() { @Test public void intervalMinMaxTest() { - Functions.Arity3, long[], long[], IntervalView> intervalFunc = FunctionUtils - .match(ops.env(), "transform.intervalView", new Nil>() { + Functions.Arity3, long[], long[], IntervalView> intervalFunc = OpBuilder + .matchFunction(ops.env(), "transform.intervalView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/invertAxisView/InvertAxisViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/invertAxisView/InvertAxisViewTest.java index ff2126da8..26e537d1b 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/invertAxisView/InvertAxisViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/invertAxisView/InvertAxisViewTest.java @@ -32,6 +32,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -42,9 +43,8 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -67,8 +67,8 @@ public static RandomAccessible deinterval(RandomAccessibleInterval inp @Test public void defaultInvertAxisTest() { - BiFunction, Integer, MixedTransformView> invertFunc = FunctionUtils - .match(ops.env(), "transform.invertAxisView", new Nil>() { + BiFunction, Integer, MixedTransformView> invertFunc = OpBuilder + .matchFunction(ops.env(), "transform.invertAxisView", new Nil>() { }, new Nil() { }, new Nil>() { }); @@ -89,8 +89,8 @@ public void defaultInvertAxisTest() { @Test public void intervalInvertAxisTest() { - BiFunction, Integer, IntervalView> invertFunc = FunctionUtils - .match(ops.env(), "transform.invertAxisView", new Nil>() { + BiFunction, Integer, IntervalView> invertFunc = OpBuilder + .matchFunction(ops.env(), "transform.invertAxisView", new Nil>() { }, new Nil() { }, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/offsetView/OffsetViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/offsetView/OffsetViewTest.java index ebbc55bae..af4ff90ad 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/offsetView/OffsetViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/offsetView/OffsetViewTest.java @@ -32,6 +32,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.FinalInterval; import net.imglib2.Interval; import net.imglib2.RandomAccessible; @@ -44,10 +45,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -65,8 +65,8 @@ public class OffsetViewTest extends AbstractOpTest { @Test public void defaultOffsetTest() { - BiFunction, long[], MixedTransformView> offsetFunc = FunctionUtils - .match(ops.env(), "transform.offsetView", new Nil>() { + BiFunction, long[], MixedTransformView> offsetFunc = OpBuilder + .matchFunction(ops.env(), "transform.offsetView", new Nil>() { }, new Nil() { }, new Nil>() { }); @@ -87,8 +87,8 @@ public void defaultOffsetTest() { @Test public void defaultOffsetIntervalTest() { - BiFunction, Interval, IntervalView> offsetFunc = FunctionUtils - .match(ops.env(), "transform.offsetView", new Nil>() { + BiFunction, Interval, IntervalView> offsetFunc = OpBuilder + .matchFunction(ops.env(), "transform.offsetView", new Nil>() { }, new Nil() { }, new Nil>() { }); @@ -109,8 +109,8 @@ public void defaultOffsetIntervalTest() { @Test public void defaultOffsetStartEndTest() { - Functions.Arity3, long[], long[], IntervalView> offsetFunc = FunctionUtils - .match(ops.env(), "transform.offsetView", new Nil>() { + Functions.Arity3, long[], long[], IntervalView> offsetFunc = OpBuilder + .matchFunction(ops.env(), "transform.offsetView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/permuteView/PermuteViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/permuteView/PermuteViewTest.java index 441e7ddd5..dfa16188e 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/permuteView/PermuteViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/permuteView/PermuteViewTest.java @@ -33,6 +33,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; @@ -47,10 +48,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; import org.scijava.util.MersenneTwisterFast; @@ -76,8 +76,8 @@ public static RandomAccessible deinterval(RandomAccessibleInterval inp @Test public void defaultPermuteTest() { - Functions.Arity3, Integer, Integer, MixedTransformView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteView", new Nil>() { + Functions.Arity3, Integer, Integer, MixedTransformView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { @@ -99,8 +99,8 @@ public void defaultPermuteTest() { @Test public void defaultPermuteCoordinatesTest() { - BiFunction, int[], IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesView", new Nil>() { + BiFunction, int[], IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesView", new Nil>() { }, new Nil() { }, new Nil>() { }); @@ -125,8 +125,8 @@ public void defaultPermuteCoordinatesTest() { @Test public void permuteCoordinatesOfDimensionTest() { - Functions.Arity3, int[], Integer, IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesView", new Nil>() { + Functions.Arity3, int[], Integer, IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { @@ -153,8 +153,8 @@ public void permuteCoordinatesOfDimensionTest() { @Test public void defaultPermuteCoordinatesInverseTest() { - BiFunction, int[], IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesInverseView", + BiFunction, int[], IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesInverseView", new Nil>() { }, new Nil() { }, new Nil>() { @@ -180,8 +180,8 @@ public void defaultPermuteCoordinatesInverseTest() { @Test public void permuteCoordinatesInverseOfDimensionTest() { - Functions.Arity3, int[], Integer, IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesInverseView", + Functions.Arity3, int[], Integer, IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesInverseView", new Nil>() { }, new Nil() { }, new Nil() { @@ -211,8 +211,8 @@ public void permuteCoordinatesInverseOfDimensionTest() { @Test public void testIntervalPermute() { - Functions.Arity3, Integer, Integer, IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteView", + Functions.Arity3, Integer, Integer, IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteView", new Nil>() { }, new Nil() { }, new Nil() { @@ -240,8 +240,8 @@ public void testIntervalPermute() { @Test public void testIntervalPermuteCoordinates() { - BiFunction, int[], IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesView", new Nil>() { + BiFunction, int[], IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesView", new Nil>() { }, new Nil() { }, new Nil>() { }); @@ -270,8 +270,8 @@ public void testIntervalPermuteCoordinates() { @Test public void testIntervalPermuteDimensionCoordinates() { - Functions.Arity3, int[], Integer, IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesInverseView", + Functions.Arity3, int[], Integer, IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesInverseView", new Nil>() { }, new Nil() { }, new Nil() { @@ -303,8 +303,8 @@ public void testIntervalPermuteDimensionCoordinates() { @Test public void testIntervalPermuteInverseCoordinates() { - BiFunction, int[], IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesInverseView", + BiFunction, int[], IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesInverseView", new Nil>() { }, new Nil() { }, new Nil>() { @@ -335,8 +335,8 @@ public void testIntervalPermuteInverseCoordinates() { @Test public void testIntervalPermuteInverseDimensionCoordinates() { - Functions.Arity3, int[], Integer, IntervalView> permuteFunc = FunctionUtils - .match(ops.env(), "transform.permuteCoordinatesInverseView", + Functions.Arity3, int[], Integer, IntervalView> permuteFunc = OpBuilder + .matchFunction(ops.env(), "transform.permuteCoordinatesInverseView", new Nil>() { }, new Nil() { }, new Nil() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rasterView/RasterViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rasterView/RasterViewTest.java index 0dc18a725..6a45bfcfd 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rasterView/RasterViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rasterView/RasterViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.RandomAccess; import net.imglib2.RealRandomAccessible; @@ -43,10 +44,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; import org.scijava.util.MersenneTwisterFast; /** @@ -66,8 +66,8 @@ public class RasterViewTest extends AbstractOpTest { @Test public void defaultRasterTest() { - Function, RandomAccessibleOnRealRandomAccessible> rasterFunc = FunctionUtils - .match(ops.env(), "transform.rasterView", new Nil>() { + Function, RandomAccessibleOnRealRandomAccessible> rasterFunc = OpBuilder + .matchFunction(ops.env(), "transform.rasterView", new Nil>() { }, new Nil>() { }); Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10 }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rotateView/RotateViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rotateView/RotateViewTest.java index 607e64a82..81129ed46 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rotateView/RotateViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/rotateView/RotateViewTest.java @@ -30,6 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -41,10 +42,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -67,8 +67,8 @@ public static RandomAccessible deinterval(RandomAccessibleInterval inp @Test public void testDefaultRotate() { - Functions.Arity3, Integer, Integer, MixedTransformView> rotateFunc = FunctionUtils - .match(ops.env(), "transform.rotateView", new Nil>() { + Functions.Arity3, Integer, Integer, MixedTransformView> rotateFunc = OpBuilder + .matchFunction(ops.env(), "transform.rotateView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { @@ -90,8 +90,8 @@ public void testDefaultRotate() { @Test public void testIntervalRotate() { - Functions.Arity3, Integer, Integer, IntervalView> rotateFunc = FunctionUtils - .match(ops.env(), "transform.rotateView", new Nil>() { + Functions.Arity3, Integer, Integer, IntervalView> rotateFunc = OpBuilder + .matchFunction(ops.env(), "transform.rotateView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { @@ -117,8 +117,8 @@ public void testIntervalRotate() { @Test public void testIntervalRotateInterval() { - Functions.Arity3, Integer, Integer, IntervalView> rotateFunc = FunctionUtils - .match(ops.env(), "transform.rotateView", new Nil>() { + Functions.Arity3, Integer, Integer, IntervalView> rotateFunc = OpBuilder + .matchFunction(ops.env(), "transform.rotateView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/shearView/ShearViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/shearView/ShearViewTest.java index 7bcb42312..fb6e341a5 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/shearView/ShearViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/shearView/ShearViewTest.java @@ -30,6 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.FinalInterval; import net.imglib2.Interval; @@ -43,10 +44,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -65,8 +65,8 @@ public class ShearViewTest extends AbstractOpTest { @Test public void defaultShearTest() { - Functions.Arity3, Integer, Integer, TransformView> shearFunc = FunctionUtils - .match(ops.env(), "transform.shearView", new Nil>() { + Functions.Arity3, Integer, Integer, TransformView> shearFunc = OpBuilder + .matchFunction(ops.env(), "transform.shearView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { @@ -96,8 +96,8 @@ public void defaultShearTest() { @Test public void ShearIntervalTest() { - Functions.Arity4, Interval, Integer, Integer, IntervalView> shearFunc = FunctionUtils - .match(ops.env(), "transform.shearView", new Nil>() { + Functions.Arity4, Interval, Integer, Integer, IntervalView> shearFunc = OpBuilder + .matchFunction(ops.env(), "transform.shearView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/stackView/StackViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/stackView/StackViewTest.java index f46e3e977..c023e7950 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/stackView/StackViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/stackView/StackViewTest.java @@ -35,6 +35,7 @@ import java.util.function.BiFunction; import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; import net.imglib2.img.array.ArrayImgFactory; @@ -43,10 +44,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.StackView} ops. @@ -63,7 +63,7 @@ public class StackViewTest extends AbstractOpTest { @Test public void defaultStackTest() { Function>, RandomAccessibleInterval> stackFunc = - FunctionUtils.match(ops.env(), "transform.stackView", + OpBuilder.matchFunction(ops.env(), "transform.stackView", new Nil>>() {}, new Nil>() {}); @@ -82,8 +82,8 @@ public void defaultStackTest() { @Test public void stackWithAccessModeTest() { - BiFunction>, RandomAccessibleInterval> stackFunc = FunctionUtils - .match(ops.env(), "transform.stackView", new Nil() { + BiFunction>, RandomAccessibleInterval> stackFunc = OpBuilder + .matchFunction(ops.env(), "transform.stackView", new Nil() { }, new Nil>>() { }, new Nil>() { }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/subsampleView/SubsampleViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/subsampleView/SubsampleViewTest.java index 590acd324..bc8500026 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/subsampleView/SubsampleViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/subsampleView/SubsampleViewTest.java @@ -33,6 +33,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; @@ -47,10 +48,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; import org.scijava.util.MersenneTwisterFast; /** @@ -70,7 +70,7 @@ public class SubsampleViewTest extends AbstractOpTest { @Test public void defaultSubsampleTest() { - BiFunction, Long, SubsampleView> subsampleFunc = FunctionUtils.match(ops.env(), + BiFunction, Long, SubsampleView> subsampleFunc = OpBuilder.matchFunction(ops.env(), "transform.subsampleView", new Nil>() { }, new Nil() { }, new Nil>() { @@ -98,7 +98,7 @@ public void defaultSubsampleTest() { @Test public void defaultSubsampleStepsTest() { - BiFunction, long[], SubsampleView> subsampleFunc = FunctionUtils.match(ops.env(), + BiFunction, long[], SubsampleView> subsampleFunc = OpBuilder.matchFunction(ops.env(), "transform.subsampleView", new Nil>() { }, new Nil() { }, new Nil>() { @@ -126,7 +126,7 @@ public void defaultSubsampleStepsTest() { @Test public void testIntervalSubsample() { - BiFunction, Long, SubsampleIntervalView> subsampleFunc = FunctionUtils.match(ops.env(), + BiFunction, Long, SubsampleIntervalView> subsampleFunc = OpBuilder.matchFunction(ops.env(), "transform.subsampleView", new Nil>() { }, new Nil() { }, new Nil>() { @@ -156,7 +156,7 @@ public void testIntervalSubsample() { @Test public void testIntervalSubsampleSteps() { - BiFunction, long[], SubsampleIntervalView> subsampleFunc = FunctionUtils.match(ops.env(), + BiFunction, long[], SubsampleIntervalView> subsampleFunc = OpBuilder.matchFunction(ops.env(), "transform.subsampleView", new Nil>() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/translateView/TranslateViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/translateView/TranslateViewTest.java index 405cfa457..d1e94e33f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/translateView/TranslateViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/translateView/TranslateViewTest.java @@ -33,6 +33,7 @@ import java.util.function.BiFunction; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.Img; @@ -45,10 +46,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.TranslateView} ops. @@ -71,7 +71,7 @@ public static RandomAccessible deinterval(RandomAccessibleInterval inp @Test public void defaultTranslateTest() { - BiFunction, long[], MixedTransformView> translateFunc = FunctionUtils.match(ops.env(), + BiFunction, long[], MixedTransformView> translateFunc = OpBuilder.matchFunction(ops.env(), "transform.translateView", new Nil>() { }, new Nil() { }, new Nil>() { @@ -93,7 +93,7 @@ public void defaultTranslateTest() { @Test public void testIntervalTranslate() { - BiFunction, long[], IntervalView> translateFunc = FunctionUtils.match(ops.env(), + BiFunction, long[], IntervalView> translateFunc = OpBuilder.matchFunction(ops.env(), "transform.translateView", new Nil>() { }, new Nil() { }, new Nil>() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/unshearView/UnshearViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/unshearView/UnshearViewTest.java index d3f57aecf..e8f680ee1 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/unshearView/UnshearViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/unshearView/UnshearViewTest.java @@ -30,6 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.Cursor; import net.imglib2.FinalInterval; import net.imglib2.Interval; @@ -43,10 +44,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; - import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** @@ -63,8 +63,8 @@ public class UnshearViewTest extends AbstractOpTest { @Test public void defaultUnshearTest() { - Functions.Arity3, Integer, Integer, TransformView> unshearFunc = FunctionUtils - .match(ops.env(), "transform.unshearView", new Nil>() { + Functions.Arity3, Integer, Integer, TransformView> unshearFunc = OpBuilder + .matchFunction(ops.env(), "transform.unshearView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil>() { @@ -93,8 +93,8 @@ public void defaultUnshearTest() { @Test public void UnshearIntervalTest() { - Functions.Arity4, Interval, Integer, Integer, IntervalView> unshearFunc = FunctionUtils - .match(ops.env(), "transform.unshearView", new Nil>() { + Functions.Arity4, Interval, Integer, Integer, IntervalView> unshearFunc = OpBuilder + .matchFunction(ops.env(), "transform.unshearView", new Nil>() { }, new Nil() { }, new Nil() { }, new Nil() { diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/zeroMinView/ZeroMinViewTest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/zeroMinView/ZeroMinViewTest.java index ad8ca3e40..a6f00b768 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/zeroMinView/ZeroMinViewTest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/transform/zeroMinView/ZeroMinViewTest.java @@ -32,6 +32,7 @@ import java.util.function.Function; +import net.imagej.ops2.AbstractOpTest; import net.imglib2.RandomAccessible; import net.imglib2.img.Img; import net.imglib2.img.array.ArrayImgFactory; @@ -40,10 +41,9 @@ import net.imglib2.view.Views; import org.junit.jupiter.api.Test; -import net.imagej.ops2.AbstractOpTest; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; /** * Tests {@link net.imagej.ops2.Ops.Transform.ZeroMinView} ops. @@ -61,7 +61,7 @@ public class ZeroMinViewTest extends AbstractOpTest { public void defaultZeroMinTest() { Function, IntervalView> zeroMinFunc = - FunctionUtils.match(ops.env(), "transform.zeroMinView", + OpBuilder.matchFunction(ops.env(), "transform.zeroMinView", new Nil>() {}, new Nil>() {}); Img img = new ArrayImgFactory<>(new DoubleType()).create(new int[] { 10, 10 }); diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/TypeExtractorTests.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/TypeExtractorTests.java index b23dbe6d1..f9326b5d3 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/TypeExtractorTests.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/TypeExtractorTests.java @@ -13,8 +13,8 @@ import net.imglib2.type.numeric.integer.UnsignedByteType; import org.junit.jupiter.api.Test; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.types.TypeExtractor; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftComputersToRAITest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftComputersToRAITest.java index 7456fdba3..8b49dcd4f 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftComputersToRAITest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftComputersToRAITest.java @@ -11,8 +11,8 @@ import org.junit.jupiter.api.Test; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.types.Nil; import org.scijava.plugin.Plugin; diff --git a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAITest.java b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAITest.java index f08f2ef3b..cf612122b 100644 --- a/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAITest.java +++ b/imagej/imagej-ops2/src/test/java/net/imagej/ops2/types/adapt/LiftFunctionsToRAITest.java @@ -15,8 +15,8 @@ import org.junit.jupiter.api.Test; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.types.Nil; diff --git a/pom.xml b/pom.xml index 088fe85f3..ab5699e13 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.scijava pom-scijava - 29.0.0 + 30.0.0 @@ -49,7 +49,12 @@ imagej/imagej-testutil scijava/scijava-persist scijava/scijava-function - scijava/scijava-ops + scijava/scijava-ops-api + scijava/scijava-ops-discovery + scijava/scijava-ops-engine + scijava/scijava-ops-spi + scijava/scijava-struct + scijava/scijava-taglets scijava/scijava-testutil scijava/scijava-types @@ -73,13 +78,9 @@ N/A 11 - [11,11.9999] https://javadoc.scijava.org/Java11/ https://javadoc.scijava.org/JavaFX11/ - - true - true none @@ -98,6 +99,11 @@ maven-compiler-plugin + + com.github.therapi + therapi-runtime-javadoc-scribe + 0.12.0 + org.scijava scijava-common @@ -106,6 +112,56 @@ + + maven-javadoc-plugin + + + + org.scijava + scijava-taglets + ${project.version} + + + + + + maven-enforcer-plugin + + + org.scijava + scijava-packages-rules + 0-SNAPSHOT + + + + + enforce-no-package-cycles + + enforce + + test + + + + + + + + enforce-no-subpackage-dependence + + enforce + + test + + + + + + + + diff --git a/scijava/scijava-function/src/main/java/org/scijava/function/Computers.java b/scijava/scijava-function/src/main/java/org/scijava/function/Computers.java index 7e5d30b8b..955b509fe 100644 --- a/scijava/scijava-function/src/main/java/org/scijava/function/Computers.java +++ b/scijava/scijava-function/src/main/java/org/scijava/function/Computers.java @@ -5,6 +5,7 @@ package org.scijava.function; +import java.util.HashMap; import java.util.function.BiConsumer; import java.util.function.Consumer; @@ -32,6 +33,46 @@ private Computers() { // NB: Prevent instantiation of utility class. } + // -- Static Utility Methods -- // + + /** + * All known computer types and their arities. The entries are sorted by + * arity, i.e., the {@code i}-th entry has an arity of {@code i}. + */ + public static final HashMap, Integer> ALL_COMPUTERS; + + static { + ALL_COMPUTERS = new HashMap<>(); + ALL_COMPUTERS.put(Computers.Arity0.class, 0); + ALL_COMPUTERS.put(Computers.Arity1.class, 1); + ALL_COMPUTERS.put(Computers.Arity2.class, 2); + ALL_COMPUTERS.put(Computers.Arity3.class, 3); + ALL_COMPUTERS.put(Computers.Arity4.class, 4); + ALL_COMPUTERS.put(Computers.Arity5.class, 5); + ALL_COMPUTERS.put(Computers.Arity6.class, 6); + ALL_COMPUTERS.put(Computers.Arity7.class, 7); + ALL_COMPUTERS.put(Computers.Arity8.class, 8); + ALL_COMPUTERS.put(Computers.Arity9.class, 9); + ALL_COMPUTERS.put(Computers.Arity10.class, 10); + ALL_COMPUTERS.put(Computers.Arity11.class, 11); + ALL_COMPUTERS.put(Computers.Arity12.class, 12); + ALL_COMPUTERS.put(Computers.Arity13.class, 13); + ALL_COMPUTERS.put(Computers.Arity14.class, 14); + ALL_COMPUTERS.put(Computers.Arity15.class, 15); + ALL_COMPUTERS.put(Computers.Arity16.class, 16); + } + + /** + * @return {@code true} if the given type is a known + * computer type, {@code false} otherwise.
+ * Note that only the type itself and not its type hierarchy is + * considered. + * @throws NullPointerException If {@code c} is {@code null}. + */ + public static boolean isComputer(Class c) { + return ALL_COMPUTERS.containsKey(c); + } + @FunctionalInterface public interface Arity0 extends diff --git a/scijava/scijava-function/src/main/java/org/scijava/function/Functions.java b/scijava/scijava-function/src/main/java/org/scijava/function/Functions.java index 679e55189..5a1a6037b 100644 --- a/scijava/scijava-function/src/main/java/org/scijava/function/Functions.java +++ b/scijava/scijava-function/src/main/java/org/scijava/function/Functions.java @@ -5,6 +5,7 @@ package org.scijava.function; +import java.util.HashMap; import java.util.Objects; import java.util.function.BiFunction; import java.util.function.Function; @@ -31,6 +32,44 @@ private Functions() { // NB: Prevent instantiation of utility class. } + /** + * All known function types and their arities. The entries are sorted by + * arity, i.e., the {@code i}-th entry has an arity of {@code i}. + */ + public static final HashMap> ALL_FUNCTIONS; + + static { + ALL_FUNCTIONS = new HashMap<>(10); + ALL_FUNCTIONS.put(0, Producer.class); + ALL_FUNCTIONS.put(1, Function.class); + ALL_FUNCTIONS.put(2, BiFunction.class); + ALL_FUNCTIONS.put(3, Functions.Arity3.class); + ALL_FUNCTIONS.put(4, Functions.Arity4.class); + ALL_FUNCTIONS.put(5, Functions.Arity5.class); + ALL_FUNCTIONS.put(6, Functions.Arity6.class); + ALL_FUNCTIONS.put(7, Functions.Arity7.class); + ALL_FUNCTIONS.put(8, Functions.Arity8.class); + ALL_FUNCTIONS.put(9, Functions.Arity9.class); + ALL_FUNCTIONS.put(10, Functions.Arity10.class); + ALL_FUNCTIONS.put(11, Functions.Arity11.class); + ALL_FUNCTIONS.put(12, Functions.Arity12.class); + ALL_FUNCTIONS.put(13, Functions.Arity13.class); + ALL_FUNCTIONS.put(14, Functions.Arity14.class); + ALL_FUNCTIONS.put(15, Functions.Arity15.class); + ALL_FUNCTIONS.put(16, Functions.Arity16.class); + } + + /** + * @return {@code true} if the given type is a known + * function type, {@code false} otherwise.
+ * Note that only the type itself and not its type hierarchy is + * considered. + * @throws NullPointerException If {@code c} is {@code null}. + */ + public static boolean isFunction(Class c) { + return ALL_FUNCTIONS.containsValue(c); + } + /** * A 3-arity specialization of {@link Function}. * diff --git a/scijava/scijava-function/src/main/java/org/scijava/function/Inplaces.java b/scijava/scijava-function/src/main/java/org/scijava/function/Inplaces.java index a02159d31..9cfcb9277 100644 --- a/scijava/scijava-function/src/main/java/org/scijava/function/Inplaces.java +++ b/scijava/scijava-function/src/main/java/org/scijava/function/Inplaces.java @@ -5,8 +5,14 @@ package org.scijava.function; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.function.BiConsumer; import java.util.function.Consumer; +import java.util.stream.Collectors; /** * Container class for inplace-style functional interfaces at various @@ -43,6 +49,171 @@ private Inplaces() { // NB: Prevent instantiation of container class. } + /** + * All known inplace types and their arities and mutable positions. The + * entries are sorted by arity and mutable position. + */ + public static final Map, InplaceInfo> ALL_INPLACES; + + static { + final Map, InplaceInfo> inplaces = new LinkedHashMap<>(22); + inplaces.put(Inplaces.Arity1.class, new InplaceInfo(1, 0)); + inplaces.put(Inplaces.Arity2_1.class, new InplaceInfo(2, 0)); + inplaces.put(Inplaces.Arity2_2.class, new InplaceInfo(2, 1)); + inplaces.put(Inplaces.Arity3_1.class, new InplaceInfo(3, 0)); + inplaces.put(Inplaces.Arity3_2.class, new InplaceInfo(3, 1)); + inplaces.put(Inplaces.Arity3_3.class, new InplaceInfo(3, 2)); + inplaces.put(Inplaces.Arity4_1.class, new InplaceInfo(4, 0)); + inplaces.put(Inplaces.Arity4_2.class, new InplaceInfo(4, 1)); + inplaces.put(Inplaces.Arity4_3.class, new InplaceInfo(4, 2)); + inplaces.put(Inplaces.Arity4_4.class, new InplaceInfo(4, 3)); + inplaces.put(Inplaces.Arity5_1.class, new InplaceInfo(5, 0)); + inplaces.put(Inplaces.Arity5_2.class, new InplaceInfo(5, 1)); + inplaces.put(Inplaces.Arity5_3.class, new InplaceInfo(5, 2)); + inplaces.put(Inplaces.Arity5_4.class, new InplaceInfo(5, 3)); + inplaces.put(Inplaces.Arity5_5.class, new InplaceInfo(5, 4)); + inplaces.put(Inplaces.Arity6_1.class, new InplaceInfo(6, 0)); + inplaces.put(Inplaces.Arity6_2.class, new InplaceInfo(6, 1)); + inplaces.put(Inplaces.Arity6_3.class, new InplaceInfo(6, 2)); + inplaces.put(Inplaces.Arity6_4.class, new InplaceInfo(6, 3)); + inplaces.put(Inplaces.Arity6_5.class, new InplaceInfo(6, 4)); + inplaces.put(Inplaces.Arity6_6.class, new InplaceInfo(6, 5)); + inplaces.put(Inplaces.Arity7_1.class, new InplaceInfo(7, 0)); + inplaces.put(Inplaces.Arity7_2.class, new InplaceInfo(7, 1)); + inplaces.put(Inplaces.Arity7_3.class, new InplaceInfo(7, 2)); + inplaces.put(Inplaces.Arity7_4.class, new InplaceInfo(7, 3)); + inplaces.put(Inplaces.Arity7_5.class, new InplaceInfo(7, 4)); + inplaces.put(Inplaces.Arity7_6.class, new InplaceInfo(7, 5)); + inplaces.put(Inplaces.Arity7_7.class, new InplaceInfo(7, 6)); + inplaces.put(Inplaces.Arity8_1.class, new InplaceInfo(8, 0)); + inplaces.put(Inplaces.Arity8_2.class, new InplaceInfo(8, 1)); + inplaces.put(Inplaces.Arity8_3.class, new InplaceInfo(8, 2)); + inplaces.put(Inplaces.Arity8_4.class, new InplaceInfo(8, 3)); + inplaces.put(Inplaces.Arity8_5.class, new InplaceInfo(8, 4)); + inplaces.put(Inplaces.Arity8_6.class, new InplaceInfo(8, 5)); + inplaces.put(Inplaces.Arity8_7.class, new InplaceInfo(8, 6)); + inplaces.put(Inplaces.Arity8_8.class, new InplaceInfo(8, 7)); + inplaces.put(Inplaces.Arity9_1.class, new InplaceInfo(9, 0)); + inplaces.put(Inplaces.Arity9_2.class, new InplaceInfo(9, 1)); + inplaces.put(Inplaces.Arity9_3.class, new InplaceInfo(9, 2)); + inplaces.put(Inplaces.Arity9_4.class, new InplaceInfo(9, 3)); + inplaces.put(Inplaces.Arity9_5.class, new InplaceInfo(9, 4)); + inplaces.put(Inplaces.Arity9_6.class, new InplaceInfo(9, 5)); + inplaces.put(Inplaces.Arity9_7.class, new InplaceInfo(9, 6)); + inplaces.put(Inplaces.Arity9_8.class, new InplaceInfo(9, 7)); + inplaces.put(Inplaces.Arity9_9.class, new InplaceInfo(9, 8)); + inplaces.put(Inplaces.Arity10_1.class, new InplaceInfo(10, 0)); + inplaces.put(Inplaces.Arity10_2.class, new InplaceInfo(10, 1)); + inplaces.put(Inplaces.Arity10_3.class, new InplaceInfo(10, 2)); + inplaces.put(Inplaces.Arity10_4.class, new InplaceInfo(10, 3)); + inplaces.put(Inplaces.Arity10_5.class, new InplaceInfo(10, 4)); + inplaces.put(Inplaces.Arity10_6.class, new InplaceInfo(10, 5)); + inplaces.put(Inplaces.Arity10_7.class, new InplaceInfo(10, 6)); + inplaces.put(Inplaces.Arity10_8.class, new InplaceInfo(10, 7)); + inplaces.put(Inplaces.Arity10_9.class, new InplaceInfo(10, 8)); + inplaces.put(Inplaces.Arity10_10.class, new InplaceInfo(10, 9)); + inplaces.put(Inplaces.Arity11_1.class, new InplaceInfo(11, 0)); + inplaces.put(Inplaces.Arity11_2.class, new InplaceInfo(11, 1)); + inplaces.put(Inplaces.Arity11_3.class, new InplaceInfo(11, 2)); + inplaces.put(Inplaces.Arity11_4.class, new InplaceInfo(11, 3)); + inplaces.put(Inplaces.Arity11_5.class, new InplaceInfo(11, 4)); + inplaces.put(Inplaces.Arity11_6.class, new InplaceInfo(11, 5)); + inplaces.put(Inplaces.Arity11_7.class, new InplaceInfo(11, 6)); + inplaces.put(Inplaces.Arity11_8.class, new InplaceInfo(11, 7)); + inplaces.put(Inplaces.Arity11_9.class, new InplaceInfo(11, 8)); + inplaces.put(Inplaces.Arity11_10.class, new InplaceInfo(11, 9)); + inplaces.put(Inplaces.Arity11_11.class, new InplaceInfo(11, 10)); + inplaces.put(Inplaces.Arity12_1.class, new InplaceInfo(12, 0)); + inplaces.put(Inplaces.Arity12_2.class, new InplaceInfo(12, 1)); + inplaces.put(Inplaces.Arity12_3.class, new InplaceInfo(12, 2)); + inplaces.put(Inplaces.Arity12_4.class, new InplaceInfo(12, 3)); + inplaces.put(Inplaces.Arity12_5.class, new InplaceInfo(12, 4)); + inplaces.put(Inplaces.Arity12_6.class, new InplaceInfo(12, 5)); + inplaces.put(Inplaces.Arity12_7.class, new InplaceInfo(12, 6)); + inplaces.put(Inplaces.Arity12_8.class, new InplaceInfo(12, 7)); + inplaces.put(Inplaces.Arity12_9.class, new InplaceInfo(12, 8)); + inplaces.put(Inplaces.Arity12_10.class, new InplaceInfo(12, 9)); + inplaces.put(Inplaces.Arity12_11.class, new InplaceInfo(12, 10)); + inplaces.put(Inplaces.Arity12_12.class, new InplaceInfo(12, 11)); + inplaces.put(Inplaces.Arity13_1.class, new InplaceInfo(13, 0)); + inplaces.put(Inplaces.Arity13_2.class, new InplaceInfo(13, 1)); + inplaces.put(Inplaces.Arity13_3.class, new InplaceInfo(13, 2)); + inplaces.put(Inplaces.Arity13_4.class, new InplaceInfo(13, 3)); + inplaces.put(Inplaces.Arity13_5.class, new InplaceInfo(13, 4)); + inplaces.put(Inplaces.Arity13_6.class, new InplaceInfo(13, 5)); + inplaces.put(Inplaces.Arity13_7.class, new InplaceInfo(13, 6)); + inplaces.put(Inplaces.Arity13_8.class, new InplaceInfo(13, 7)); + inplaces.put(Inplaces.Arity13_9.class, new InplaceInfo(13, 8)); + inplaces.put(Inplaces.Arity13_10.class, new InplaceInfo(13, 9)); + inplaces.put(Inplaces.Arity13_11.class, new InplaceInfo(13, 10)); + inplaces.put(Inplaces.Arity13_12.class, new InplaceInfo(13, 11)); + inplaces.put(Inplaces.Arity13_13.class, new InplaceInfo(13, 12)); + inplaces.put(Inplaces.Arity14_1.class, new InplaceInfo(14, 0)); + inplaces.put(Inplaces.Arity14_2.class, new InplaceInfo(14, 1)); + inplaces.put(Inplaces.Arity14_3.class, new InplaceInfo(14, 2)); + inplaces.put(Inplaces.Arity14_4.class, new InplaceInfo(14, 3)); + inplaces.put(Inplaces.Arity14_5.class, new InplaceInfo(14, 4)); + inplaces.put(Inplaces.Arity14_6.class, new InplaceInfo(14, 5)); + inplaces.put(Inplaces.Arity14_7.class, new InplaceInfo(14, 6)); + inplaces.put(Inplaces.Arity14_8.class, new InplaceInfo(14, 7)); + inplaces.put(Inplaces.Arity14_9.class, new InplaceInfo(14, 8)); + inplaces.put(Inplaces.Arity14_10.class, new InplaceInfo(14, 9)); + inplaces.put(Inplaces.Arity14_11.class, new InplaceInfo(14, 10)); + inplaces.put(Inplaces.Arity14_12.class, new InplaceInfo(14, 11)); + inplaces.put(Inplaces.Arity14_13.class, new InplaceInfo(14, 12)); + inplaces.put(Inplaces.Arity14_14.class, new InplaceInfo(14, 13)); + inplaces.put(Inplaces.Arity15_1.class, new InplaceInfo(15, 0)); + inplaces.put(Inplaces.Arity15_2.class, new InplaceInfo(15, 1)); + inplaces.put(Inplaces.Arity15_3.class, new InplaceInfo(15, 2)); + inplaces.put(Inplaces.Arity15_4.class, new InplaceInfo(15, 3)); + inplaces.put(Inplaces.Arity15_5.class, new InplaceInfo(15, 4)); + inplaces.put(Inplaces.Arity15_6.class, new InplaceInfo(15, 5)); + inplaces.put(Inplaces.Arity15_7.class, new InplaceInfo(15, 6)); + inplaces.put(Inplaces.Arity15_8.class, new InplaceInfo(15, 7)); + inplaces.put(Inplaces.Arity15_9.class, new InplaceInfo(15, 8)); + inplaces.put(Inplaces.Arity15_10.class, new InplaceInfo(15, 9)); + inplaces.put(Inplaces.Arity15_11.class, new InplaceInfo(15, 10)); + inplaces.put(Inplaces.Arity15_12.class, new InplaceInfo(15, 11)); + inplaces.put(Inplaces.Arity15_13.class, new InplaceInfo(15, 12)); + inplaces.put(Inplaces.Arity15_14.class, new InplaceInfo(15, 13)); + inplaces.put(Inplaces.Arity15_15.class, new InplaceInfo(15, 14)); + inplaces.put(Inplaces.Arity16_1.class, new InplaceInfo(16, 0)); + inplaces.put(Inplaces.Arity16_2.class, new InplaceInfo(16, 1)); + inplaces.put(Inplaces.Arity16_3.class, new InplaceInfo(16, 2)); + inplaces.put(Inplaces.Arity16_4.class, new InplaceInfo(16, 3)); + inplaces.put(Inplaces.Arity16_5.class, new InplaceInfo(16, 4)); + inplaces.put(Inplaces.Arity16_6.class, new InplaceInfo(16, 5)); + inplaces.put(Inplaces.Arity16_7.class, new InplaceInfo(16, 6)); + inplaces.put(Inplaces.Arity16_8.class, new InplaceInfo(16, 7)); + inplaces.put(Inplaces.Arity16_9.class, new InplaceInfo(16, 8)); + inplaces.put(Inplaces.Arity16_10.class, new InplaceInfo(16, 9)); + inplaces.put(Inplaces.Arity16_11.class, new InplaceInfo(16, 10)); + inplaces.put(Inplaces.Arity16_12.class, new InplaceInfo(16, 11)); + inplaces.put(Inplaces.Arity16_13.class, new InplaceInfo(16, 12)); + inplaces.put(Inplaces.Arity16_14.class, new InplaceInfo(16, 13)); + inplaces.put(Inplaces.Arity16_15.class, new InplaceInfo(16, 14)); + inplaces.put(Inplaces.Arity16_16.class, new InplaceInfo(16, 15)); + ALL_INPLACES = Collections.unmodifiableMap(inplaces); + } + + /** + * @return {@code true} if the given type is a known + * inplace type, {@code false} otherwise.
+ * Note that only the type itself and not its type hierarchy is + * considered. + * @throws NullPointerException If {@code c} is {@code null}. + */ + public static boolean isInplace(Class c) { + return ALL_INPLACES.containsKey(c); + } + + public static List> getInplacesOfArity(final int arity) { + return ALL_INPLACES.entrySet().stream() // + .filter(e -> e.getValue().arity() == arity) // + .map(Entry, InplaceInfo>::getKey) // + .collect(Collectors.toList()); + } + @FunctionalInterface public interface Arity1 extends Consumer { @@ -1329,4 +1500,22 @@ public interface Arity16_16, Integer> ALL_COMPUTERS; + + static { + ALL_COMPUTERS = new HashMap<>(); +#foreach($arity in $arities) + ALL_COMPUTERS.put(Computers.Arity${arity}.class, $arity); +#end + } + + /** + * @return {@code true} if the given type is a known + * computer type, {@code false} otherwise.
+ * Note that only the type itself and not its type hierarchy is + * considered. + * @throws NullPointerException If {@code c} is {@code null}. + */ + public static boolean isComputer(Class c) { + return ALL_COMPUTERS.containsKey(c); + } + #foreach($arity in $arities) #set($rawClass = "Arity$arity") #set($genericParams = $generics.call($arity)) diff --git a/scijava/scijava-function/templates/main/java/org/scijava/function/Functions.vm b/scijava/scijava-function/templates/main/java/org/scijava/function/Functions.vm index 4121de4a8..321a7e627 100644 --- a/scijava/scijava-function/templates/main/java/org/scijava/function/Functions.vm +++ b/scijava/scijava-function/templates/main/java/org/scijava/function/Functions.vm @@ -5,6 +5,7 @@ package org.scijava.function; +import java.util.HashMap; import java.util.Objects; import java.util.function.BiFunction; import java.util.function.Function; @@ -32,6 +33,30 @@ public final class Functions { // NB: Prevent instantiation of utility class. } + /** + * All known function types and their arities. The entries are sorted by + * arity, i.e., the {@code i}-th entry has an arity of {@code i}. + */ + public static final HashMap> ALL_FUNCTIONS; + + static { + ALL_FUNCTIONS = new HashMap<>(10); +#foreach($arity in [0..$maxArity]) + ALL_FUNCTIONS.put($arity, ${functionArity.call($arity)}.class); +#end + } + + /** + * @return {@code true} if the given type is a known + * function type, {@code false} otherwise.
+ * Note that only the type itself and not its type hierarchy is + * considered. + * @throws NullPointerException If {@code c} is {@code null}. + */ + public static boolean isFunction(Class c) { + return ALL_FUNCTIONS.containsValue(c); + } + #foreach($arity in $arities) /** * A ${arity}-arity specialization of {@link Function}. diff --git a/scijava/scijava-function/templates/main/java/org/scijava/function/Inplaces.vm b/scijava/scijava-function/templates/main/java/org/scijava/function/Inplaces.vm index 8a06d9074..bd9e47a7b 100644 --- a/scijava/scijava-function/templates/main/java/org/scijava/function/Inplaces.vm +++ b/scijava/scijava-function/templates/main/java/org/scijava/function/Inplaces.vm @@ -5,8 +5,14 @@ package org.scijava.function; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.function.BiConsumer; import java.util.function.Consumer; +import java.util.stream.Collectors; /** * Container class for inplace-style functional interfaces at various @@ -43,6 +49,41 @@ public final class Inplaces { // NB: Prevent instantiation of container class. } + /** + * All known inplace types and their arities and mutable positions. The + * entries are sorted by arity and mutable position. + */ + public static final Map, InplaceInfo> ALL_INPLACES; + + static { + final Map, InplaceInfo> inplaces = new LinkedHashMap<>(22); +#foreach($arity in $arities) +#foreach($a in [1..$arity]) +#set($inplaceIndex = $a - 1) + inplaces.put($inplaceClass.call($arity, $a), new InplaceInfo(${arity}, $inplaceIndex)); +#end +#end + ALL_INPLACES = Collections.unmodifiableMap(inplaces); + } + + /** + * @return {@code true} if the given type is a known + * inplace type, {@code false} otherwise.
+ * Note that only the type itself and not its type hierarchy is + * considered. + * @throws NullPointerException If {@code c} is {@code null}. + */ + public static boolean isInplace(Class c) { + return ALL_INPLACES.containsKey(c); + } + + public static List> getInplacesOfArity(final int arity) { + return ALL_INPLACES.entrySet().stream() // + .filter(e -> e.getValue().arity() == arity) // + .map(Entry, InplaceInfo>::getKey) // + .collect(Collectors.toList()); + } + @FunctionalInterface public interface Arity1 extends Consumer { @@ -80,4 +121,22 @@ public final class Inplaces { #end #end + public static class InplaceInfo { + + private final int arity; + private final int mutablePosition; + + public InplaceInfo(final int arity, final int mutablePosition) { + this.arity = arity; + this.mutablePosition = mutablePosition; + } + + public int arity() { + return arity; + } + + public int mutablePosition() { + return mutablePosition; + } + } } diff --git a/scijava/scijava-ops-api/.gitignore b/scijava/scijava-ops-api/.gitignore new file mode 100644 index 000000000..00d2ab71d --- /dev/null +++ b/scijava/scijava-ops-api/.gitignore @@ -0,0 +1,2 @@ +/.apt_generated/ +/.apt_generated_tests/ diff --git a/scijava/scijava-ops/LICENSE.txt b/scijava/scijava-ops-api/LICENSE.txt similarity index 100% rename from scijava/scijava-ops/LICENSE.txt rename to scijava/scijava-ops-api/LICENSE.txt diff --git a/scijava/scijava-ops/README.md b/scijava/scijava-ops-api/README.md similarity index 100% rename from scijava/scijava-ops/README.md rename to scijava/scijava-ops-api/README.md diff --git a/scijava/scijava-ops/bin/generate.groovy b/scijava/scijava-ops-api/bin/generate.groovy old mode 100755 new mode 100644 similarity index 100% rename from scijava/scijava-ops/bin/generate.groovy rename to scijava/scijava-ops-api/bin/generate.groovy diff --git a/scijava/scijava-ops-api/pom.xml b/scijava/scijava-ops-api/pom.xml new file mode 100644 index 000000000..719ff8cca --- /dev/null +++ b/scijava/scijava-ops-api/pom.xml @@ -0,0 +1,134 @@ + + + 4.0.0 + + + org.scijava + scijava-incubator + 0-SNAPSHOT + ../.. + + + scijava-ops-api + + SciJava Ops API + SciJava Operations API: Outward-facing Interfaces used by the SciJava Operations framework. + https://github.com/scijava/scijava-ops-api + 2021 + + SciJava + https://scijava.org/ + + + + Simplified BSD License + repo + + + + + + ctrueden + Curtis Rueden + https://imagej.net/User:Rueden + + founder + lead + reviewer + support + maintainer + + + + gselzer + Gabriel Selzer + + founder + developer + debugger + reviewer + support + + + + + + Christian Dietz + https://imagej.net/User:Dietzc + + founder + + + dietzc + + + + David Kolb + + founder + + + Treiblesschorle + + + + + + + Image.sc Forum + https://forum.image.sc/tags/scijava-ops-api + + + + + scm:git:git://github.com/scijava/incubator + scm:git:git@github.com:scijava/incubator + HEAD + https://github.com/scijava/incubator + + + GitHub Issues + https://github.com/scijava/scijava-ops-api/issues + + + Travis CI + https://travis-ci.com/scijava/incubator + + + + org.scijava.ops.api.Main + org.scijava.ops.api + + bsd_2 + SciJava developers. + + ${scijava.allowedDuplicateClasses},com.github.therapi.runtimejavadoc.repack.com.eclipsesource.json.* + ${scijava-ops-api.allowedDuplicateClasses} + + + + + org.scijava + scijava-common + + + org.scijava + scijava-function + ${project.version} + + + org.scijava + scijava-struct + ${project.version} + + + org.scijava + scijava-types + ${project.version} + + + + + diff --git a/scijava/scijava-ops-api/src/main/java/module-info.java b/scijava/scijava-ops-api/src/main/java/module-info.java new file mode 100644 index 000000000..26418c50f --- /dev/null +++ b/scijava/scijava-ops-api/src/main/java/module-info.java @@ -0,0 +1,10 @@ +module org.scijava.ops.api { + + exports org.scijava.ops.api; + + requires org.scijava; + requires org.scijava.function; + requires transitive org.scijava.struct; + requires org.scijava.types; + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/Hints.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/Hints.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/Hints.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/Hints.java index af66b188d..25df129df 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/Hints.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/Hints.java @@ -1,13 +1,10 @@ -package org.scijava.ops.hints; +package org.scijava.ops.api; import java.util.Deque; import java.util.Map; import java.util.UUID; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.provenance.OpHistory; - /** * A basic interface for storing and accessing Hints. The general structure for a Hint is *

diff --git a/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpBuilder.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpBuilder.java new file mode 100644 index 000000000..692b5a9e8 --- /dev/null +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpBuilder.java @@ -0,0 +1,11078 @@ +/* + * #%L + * SciJava Operations: a framework for reusable algorithms. + * %% + * Copyright (C) 2016 - 2019 SciJava Ops developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +/* +* This is autogenerated source code -- DO NOT EDIT. Instead, edit the +* corresponding template in templates/ and rerun bin/generate.groovy. +*/ + +package org.scijava.ops.api; + +import java.lang.reflect.Type; +import java.util.function.BiFunction; +import java.util.function.Function; + +import org.scijava.function.Computers; +import org.scijava.function.Functions; +import org.scijava.function.Inplaces; +import org.scijava.function.Producer; +import org.scijava.types.Nil; +import org.scijava.types.Types; + +/** + * Convenience class for looking up and/or executing ops using a builder + * pattern. + *

+ * TODO: Examples + *

+ * + * @author Curtis Rueden + * @author Gabriel Selzer + */ +public class OpBuilder { + + private final OpEnvironment env; + private final String opName; + + public OpBuilder(final OpEnvironment env, final String opName) { + this.env = env; + this.opName = opName; + } + + /** Specifies the op accepts no inputs—i.e., a nullary op. */ + public Arity0_OU input() { + return new Arity0_OU(); + } + + /** Specifies 1 input by value. */ + public Arity1_IV_OU input(final I1 in1) + { + return new Arity1_IV_OU<>(in1); + } + + /** Specifies 1 input by raw type. */ + public Arity1_IT_OU inType(final Class in1Class) + { + return inType(Nil.of(in1Class)); + } + + /** Specifies 1 input by generic type. */ + public Arity1_IT_OU inType(final Nil in1Type) + { + return new Arity1_IT_OU<>(in1Type); + } + + /** Specifies 2 input by value. */ + public Arity2_IV_OU input(final I1 in1, final I2 in2) + { + return new Arity2_IV_OU<>(in1, in2); + } + + /** Specifies 2 input by raw type. */ + public Arity2_IT_OU inType(final Class in1Class, final Class in2Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class)); + } + + /** Specifies 2 input by generic type. */ + public Arity2_IT_OU inType(final Nil in1Type, final Nil in2Type) + { + return new Arity2_IT_OU<>(in1Type, in2Type); + } + + /** Specifies 3 input by value. */ + public Arity3_IV_OU input(final I1 in1, final I2 in2, final I3 in3) + { + return new Arity3_IV_OU<>(in1, in2, in3); + } + + /** Specifies 3 input by raw type. */ + public Arity3_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class)); + } + + /** Specifies 3 input by generic type. */ + public Arity3_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type) + { + return new Arity3_IT_OU<>(in1Type, in2Type, in3Type); + } + + /** Specifies 4 input by value. */ + public Arity4_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4) + { + return new Arity4_IV_OU<>(in1, in2, in3, in4); + } + + /** Specifies 4 input by raw type. */ + public Arity4_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class)); + } + + /** Specifies 4 input by generic type. */ + public Arity4_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type) + { + return new Arity4_IT_OU<>(in1Type, in2Type, in3Type, in4Type); + } + + /** Specifies 5 input by value. */ + public Arity5_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5) + { + return new Arity5_IV_OU<>(in1, in2, in3, in4, in5); + } + + /** Specifies 5 input by raw type. */ + public Arity5_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class)); + } + + /** Specifies 5 input by generic type. */ + public Arity5_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type) + { + return new Arity5_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type); + } + + /** Specifies 6 input by value. */ + public Arity6_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6) + { + return new Arity6_IV_OU<>(in1, in2, in3, in4, in5, in6); + } + + /** Specifies 6 input by raw type. */ + public Arity6_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class)); + } + + /** Specifies 6 input by generic type. */ + public Arity6_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) + { + return new Arity6_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + /** Specifies 7 input by value. */ + public Arity7_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7) + { + return new Arity7_IV_OU<>(in1, in2, in3, in4, in5, in6, in7); + } + + /** Specifies 7 input by raw type. */ + public Arity7_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class)); + } + + /** Specifies 7 input by generic type. */ + public Arity7_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) + { + return new Arity7_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + /** Specifies 8 input by value. */ + public Arity8_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8) + { + return new Arity8_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8); + } + + /** Specifies 8 input by raw type. */ + public Arity8_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class)); + } + + /** Specifies 8 input by generic type. */ + public Arity8_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + return new Arity8_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + /** Specifies 9 input by value. */ + public Arity9_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9) + { + return new Arity9_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + /** Specifies 9 input by raw type. */ + public Arity9_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class)); + } + + /** Specifies 9 input by generic type. */ + public Arity9_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return new Arity9_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + /** Specifies 10 input by value. */ + public Arity10_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10) + { + return new Arity10_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + /** Specifies 10 input by raw type. */ + public Arity10_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class)); + } + + /** Specifies 10 input by generic type. */ + public Arity10_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return new Arity10_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + /** Specifies 11 input by value. */ + public Arity11_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11) + { + return new Arity11_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + /** Specifies 11 input by raw type. */ + public Arity11_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class)); + } + + /** Specifies 11 input by generic type. */ + public Arity11_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return new Arity11_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + /** Specifies 12 input by value. */ + public Arity12_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12) + { + return new Arity12_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + /** Specifies 12 input by raw type. */ + public Arity12_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class)); + } + + /** Specifies 12 input by generic type. */ + public Arity12_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return new Arity12_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + /** Specifies 13 input by value. */ + public Arity13_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13) + { + return new Arity13_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + /** Specifies 13 input by raw type. */ + public Arity13_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class)); + } + + /** Specifies 13 input by generic type. */ + public Arity13_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return new Arity13_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + /** Specifies 14 input by value. */ + public Arity14_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14) + { + return new Arity14_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + /** Specifies 14 input by raw type. */ + public Arity14_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class, final Class in14Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class), Nil.of(in14Class)); + } + + /** Specifies 14 input by generic type. */ + public Arity14_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return new Arity14_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + /** Specifies 15 input by value. */ + public Arity15_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15) + { + return new Arity15_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + /** Specifies 15 input by raw type. */ + public Arity15_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class, final Class in14Class, final Class in15Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class), Nil.of(in14Class), Nil.of(in15Class)); + } + + /** Specifies 15 input by generic type. */ + public Arity15_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return new Arity15_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + /** Specifies 16 input by value. */ + public Arity16_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16) + { + return new Arity16_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + /** Specifies 16 input by raw type. */ + public Arity16_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class, final Class in14Class, final Class in15Class, final Class in16Class) + { + return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class), Nil.of(in14Class), Nil.of(in15Class), Nil.of(in16Class)); + } + + /** Specifies 16 input by generic type. */ + public Arity16_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return new Arity16_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + // -- Helper methods -- + + @SuppressWarnings({ "unchecked" }) + private Nil type(Object obj) { + // FIXME: This vacuous T and unsafe cast is wrong. + return (Nil) Nil.of(env.genericType(obj)); + } + + private void checkComputerRefs(Object... objects) { + checkRefs(objects.length - 1, "Output", objects); + } + + private void checkInplaceRefs(int inplaceNo, Object... objects) { + checkRefs(inplaceNo - 1, "Mutable input " + inplaceNo, objects); + } + + private void checkRefs(int mutableIndex, String label, Object... objects) { + for (int i = 0; i < objects.length; i++) { + if (i == mutableIndex) continue; + if (objects[mutableIndex] == objects[i]) { + throw new IllegalArgumentException(label + + " cannot be same reference as input #" + (i + 1)); + } + } + } + + // @formatter:off + /* + * -- HELPER CLASSES -- + * + * For each arity, there are multiple conditions: + * * Input TYPES are given (IT) + * 1) The output is unspecified (OU): + * a) matchable: Function, Inplace + * b) runnable: none + * 2) The output type is given (OT): + * a) matchable: Function, Computer + * b) runnable: none + * + * * Input VALUES are given (IV) (N.B. this case applies for Arity0): + * 1) The output is unspecified (OU): + * a) matchable: Function, Inplace + * b) runnable: apply, mutate + * 2) The output type is given (OT): + * a) matchable: Function, Computer + * b) runnable: apply + * 3) The output value is given (OV): + * a) matchable: Computer + * b) runnable: compute + */ + // @formatter:on + + /** + * Builder with arity 0, output unspecified. + * + * @author Curtis Rueden + */ + public final class Arity0_OU { + + public Arity0_OV output(final O out) { + return new Arity0_OV<>(out); + } + + public Arity0_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity0_OT outType(final Nil outType) { + return new Arity0_OT<>(outType); + } + + public Producer producer() { + final Nil> specialType = new Nil<>() { + + @Override + public Type getType() { + return Types.parameterize(Producer.class, new Type[] { + Object.class }); + } + }; + return env.op(opName, specialType, new Nil[0], Nil.of( + Object.class)); + } + + public Producer producer(final Hints hints) { + final Nil> specialType = new Nil<>() { + + @Override + public Type getType() { + return Types.parameterize(Producer.class, new Type[] { + Object.class }); + } + }; + return env.op(opName, specialType, new Nil[0], Nil.of( + Object.class, hints)); + } + + public Object create() { + return producer().create(); + } + + public Object create(final Hints hints) { + return producer(hints).create(); + } + } + + /** + * Builder with arity 0, output type given. + * + * @author Curtis Rueden + * @param The type of the output. + */ + public final class Arity0_OT { + + private final Nil outType; + + public Arity0_OT(final Nil outType) { + this.outType = outType; + } + + public Producer producer() { + final Nil> specialType = new Nil<>() { + + @Override + public Type getType() { + return Types.parameterize(Producer.class, new Type[] { outType + .getType() }); + } + }; + return env.op(opName, specialType, new Nil[0], outType); + } + + public Producer producer(final Hints hints) { + final Nil> specialType = new Nil<>() { + + @Override + public Type getType() { + return Types.parameterize(Producer.class, new Type[] { outType + .getType() }); + } + }; + return env.op(opName, specialType, new Nil[0], outType, hints); + } + + public Computers.Arity0 computer() { + return matchComputer(env, opName, outType); + } + + public O create() { + return producer().create(); + } + + public Computers.Arity0 computer(Hints hints) { + return matchComputer(env, opName, outType, hints); + } + + public O create(Hints hints) { + return producer(hints).create(); + } + + } + + /** + * Builder with arity 0, output value given. + * + * @author Curtis Rueden + * @param The type of the output. + */ + public final class Arity0_OV { + + private final O out; + + public Arity0_OV(final O out) { + this.out = out; + } + + public Computers.Arity0 computer() { + return matchComputer(env, opName, type(out)); + } + + public void compute() { + computer().compute(out); + } + + public Computers.Arity0 computer(final Hints hints) { + return matchComputer(env, opName, type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(out); + } + + } + + /** + * Builder with arity 1, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of the output. + */ + public final class Arity1_IT_OT { + + private final Nil in1Type; + private final Nil outType; + + public Arity1_IT_OT(final Nil in1Type, final Nil outType) + { + this.in1Type = in1Type; + this.outType = outType; + } + + public Function function() { + return matchFunction(env, opName, in1Type, outType); + } + + public Function function(final Hints hints) { + return matchFunction(env, opName, in1Type, outType, hints); + } + + public Computers.Arity1 computer() { + return matchComputer(env, opName, in1Type, outType); + } + + public Computers.Arity1 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, outType, hints); + } + + public Inplaces.Arity1 inplace() { + return matchInplace(env, opName, in1Type); + } + + } + + /** + * Builder with arity 1, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + */ + public final class Arity1_IT_OU { + + private final Nil in1Type; + + public Arity1_IT_OU(final Nil in1Type) + { + this.in1Type = in1Type; + } + + public Arity1_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity1_IT_OT outType(final Nil outType) { + return new Arity1_IT_OT<>(in1Type, outType); + } + + public Function function() { + return matchFunction(env, opName, in1Type, Nil.of(Object.class)); + } + + public Function function(final Hints hints) { + return matchFunction(env, opName, in1Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity1 inplace() { + return matchInplace(env, opName, in1Type); + } + + } + + /** + * Builder with arity 1, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of the output. + */ + public final class Arity1_IV_OT { + + private final I1 in1; + private final Nil outType; + + public Arity1_IV_OT(final I1 in1, final Nil outType) + { + this.in1 = in1; + this.outType = outType; + } + + public Function function() { + return matchFunction(env, opName, type(in1), outType); + } + + public Function function(final Hints hints) { + return matchFunction(env, opName, type(in1), outType, hints); + } + + public Computers.Arity1 computer() { + return matchComputer(env, opName, type(in1), outType); + } + + public Computers.Arity1 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), outType, hints); + } + + public O apply() { + return function().apply(in1); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1); + } + } + + /** + * Builder with arity 1, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + */ + public final class Arity1_IV_OU { + + private final I1 in1; + + public Arity1_IV_OU(final I1 in1) + { + this.in1 = in1; + } + + public Arity1_IV_OV output(final O out) { + checkComputerRefs(in1, out); + return new Arity1_IV_OV<>(in1, out); + } + + public Arity1_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity1_IV_OT outType(final Nil outType) { + return new Arity1_IV_OT<>(in1, outType); + } + + public Function function() { + return matchFunction(env, opName, type(in1), Nil.of(Object.class)); + } + + public Function function(final Hints hints) { + return matchFunction(env, opName, type(in1), Nil.of(Object.class), hints); + } + + public Inplaces.Arity1 inplace() { + checkInplaceRefs(1, in1); + return matchInplace(env, opName, type(in1)); + } + + public Inplaces.Arity1 inplace(final Hints hints) { + checkInplaceRefs(1, in1); + return matchInplace(env, opName, type(in1), hints); + } + + public Object apply() { + return function().apply(in1); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1); + } + + public void mutate() { + inplace().mutate(in1); + } + + public void mutate(final Hints hints) { + inplace(hints).mutate(in1); + } + + } + + /** + * Builder with arity 1, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + */ + public final class Arity1_IV_OV { + + private final I1 in1; + private final O out; + + public Arity1_IV_OV(final I1 in1, final O out) + { + this.in1 = in1; + this.out = out; + } + + public Computers.Arity1 computer() { + return matchComputer(env, opName, type(in1), type(out)); + } + + public void compute() { + computer().compute(in1, out); + } + + public Computers.Arity1 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, out); + } + + } + /** + * Builder with arity 2, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of the output. + */ + public final class Arity2_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil outType; + + public Arity2_IT_OT(final Nil in1Type, final Nil in2Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.outType = outType; + } + + public BiFunction function() { + return matchFunction(env, opName, in1Type, in2Type, outType); + } + + public BiFunction function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, outType, hints); + } + + public Computers.Arity2 computer() { + return matchComputer(env, opName, in1Type, in2Type, outType); + } + + public Computers.Arity2 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, outType, hints); + } + + public Inplaces.Arity2_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type); + } + + public Inplaces.Arity2_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type); + } + + } + + /** + * Builder with arity 2, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + */ + public final class Arity2_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + + public Arity2_IT_OU(final Nil in1Type, final Nil in2Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + } + + public Arity2_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity2_IT_OT outType(final Nil outType) { + return new Arity2_IT_OT<>(in1Type, in2Type, outType); + } + + public BiFunction function() { + return matchFunction(env, opName, in1Type, in2Type, Nil.of(Object.class)); + } + + public BiFunction function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity2_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type); + } + + public Inplaces.Arity2_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type); + } + + } + + /** + * Builder with arity 2, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of the output. + */ + public final class Arity2_IV_OT { + + private final I1 in1; + private final I2 in2; + private final Nil outType; + + public Arity2_IV_OT(final I1 in1, final I2 in2, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.outType = outType; + } + + public BiFunction function() { + return matchFunction(env, opName, type(in1), type(in2), outType); + } + + public BiFunction function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), outType, hints); + } + + public Computers.Arity2 computer() { + return matchComputer(env, opName, type(in1), type(in2), outType); + } + + public Computers.Arity2 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), outType, hints); + } + + public O apply() { + return function().apply(in1, in2); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2); + } + } + + /** + * Builder with arity 2, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + */ + public final class Arity2_IV_OU { + + private final I1 in1; + private final I2 in2; + + public Arity2_IV_OU(final I1 in1, final I2 in2) + { + this.in1 = in1; + this.in2 = in2; + } + + public Arity2_IV_OV output(final O out) { + checkComputerRefs(in1, in2, out); + return new Arity2_IV_OV<>(in1, in2, out); + } + + public Arity2_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity2_IV_OT outType(final Nil outType) { + return new Arity2_IV_OT<>(in1, in2, outType); + } + + public BiFunction function() { + return matchFunction(env, opName, type(in1), type(in2), Nil.of(Object.class)); + } + + public BiFunction function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), Nil.of(Object.class), hints); + } + + public Inplaces.Arity2_1 inplace1() { + checkInplaceRefs(1, in1, in2); + return matchInplace1(env, opName, type(in1), type(in2)); + } + + public Inplaces.Arity2_2 inplace2() { + checkInplaceRefs(2, in1, in2); + return matchInplace2(env, opName, type(in1), type(in2)); + } + + public Inplaces.Arity2_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2); + return matchInplace1(env, opName, type(in1), type(in2), hints); + } + + public Inplaces.Arity2_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2); + return matchInplace2(env, opName, type(in1), type(in2), hints); + } + + public Object apply() { + return function().apply(in1, in2); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2); + } + + public void mutate1() { + inplace1().mutate(in1, in2); + } + + public void mutate2() { + inplace2().mutate(in1, in2); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2); + } + + } + + /** + * Builder with arity 2, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + */ + public final class Arity2_IV_OV { + + private final I1 in1; + private final I2 in2; + private final O out; + + public Arity2_IV_OV(final I1 in1, final I2 in2, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.out = out; + } + + public Computers.Arity2 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(out)); + } + + public void compute() { + computer().compute(in1, in2, out); + } + + public Computers.Arity2 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, out); + } + + } + /** + * Builder with arity 3, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of the output. + */ + public final class Arity3_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil outType; + + public Arity3_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.outType = outType; + } + + public Functions.Arity3 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, outType); + } + + public Functions.Arity3 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, outType, hints); + } + + public Computers.Arity3 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, outType); + } + + public Computers.Arity3 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, outType, hints); + } + + public Inplaces.Arity3_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type); + } + + public Inplaces.Arity3_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type); + } + + public Inplaces.Arity3_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type); + } + + } + + /** + * Builder with arity 3, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + */ + public final class Arity3_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + + public Arity3_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + } + + public Arity3_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity3_IT_OT outType(final Nil outType) { + return new Arity3_IT_OT<>(in1Type, in2Type, in3Type, outType); + } + + public Functions.Arity3 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, Nil.of(Object.class)); + } + + public Functions.Arity3 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity3_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type); + } + + public Inplaces.Arity3_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type); + } + + public Inplaces.Arity3_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type); + } + + } + + /** + * Builder with arity 3, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of the output. + */ + public final class Arity3_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final Nil outType; + + public Arity3_IV_OT(final I1 in1, final I2 in2, final I3 in3, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.outType = outType; + } + + public Functions.Arity3 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), outType); + } + + public Functions.Arity3 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), outType, hints); + } + + public Computers.Arity3 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), outType); + } + + public Computers.Arity3 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3); + } + } + + /** + * Builder with arity 3, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + */ + public final class Arity3_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + + public Arity3_IV_OU(final I1 in1, final I2 in2, final I3 in3) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + } + + public Arity3_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, out); + return new Arity3_IV_OV<>(in1, in2, in3, out); + } + + public Arity3_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity3_IV_OT outType(final Nil outType) { + return new Arity3_IV_OT<>(in1, in2, in3, outType); + } + + public Functions.Arity3 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), Nil.of(Object.class)); + } + + public Functions.Arity3 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), Nil.of(Object.class), hints); + } + + public Inplaces.Arity3_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3); + return matchInplace1(env, opName, type(in1), type(in2), type(in3)); + } + + public Inplaces.Arity3_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3); + return matchInplace2(env, opName, type(in1), type(in2), type(in3)); + } + + public Inplaces.Arity3_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3); + return matchInplace3(env, opName, type(in1), type(in2), type(in3)); + } + + public Inplaces.Arity3_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), hints); + } + + public Inplaces.Arity3_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), hints); + } + + public Inplaces.Arity3_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3); + } + + } + + /** + * Builder with arity 3, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + */ + public final class Arity3_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final O out; + + public Arity3_IV_OV(final I1 in1, final I2 in2, final I3 in3, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.out = out; + } + + public Computers.Arity3 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, out); + } + + public Computers.Arity3 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, out); + } + + } + /** + * Builder with arity 4, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of the output. + */ + public final class Arity4_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil outType; + + public Arity4_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.outType = outType; + } + + public Functions.Arity4 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, outType); + } + + public Functions.Arity4 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, outType, hints); + } + + public Computers.Arity4 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, outType); + } + + public Computers.Arity4 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, outType, hints); + } + + public Inplaces.Arity4_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + public Inplaces.Arity4_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + public Inplaces.Arity4_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + public Inplaces.Arity4_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + } + + /** + * Builder with arity 4, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + */ + public final class Arity4_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + + public Arity4_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + } + + public Arity4_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity4_IT_OT outType(final Nil outType) { + return new Arity4_IT_OT<>(in1Type, in2Type, in3Type, in4Type, outType); + } + + public Functions.Arity4 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, Nil.of(Object.class)); + } + + public Functions.Arity4 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity4_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + public Inplaces.Arity4_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + public Inplaces.Arity4_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + public Inplaces.Arity4_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type); + } + + } + + /** + * Builder with arity 4, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of the output. + */ + public final class Arity4_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final Nil outType; + + public Arity4_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.outType = outType; + } + + public Functions.Arity4 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), outType); + } + + public Functions.Arity4 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), outType, hints); + } + + public Computers.Arity4 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), outType); + } + + public Computers.Arity4 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4); + } + } + + /** + * Builder with arity 4, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + */ + public final class Arity4_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + + public Arity4_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + } + + public Arity4_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, out); + return new Arity4_IV_OV<>(in1, in2, in3, in4, out); + } + + public Arity4_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity4_IV_OT outType(final Nil outType) { + return new Arity4_IV_OT<>(in1, in2, in3, in4, outType); + } + + public Functions.Arity4 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), Nil.of(Object.class)); + } + + public Functions.Arity4 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), Nil.of(Object.class), hints); + } + + public Inplaces.Arity4_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4)); + } + + public Inplaces.Arity4_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4)); + } + + public Inplaces.Arity4_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4)); + } + + public Inplaces.Arity4_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4)); + } + + public Inplaces.Arity4_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), hints); + } + + public Inplaces.Arity4_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), hints); + } + + public Inplaces.Arity4_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), hints); + } + + public Inplaces.Arity4_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4); + } + + } + + /** + * Builder with arity 4, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + */ + public final class Arity4_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final O out; + + public Arity4_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.out = out; + } + + public Computers.Arity4 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, out); + } + + public Computers.Arity4 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, out); + } + + } + /** + * Builder with arity 5, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of the output. + */ + public final class Arity5_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil outType; + + public Arity5_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.outType = outType; + } + + public Functions.Arity5 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType); + } + + public Functions.Arity5 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType, hints); + } + + public Computers.Arity5 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType); + } + + public Computers.Arity5 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType, hints); + } + + public Inplaces.Arity5_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + } + + /** + * Builder with arity 5, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + */ + public final class Arity5_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + + public Arity5_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + } + + public Arity5_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity5_IT_OT outType(final Nil outType) { + return new Arity5_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, outType); + } + + public Functions.Arity5 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, Nil.of(Object.class)); + } + + public Functions.Arity5 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity5_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + public Inplaces.Arity5_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + } + + /** + * Builder with arity 5, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of the output. + */ + public final class Arity5_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final Nil outType; + + public Arity5_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.outType = outType; + } + + public Functions.Arity5 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType); + } + + public Functions.Arity5 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType, hints); + } + + public Computers.Arity5 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType); + } + + public Computers.Arity5 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5); + } + } + + /** + * Builder with arity 5, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + */ + public final class Arity5_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + + public Arity5_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + } + + public Arity5_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, out); + return new Arity5_IV_OV<>(in1, in2, in3, in4, in5, out); + } + + public Arity5_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity5_IV_OT outType(final Nil outType) { + return new Arity5_IV_OT<>(in1, in2, in3, in4, in5, outType); + } + + public Functions.Arity5 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), Nil.of(Object.class)); + } + + public Functions.Arity5 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), Nil.of(Object.class), hints); + } + + public Inplaces.Arity5_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); + } + + public Inplaces.Arity5_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); + } + + public Inplaces.Arity5_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); + } + + public Inplaces.Arity5_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); + } + + public Inplaces.Arity5_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); + } + + public Inplaces.Arity5_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); + } + + public Inplaces.Arity5_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); + } + + public Inplaces.Arity5_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); + } + + public Inplaces.Arity5_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); + } + + public Inplaces.Arity5_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5); + } + + } + + /** + * Builder with arity 5, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + */ + public final class Arity5_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final O out; + + public Arity5_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.out = out; + } + + public Computers.Arity5 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, out); + } + + public Computers.Arity5 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, out); + } + + } + /** + * Builder with arity 6, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of the output. + */ + public final class Arity6_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil outType; + + public Arity6_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.outType = outType; + } + + public Functions.Arity6 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType); + } + + public Functions.Arity6 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType, hints); + } + + public Computers.Arity6 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType); + } + + public Computers.Arity6 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType, hints); + } + + public Inplaces.Arity6_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + } + + /** + * Builder with arity 6, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + */ + public final class Arity6_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + + public Arity6_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + } + + public Arity6_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity6_IT_OT outType(final Nil outType) { + return new Arity6_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType); + } + + public Functions.Arity6 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, Nil.of(Object.class)); + } + + public Functions.Arity6 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity6_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + public Inplaces.Arity6_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + } + + /** + * Builder with arity 6, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of the output. + */ + public final class Arity6_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final Nil outType; + + public Arity6_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.outType = outType; + } + + public Functions.Arity6 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType); + } + + public Functions.Arity6 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType, hints); + } + + public Computers.Arity6 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType); + } + + public Computers.Arity6 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6); + } + } + + /** + * Builder with arity 6, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + */ + public final class Arity6_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + + public Arity6_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + } + + public Arity6_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, out); + return new Arity6_IV_OV<>(in1, in2, in3, in4, in5, in6, out); + } + + public Arity6_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity6_IV_OT outType(final Nil outType) { + return new Arity6_IV_OT<>(in1, in2, in3, in4, in5, in6, outType); + } + + public Functions.Arity6 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), Nil.of(Object.class)); + } + + public Functions.Arity6 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), Nil.of(Object.class), hints); + } + + public Inplaces.Arity6_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); + } + + public Inplaces.Arity6_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); + } + + public Inplaces.Arity6_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); + } + + public Inplaces.Arity6_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); + } + + public Inplaces.Arity6_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); + } + + public Inplaces.Arity6_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); + } + + public Inplaces.Arity6_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); + } + + public Inplaces.Arity6_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); + } + + public Inplaces.Arity6_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); + } + + public Inplaces.Arity6_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); + } + + public Inplaces.Arity6_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); + } + + public Inplaces.Arity6_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6); + } + + } + + /** + * Builder with arity 6, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + */ + public final class Arity6_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final O out; + + public Arity6_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.out = out; + } + + public Computers.Arity6 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, out); + } + + public Computers.Arity6 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, out); + } + + } + /** + * Builder with arity 7, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of the output. + */ + public final class Arity7_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil outType; + + public Arity7_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.outType = outType; + } + + public Functions.Arity7 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType); + } + + public Functions.Arity7 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType, hints); + } + + public Computers.Arity7 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType); + } + + public Computers.Arity7 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType, hints); + } + + public Inplaces.Arity7_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + } + + /** + * Builder with arity 7, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + */ + public final class Arity7_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + + public Arity7_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + } + + public Arity7_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity7_IT_OT outType(final Nil outType) { + return new Arity7_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType); + } + + public Functions.Arity7 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, Nil.of(Object.class)); + } + + public Functions.Arity7 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity7_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + public Inplaces.Arity7_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + } + + /** + * Builder with arity 7, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of the output. + */ + public final class Arity7_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final Nil outType; + + public Arity7_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.outType = outType; + } + + public Functions.Arity7 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType); + } + + public Functions.Arity7 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType, hints); + } + + public Computers.Arity7 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType); + } + + public Computers.Arity7 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7); + } + } + + /** + * Builder with arity 7, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + */ + public final class Arity7_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + + public Arity7_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + } + + public Arity7_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, out); + return new Arity7_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, out); + } + + public Arity7_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity7_IV_OT outType(final Nil outType) { + return new Arity7_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, outType); + } + + public Functions.Arity7 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), Nil.of(Object.class)); + } + + public Functions.Arity7 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), Nil.of(Object.class), hints); + } + + public Inplaces.Arity7_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); + } + + public Inplaces.Arity7_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Inplaces.Arity7_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Inplaces.Arity7_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Inplaces.Arity7_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Inplaces.Arity7_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Inplaces.Arity7_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Inplaces.Arity7_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7); + } + + } + + /** + * Builder with arity 7, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + */ + public final class Arity7_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final O out; + + public Arity7_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.out = out; + } + + public Computers.Arity7 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, out); + } + + public Computers.Arity7 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, out); + } + + } + /** + * Builder with arity 8, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of the output. + */ + public final class Arity8_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil outType; + + public Arity8_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.outType = outType; + } + + public Functions.Arity8 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType); + } + + public Functions.Arity8 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType, hints); + } + + public Computers.Arity8 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType); + } + + public Computers.Arity8 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType, hints); + } + + public Inplaces.Arity8_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + } + + /** + * Builder with arity 8, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + */ + public final class Arity8_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + + public Arity8_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + } + + public Arity8_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity8_IT_OT outType(final Nil outType) { + return new Arity8_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType); + } + + public Functions.Arity8 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, Nil.of(Object.class)); + } + + public Functions.Arity8 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity8_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + public Inplaces.Arity8_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + } + + /** + * Builder with arity 8, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of the output. + */ + public final class Arity8_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final Nil outType; + + public Arity8_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.outType = outType; + } + + public Functions.Arity8 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType); + } + + public Functions.Arity8 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType, hints); + } + + public Computers.Arity8 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType); + } + + public Computers.Arity8 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8); + } + } + + /** + * Builder with arity 8, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + */ + public final class Arity8_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + + public Arity8_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + } + + public Arity8_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, out); + return new Arity8_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, out); + } + + public Arity8_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity8_IV_OT outType(final Nil outType) { + return new Arity8_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, outType); + } + + public Functions.Arity8 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), Nil.of(Object.class)); + } + + public Functions.Arity8 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), Nil.of(Object.class), hints); + } + + public Inplaces.Arity8_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); + } + + public Inplaces.Arity8_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Inplaces.Arity8_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); + } + + } + + /** + * Builder with arity 8, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + */ + public final class Arity8_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final O out; + + public Arity8_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.out = out; + } + + public Computers.Arity8 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, out); + } + + public Computers.Arity8 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, out); + } + + } + /** + * Builder with arity 9, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of the output. + */ + public final class Arity9_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil outType; + + public Arity9_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.outType = outType; + } + + public Functions.Arity9 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType); + } + + public Functions.Arity9 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType, hints); + } + + public Computers.Arity9 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType); + } + + public Computers.Arity9 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType, hints); + } + + public Inplaces.Arity9_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + } + + /** + * Builder with arity 9, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + */ + public final class Arity9_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + + public Arity9_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + } + + public Arity9_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity9_IT_OT outType(final Nil outType) { + return new Arity9_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType); + } + + public Functions.Arity9 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, Nil.of(Object.class)); + } + + public Functions.Arity9 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity9_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + public Inplaces.Arity9_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + } + + /** + * Builder with arity 9, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of the output. + */ + public final class Arity9_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final Nil outType; + + public Arity9_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.outType = outType; + } + + public Functions.Arity9 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType); + } + + public Functions.Arity9 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType, hints); + } + + public Computers.Arity9 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType); + } + + public Computers.Arity9 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + } + + /** + * Builder with arity 9, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + */ + public final class Arity9_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + + public Arity9_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + } + + public Arity9_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); + return new Arity9_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); + } + + public Arity9_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity9_IV_OT outType(final Nil outType) { + return new Arity9_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, outType); + } + + public Functions.Arity9 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), Nil.of(Object.class)); + } + + public Functions.Arity9 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), Nil.of(Object.class), hints); + } + + public Inplaces.Arity9_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); + } + + public Inplaces.Arity9_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Inplaces.Arity9_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); + } + + } + + /** + * Builder with arity 9, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + */ + public final class Arity9_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final O out; + + public Arity9_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.out = out; + } + + public Computers.Arity9 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); + } + + public Computers.Arity9 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); + } + + } + /** + * Builder with arity 10, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of the output. + */ + public final class Arity10_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil outType; + + public Arity10_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.outType = outType; + } + + public Functions.Arity10 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType); + } + + public Functions.Arity10 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType, hints); + } + + public Computers.Arity10 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType); + } + + public Computers.Arity10 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType, hints); + } + + public Inplaces.Arity10_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + } + + /** + * Builder with arity 10, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + */ + public final class Arity10_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + + public Arity10_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + } + + public Arity10_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity10_IT_OT outType(final Nil outType) { + return new Arity10_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType); + } + + public Functions.Arity10 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, Nil.of(Object.class)); + } + + public Functions.Arity10 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity10_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + public Inplaces.Arity10_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + } + + /** + * Builder with arity 10, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of the output. + */ + public final class Arity10_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final Nil outType; + + public Arity10_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.outType = outType; + } + + public Functions.Arity10 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType); + } + + public Functions.Arity10 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType, hints); + } + + public Computers.Arity10 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType); + } + + public Computers.Arity10 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + } + + /** + * Builder with arity 10, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + */ + public final class Arity10_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + + public Arity10_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + } + + public Arity10_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); + return new Arity10_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); + } + + public Arity10_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity10_IV_OT outType(final Nil outType) { + return new Arity10_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, outType); + } + + public Functions.Arity10 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), Nil.of(Object.class)); + } + + public Functions.Arity10 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), Nil.of(Object.class), hints); + } + + public Inplaces.Arity10_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); + } + + public Inplaces.Arity10_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Inplaces.Arity10_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); + } + + } + + /** + * Builder with arity 10, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + */ + public final class Arity10_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final O out; + + public Arity10_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.out = out; + } + + public Computers.Arity10 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); + } + + public Computers.Arity10 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); + } + + } + /** + * Builder with arity 11, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of the output. + */ + public final class Arity11_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil outType; + + public Arity11_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.outType = outType; + } + + public Functions.Arity11 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType); + } + + public Functions.Arity11 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType, hints); + } + + public Computers.Arity11 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType); + } + + public Computers.Arity11 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType, hints); + } + + public Inplaces.Arity11_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + } + + /** + * Builder with arity 11, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + */ + public final class Arity11_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + + public Arity11_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + } + + public Arity11_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity11_IT_OT outType(final Nil outType) { + return new Arity11_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType); + } + + public Functions.Arity11 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, Nil.of(Object.class)); + } + + public Functions.Arity11 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity11_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + public Inplaces.Arity11_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + } + + /** + * Builder with arity 11, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of the output. + */ + public final class Arity11_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final Nil outType; + + public Arity11_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.outType = outType; + } + + public Functions.Arity11 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType); + } + + public Functions.Arity11 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType, hints); + } + + public Computers.Arity11 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType); + } + + public Computers.Arity11 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + } + + /** + * Builder with arity 11, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + */ + public final class Arity11_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + + public Arity11_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + } + + public Arity11_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); + return new Arity11_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); + } + + public Arity11_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity11_IV_OT outType(final Nil outType) { + return new Arity11_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, outType); + } + + public Functions.Arity11 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), Nil.of(Object.class)); + } + + public Functions.Arity11 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), Nil.of(Object.class), hints); + } + + public Inplaces.Arity11_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_11 inplace11() { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); + } + + public Inplaces.Arity11_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Inplaces.Arity11_11 inplace11(final Hints hints) { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate11() { + inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + public void mutate11(final Hints hints) { + inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); + } + + } + + /** + * Builder with arity 11, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + */ + public final class Arity11_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final O out; + + public Arity11_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.out = out; + } + + public Computers.Arity11 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); + } + + public Computers.Arity11 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); + } + + } + /** + * Builder with arity 12, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of the output. + */ + public final class Arity12_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil outType; + + public Arity12_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.outType = outType; + } + + public Functions.Arity12 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType); + } + + public Functions.Arity12 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType, hints); + } + + public Computers.Arity12 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType); + } + + public Computers.Arity12 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType, hints); + } + + public Inplaces.Arity12_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + } + + /** + * Builder with arity 12, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + */ + public final class Arity12_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + + public Arity12_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + } + + public Arity12_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity12_IT_OT outType(final Nil outType) { + return new Arity12_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType); + } + + public Functions.Arity12 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, Nil.of(Object.class)); + } + + public Functions.Arity12 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity12_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + public Inplaces.Arity12_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + } + + /** + * Builder with arity 12, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of the output. + */ + public final class Arity12_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final Nil outType; + + public Arity12_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.outType = outType; + } + + public Functions.Arity12 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType); + } + + public Functions.Arity12 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType, hints); + } + + public Computers.Arity12 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType); + } + + public Computers.Arity12 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + } + + /** + * Builder with arity 12, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + */ + public final class Arity12_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + + public Arity12_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + } + + public Arity12_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); + return new Arity12_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); + } + + public Arity12_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity12_IV_OT outType(final Nil outType) { + return new Arity12_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, outType); + } + + public Functions.Arity12 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), Nil.of(Object.class)); + } + + public Functions.Arity12 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), Nil.of(Object.class), hints); + } + + public Inplaces.Arity12_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_11 inplace11() { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_12 inplace12() { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); + } + + public Inplaces.Arity12_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_11 inplace11(final Hints hints) { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Inplaces.Arity12_12 inplace12(final Hints hints) { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate11() { + inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate12() { + inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate11(final Hints hints) { + inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + public void mutate12(final Hints hints) { + inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); + } + + } + + /** + * Builder with arity 12, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + */ + public final class Arity12_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final O out; + + public Arity12_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.out = out; + } + + public Computers.Arity12 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); + } + + public Computers.Arity12 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); + } + + } + /** + * Builder with arity 13, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of the output. + */ + public final class Arity13_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil outType; + + public Arity13_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.outType = outType; + } + + public Functions.Arity13 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType); + } + + public Functions.Arity13 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType, hints); + } + + public Computers.Arity13 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType); + } + + public Computers.Arity13 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType, hints); + } + + public Inplaces.Arity13_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + } + + /** + * Builder with arity 13, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + */ + public final class Arity13_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + + public Arity13_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + } + + public Arity13_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity13_IT_OT outType(final Nil outType) { + return new Arity13_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType); + } + + public Functions.Arity13 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, Nil.of(Object.class)); + } + + public Functions.Arity13 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity13_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + public Inplaces.Arity13_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + } + + /** + * Builder with arity 13, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of the output. + */ + public final class Arity13_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final Nil outType; + + public Arity13_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.outType = outType; + } + + public Functions.Arity13 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType); + } + + public Functions.Arity13 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType, hints); + } + + public Computers.Arity13 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType); + } + + public Computers.Arity13 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + } + + /** + * Builder with arity 13, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + */ + public final class Arity13_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + + public Arity13_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + } + + public Arity13_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); + return new Arity13_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); + } + + public Arity13_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity13_IV_OT outType(final Nil outType) { + return new Arity13_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, outType); + } + + public Functions.Arity13 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), Nil.of(Object.class)); + } + + public Functions.Arity13 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), Nil.of(Object.class), hints); + } + + public Inplaces.Arity13_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_11 inplace11() { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_12 inplace12() { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_13 inplace13() { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); + } + + public Inplaces.Arity13_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_11 inplace11(final Hints hints) { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_12 inplace12(final Hints hints) { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Inplaces.Arity13_13 inplace13(final Hints hints) { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate11() { + inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate12() { + inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate13() { + inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate11(final Hints hints) { + inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate12(final Hints hints) { + inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + public void mutate13(final Hints hints) { + inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); + } + + } + + /** + * Builder with arity 13, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + */ + public final class Arity13_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final O out; + + public Arity13_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.out = out; + } + + public Computers.Arity13 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); + } + + public Computers.Arity13 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); + } + + } + /** + * Builder with arity 14, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of the output. + */ + public final class Arity14_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil in14Type; + private final Nil outType; + + public Arity14_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.in14Type = in14Type; + this.outType = outType; + } + + public Functions.Arity14 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType); + } + + public Functions.Arity14 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType, hints); + } + + public Computers.Arity14 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType); + } + + public Computers.Arity14 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType, hints); + } + + public Inplaces.Arity14_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_14 inplace14() { + return matchInplace14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + } + + /** + * Builder with arity 14, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + */ + public final class Arity14_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil in14Type; + + public Arity14_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.in14Type = in14Type; + } + + public Arity14_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity14_IT_OT outType(final Nil outType) { + return new Arity14_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType); + } + + public Functions.Arity14 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, Nil.of(Object.class)); + } + + public Functions.Arity14 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity14_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + public Inplaces.Arity14_14 inplace14() { + return matchInplace14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + } + + /** + * Builder with arity 14, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of the output. + */ + public final class Arity14_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final Nil outType; + + public Arity14_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.outType = outType; + } + + public Functions.Arity14 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType); + } + + public Functions.Arity14 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType, hints); + } + + public Computers.Arity14 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType); + } + + public Computers.Arity14 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + } + + /** + * Builder with arity 14, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + */ + public final class Arity14_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + + public Arity14_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + } + + public Arity14_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); + return new Arity14_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); + } + + public Arity14_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity14_IV_OT outType(final Nil outType) { + return new Arity14_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, outType); + } + + public Functions.Arity14 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), Nil.of(Object.class)); + } + + public Functions.Arity14 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), Nil.of(Object.class), hints); + } + + public Inplaces.Arity14_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_11 inplace11() { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_12 inplace12() { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_13 inplace13() { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_14 inplace14() { + checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); + } + + public Inplaces.Arity14_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_11 inplace11(final Hints hints) { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_12 inplace12(final Hints hints) { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_13 inplace13(final Hints hints) { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Inplaces.Arity14_14 inplace14(final Hints hints) { + checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + return matchInplace14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate11() { + inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate12() { + inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate13() { + inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate14() { + inplace14().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate11(final Hints hints) { + inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate12(final Hints hints) { + inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate13(final Hints hints) { + inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + public void mutate14(final Hints hints) { + inplace14(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); + } + + } + + /** + * Builder with arity 14, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + */ + public final class Arity14_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final O out; + + public Arity14_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.out = out; + } + + public Computers.Arity14 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); + } + + public Computers.Arity14 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); + } + + } + /** + * Builder with arity 15, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of the output. + */ + public final class Arity15_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil in14Type; + private final Nil in15Type; + private final Nil outType; + + public Arity15_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.in14Type = in14Type; + this.in15Type = in15Type; + this.outType = outType; + } + + public Functions.Arity15 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType); + } + + public Functions.Arity15 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType, hints); + } + + public Computers.Arity15 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType); + } + + public Computers.Arity15 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType, hints); + } + + public Inplaces.Arity15_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_14 inplace14() { + return matchInplace14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_15 inplace15() { + return matchInplace15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + } + + /** + * Builder with arity 15, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + */ + public final class Arity15_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil in14Type; + private final Nil in15Type; + + public Arity15_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.in14Type = in14Type; + this.in15Type = in15Type; + } + + public Arity15_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity15_IT_OT outType(final Nil outType) { + return new Arity15_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType); + } + + public Functions.Arity15 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, Nil.of(Object.class)); + } + + public Functions.Arity15 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity15_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_14 inplace14() { + return matchInplace14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + public Inplaces.Arity15_15 inplace15() { + return matchInplace15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + } + + /** + * Builder with arity 15, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of the output. + */ + public final class Arity15_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final I15 in15; + private final Nil outType; + + public Arity15_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.in15 = in15; + this.outType = outType; + } + + public Functions.Arity15 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType); + } + + public Functions.Arity15 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType, hints); + } + + public Computers.Arity15 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType); + } + + public Computers.Arity15 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + } + + /** + * Builder with arity 15, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + */ + public final class Arity15_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final I15 in15; + + public Arity15_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.in15 = in15; + } + + public Arity15_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); + return new Arity15_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); + } + + public Arity15_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity15_IV_OT outType(final Nil outType) { + return new Arity15_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, outType); + } + + public Functions.Arity15 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), Nil.of(Object.class)); + } + + public Functions.Arity15 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), Nil.of(Object.class), hints); + } + + public Inplaces.Arity15_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_11 inplace11() { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_12 inplace12() { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_13 inplace13() { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_14 inplace14() { + checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_15 inplace15() { + checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); + } + + public Inplaces.Arity15_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_11 inplace11(final Hints hints) { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_12 inplace12(final Hints hints) { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_13 inplace13(final Hints hints) { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_14 inplace14(final Hints hints) { + checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Inplaces.Arity15_15 inplace15(final Hints hints) { + checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + return matchInplace15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate11() { + inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate12() { + inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate13() { + inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate14() { + inplace14().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate15() { + inplace15().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate11(final Hints hints) { + inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate12(final Hints hints) { + inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate13(final Hints hints) { + inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate14(final Hints hints) { + inplace14(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + public void mutate15(final Hints hints) { + inplace15(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); + } + + } + + /** + * Builder with arity 15, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + */ + public final class Arity15_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final I15 in15; + private final O out; + + public Arity15_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.in15 = in15; + this.out = out; + } + + public Computers.Arity15 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); + } + + public Computers.Arity15 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); + } + + } + /** + * Builder with arity 16, input type given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of input 16. + * @param The type of the output. + */ + public final class Arity16_IT_OT { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil in14Type; + private final Nil in15Type; + private final Nil in16Type; + private final Nil outType; + + public Arity16_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.in14Type = in14Type; + this.in15Type = in15Type; + this.in16Type = in16Type; + this.outType = outType; + } + + public Functions.Arity16 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType); + } + + public Functions.Arity16 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType, hints); + } + + public Computers.Arity16 computer() { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType); + } + + public Computers.Arity16 computer(final Hints hints) { + return matchComputer(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType, hints); + } + + public Inplaces.Arity16_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_14 inplace14() { + return matchInplace14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_15 inplace15() { + return matchInplace15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_16 inplace16() { + return matchInplace16(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + } + + /** + * Builder with arity 16, input type given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of input 16. + */ + public final class Arity16_IT_OU { + + private final Nil in1Type; + private final Nil in2Type; + private final Nil in3Type; + private final Nil in4Type; + private final Nil in5Type; + private final Nil in6Type; + private final Nil in7Type; + private final Nil in8Type; + private final Nil in9Type; + private final Nil in10Type; + private final Nil in11Type; + private final Nil in12Type; + private final Nil in13Type; + private final Nil in14Type; + private final Nil in15Type; + private final Nil in16Type; + + public Arity16_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + this.in1Type = in1Type; + this.in2Type = in2Type; + this.in3Type = in3Type; + this.in4Type = in4Type; + this.in5Type = in5Type; + this.in6Type = in6Type; + this.in7Type = in7Type; + this.in8Type = in8Type; + this.in9Type = in9Type; + this.in10Type = in10Type; + this.in11Type = in11Type; + this.in12Type = in12Type; + this.in13Type = in13Type; + this.in14Type = in14Type; + this.in15Type = in15Type; + this.in16Type = in16Type; + } + + public Arity16_IT_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity16_IT_OT outType(final Nil outType) { + return new Arity16_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType); + } + + public Functions.Arity16 function() { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, Nil.of(Object.class)); + } + + public Functions.Arity16 function(final Hints hints) { + return matchFunction(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, Nil.of(Object.class), hints); + } + + public Inplaces.Arity16_1 inplace1() { + return matchInplace1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_2 inplace2() { + return matchInplace2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_3 inplace3() { + return matchInplace3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_4 inplace4() { + return matchInplace4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_5 inplace5() { + return matchInplace5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_6 inplace6() { + return matchInplace6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_7 inplace7() { + return matchInplace7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_8 inplace8() { + return matchInplace8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_9 inplace9() { + return matchInplace9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_10 inplace10() { + return matchInplace10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_11 inplace11() { + return matchInplace11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_12 inplace12() { + return matchInplace12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_13 inplace13() { + return matchInplace13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_14 inplace14() { + return matchInplace14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_15 inplace15() { + return matchInplace15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + public Inplaces.Arity16_16 inplace16() { + return matchInplace16(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + } + + /** + * Builder with arity 16, input value given, output type given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of input 16. + * @param The type of the output. + */ + public final class Arity16_IV_OT { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final I15 in15; + private final I16 in16; + private final Nil outType; + + public Arity16_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16, final Nil outType) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.in15 = in15; + this.in16 = in16; + this.outType = outType; + } + + public Functions.Arity16 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType); + } + + public Functions.Arity16 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType, hints); + } + + public Computers.Arity16 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType); + } + + public Computers.Arity16 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType, hints); + } + + public O apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public O apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + } + + /** + * Builder with arity 16, input value given, output unspecified. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of input 16. + */ + public final class Arity16_IV_OU { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final I15 in15; + private final I16 in16; + + public Arity16_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.in15 = in15; + this.in16 = in16; + } + + public Arity16_IV_OV output(final O out) { + checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); + return new Arity16_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); + } + + public Arity16_IV_OT outType(final Class outType) { + return outType(Nil.of(outType)); + } + + public Arity16_IV_OT outType(final Nil outType) { + return new Arity16_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, outType); + } + + public Functions.Arity16 function() { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), Nil.of(Object.class)); + } + + public Functions.Arity16 function(final Hints hints) { + return matchFunction(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), Nil.of(Object.class), hints); + } + + public Inplaces.Arity16_1 inplace1() { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_2 inplace2() { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_3 inplace3() { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_4 inplace4() { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_5 inplace5() { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_6 inplace6() { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_7 inplace7() { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_8 inplace8() { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_9 inplace9() { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_10 inplace10() { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_11 inplace11() { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_12 inplace12() { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_13 inplace13() { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_14 inplace14() { + checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_15 inplace15() { + checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_16 inplace16() { + checkInplaceRefs(16, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace16(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); + } + + public Inplaces.Arity16_1 inplace1(final Hints hints) { + checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_2 inplace2(final Hints hints) { + checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_3 inplace3(final Hints hints) { + checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_4 inplace4(final Hints hints) { + checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_5 inplace5(final Hints hints) { + checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_6 inplace6(final Hints hints) { + checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_7 inplace7(final Hints hints) { + checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_8 inplace8(final Hints hints) { + checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_9 inplace9(final Hints hints) { + checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_10 inplace10(final Hints hints) { + checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_11 inplace11(final Hints hints) { + checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_12 inplace12(final Hints hints) { + checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_13 inplace13(final Hints hints) { + checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_14 inplace14(final Hints hints) { + checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_15 inplace15(final Hints hints) { + checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Inplaces.Arity16_16 inplace16(final Hints hints) { + checkInplaceRefs(16, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + return matchInplace16(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); + } + + public Object apply() { + return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public Object apply(final Hints hints) { + return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate1() { + inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate2() { + inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate3() { + inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate4() { + inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate5() { + inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate6() { + inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate7() { + inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate8() { + inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate9() { + inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate10() { + inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate11() { + inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate12() { + inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate13() { + inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate14() { + inplace14().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate15() { + inplace15().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate16() { + inplace16().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate1(final Hints hints) { + inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate2(final Hints hints) { + inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate3(final Hints hints) { + inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate4(final Hints hints) { + inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate5(final Hints hints) { + inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate6(final Hints hints) { + inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate7(final Hints hints) { + inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate8(final Hints hints) { + inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate9(final Hints hints) { + inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate10(final Hints hints) { + inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate11(final Hints hints) { + inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate12(final Hints hints) { + inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate13(final Hints hints) { + inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate14(final Hints hints) { + inplace14(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate15(final Hints hints) { + inplace15(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + public void mutate16(final Hints hints) { + inplace16(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); + } + + } + + /** + * Builder with arity 16, input value given, output value given. + * + * @author Curtis Rueden + * @param The type of input 1. + * @param The type of input 2. + * @param The type of input 3. + * @param The type of input 4. + * @param The type of input 5. + * @param The type of input 6. + * @param The type of input 7. + * @param The type of input 8. + * @param The type of input 9. + * @param The type of input 10. + * @param The type of input 11. + * @param The type of input 12. + * @param The type of input 13. + * @param The type of input 14. + * @param The type of input 15. + * @param The type of input 16. + */ + public final class Arity16_IV_OV { + + private final I1 in1; + private final I2 in2; + private final I3 in3; + private final I4 in4; + private final I5 in5; + private final I6 in6; + private final I7 in7; + private final I8 in8; + private final I9 in9; + private final I10 in10; + private final I11 in11; + private final I12 in12; + private final I13 in13; + private final I14 in14; + private final I15 in15; + private final I16 in16; + private final O out; + + public Arity16_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16, final O out) + { + this.in1 = in1; + this.in2 = in2; + this.in3 = in3; + this.in4 = in4; + this.in5 = in5; + this.in6 = in6; + this.in7 = in7; + this.in8 = in8; + this.in9 = in9; + this.in10 = in10; + this.in11 = in11; + this.in12 = in12; + this.in13 = in13; + this.in14 = in14; + this.in15 = in15; + this.in16 = in16; + this.out = out; + } + + public Computers.Arity16 computer() { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), type(out)); + } + + public void compute() { + computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); + } + + public Computers.Arity16 computer(final Hints hints) { + return matchComputer(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), type(out), hints); + } + + public void compute(final Hints hints) { + computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); + } + + } + + @SuppressWarnings({ "unchecked" }) + public static Producer matchFunction(final OpEnvironment env, final String opName, final Nil outType) + { + return matchFunctionHelper(env, opName, Producer.class, outType); + } + + @SuppressWarnings({ "unchecked" }) + public static Function matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Function.class, outType, in1Type); + } + + @SuppressWarnings({ "unchecked" }) + public static BiFunction matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType) + { + return matchFunctionHelper(env, opName, BiFunction.class, outType, in1Type, in2Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity3 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity3.class, outType, in1Type, in2Type, in3Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity4 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity5 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity6 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity7 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity8 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity9 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity10 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity11 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity12 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity13 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity14 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity15 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity16 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType) + { + return matchFunctionHelper(env, opName, Functions.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Producer matchFunction(final OpEnvironment env, final String opName, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Producer.class, outType); + } + + @SuppressWarnings({ "unchecked" }) + public static Function matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Function.class, outType, in1Type); + } + + @SuppressWarnings({ "unchecked" }) + public static BiFunction matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, BiFunction.class, outType, in1Type, in2Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity3 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity3.class, outType, in1Type, in2Type, in3Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity4 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity5 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity6 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity7 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity8 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity9 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity10 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity11 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity12 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity13 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity14 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity15 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.Arity16 matchFunction(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType, final Hints hints) + { + return matchFunctionHelper(env, opName, hints, Functions.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchFunctionHelper(final OpEnvironment env, final String opName, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchFunctionHelper(final OpEnvironment env, final String opName, final Hints hints, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity0 matchComputer(final OpEnvironment env, final String opName, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity0.class, outType); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity1 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity1.class, outType, in1Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity2 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity2.class, outType, in1Type, in2Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity3 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity3.class, outType, in1Type, in2Type, in3Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity4 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity5 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity6 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity7 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity8 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity9 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity10 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity11 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity12 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity13 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity14 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity15 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity16 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType) + { + return matchComputerHelper(env, opName, Computers.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity0 matchComputer(final OpEnvironment env, final String opName, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity0.class, outType); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity1 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity1.class, outType, in1Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity2 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity2.class, outType, in1Type, in2Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity3 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity3.class, outType, in1Type, in2Type, in3Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity4 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity5 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity6 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity7 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity8 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity9 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity10 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity11 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity12 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity13 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity14 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity15 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); + } + + @SuppressWarnings("unchecked") + public static Computers.Arity16 matchComputer(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType, final Hints hints) + { + return matchComputerHelper(env, opName, hints, Computers.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchComputerHelper(final OpEnvironment env, final String opName, final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + final Nil[] nils = new Nil[inTypes.length + 1]; + System.arraycopy(inTypes, 0, nils, 0, inTypes.length); + nils[nils.length - 1] = outType; + return (T) env.op(opName, Nil.of(specialType), nils, outType); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchComputerHelper(final OpEnvironment env, final String opName, final Hints hints, final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + final Nil[] nils = new Nil[inTypes.length + 1]; + System.arraycopy(inTypes, 0, nils, 0, inTypes.length); + nils[nils.length - 1] = outType; + return (T) env.op(opName, Nil.of(specialType), nils, outType, hints); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity1 matchInplace(final OpEnvironment env, final String opName, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity1.class, ioType, new Nil[] {ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity2_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity2_1.class, ioType, new Nil[] {ioType, in2Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity2_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity2_2.class, ioType, new Nil[] {in1Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity3_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity3_1.class, ioType, new Nil[] {ioType, in2Type, in3Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity3_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity3_2.class, ioType, new Nil[] {in1Type, ioType, in3Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity3_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity3_3.class, ioType, new Nil[] {in1Type, in2Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity4_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity4_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity4_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity4_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity5_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity5_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity5_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity5_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity5_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity6_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity6_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity6_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity6_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity6_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity6_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity7_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity8_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity9_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity10_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity11_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity12_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity13_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_14 matchInplace14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity14_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_14 matchInplace14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_15 matchInplace15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity15_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_14 matchInplace14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_15 matchInplace15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType, final Nil in16Type) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_16 matchInplace16(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil ioType) + { + return matchInplaceHelper(env, opName, Inplaces.Arity16_16.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, ioType}); + } + + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity1 matchInplace(final OpEnvironment env, final String opName, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity1.class, ioType, new Nil[] {ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity2_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity2_1.class, ioType, new Nil[] {ioType, in2Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity2_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity2_2.class, ioType, new Nil[] {in1Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity3_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity3_1.class, ioType, new Nil[] {ioType, in2Type, in3Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity3_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity3_2.class, ioType, new Nil[] {in1Type, ioType, in3Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity3_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity3_3.class, ioType, new Nil[] {in1Type, in2Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity4_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity4_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity4_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity4_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity4_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity5_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity5_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity5_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity5_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity5_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity5_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity6_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity6_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity6_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity6_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity6_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity6_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity6_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity7_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity7_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity8_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity8_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity9_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity9_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity10_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity10_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity11_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity11_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity12_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity12_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity13_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity13_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity14_14 matchInplace14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity14_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_14 matchInplace14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity15_15 matchInplace15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity15_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_1 matchInplace1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_2 matchInplace2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_3 matchInplace3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_4 matchInplace4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_5 matchInplace5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_6 matchInplace6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_7 matchInplace7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_8 matchInplace8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_9 matchInplace9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_10 matchInplace10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_11 matchInplace11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_12 matchInplace12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_13 matchInplace13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_14 matchInplace14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_15 matchInplace15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType, final Nil in16Type, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType, in16Type}); + } + + @SuppressWarnings({ "unchecked" }) + public static Inplaces.Arity16_16 matchInplace16(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil ioType, final Hints hints) + { + return matchInplaceHelper(env, opName, hints, Inplaces.Arity16_16.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, ioType}); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchInplaceHelper(final OpEnvironment env, final String opName, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchInplaceHelper(final OpEnvironment env, final String opName, final Hints hints, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpCandidate.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpCandidate.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpCandidate.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpCandidate.java index c3d3f1672..95a385470 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpCandidate.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpCandidate.java @@ -27,18 +27,14 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.api; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.List; import java.util.Map; -import org.scijava.log.Logger; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.param.ValidityProblem; +import org.scijava.ValidityProblem; import org.scijava.struct.Member; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; @@ -65,7 +61,6 @@ public static enum StatusCode { } private final OpEnvironment env; - private final Logger log; private final OpRef ref; private final OpInfo info; @@ -79,11 +74,10 @@ public static enum StatusCode { * If the op does not, this will be the same as {@link #ref}.getArgs(). */ private final Type[] paddedArgs; - public OpCandidate(final OpEnvironment env, final Logger log, final OpRef ref, final OpInfo info, + public OpCandidate(final OpEnvironment env, final OpRef ref, final OpInfo info, final Map, Type> typeVarAssigns) { this.env = env; - this.log = log; this.ref = ref; this.info = info; this.typeVarAssigns = typeVarAssigns; @@ -213,19 +207,18 @@ public String toString() { return info.toString(); } - public StructInstance createOpInstance(List dependencies) throws OpMatchingException + public StructInstance createOpInstance(List dependencies) { - if (!getStatusCode().equals(StatusCode.MATCH)) { - throw new OpMatchingException( - "Status of candidate to create op from indicates a problem: " + getStatus()); + if (getStatusCode().equals(StatusCode.MATCH)) { + return opInfo().createOpInstance(dependencies); } - StructInstance inst = opInfo().createOpInstance(dependencies); - return inst; + throw new IllegalStateException( + "Status of candidate to create op from indicates a problem: " + + getStatus()); } public Object createOp(List dependencies) - throws OpMatchingException { return createOpInstance(dependencies).object(); } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependencyMember.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpDependencyMember.java similarity index 98% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependencyMember.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpDependencyMember.java index 86a91bcce..70b9f365a 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependencyMember.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpDependencyMember.java @@ -28,7 +28,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.api; import org.scijava.struct.ItemIO; import org.scijava.struct.Member; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpEnvironment.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpEnvironment.java similarity index 96% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpEnvironment.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpEnvironment.java index d9b815c8c..c19c785e3 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpEnvironment.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpEnvironment.java @@ -27,13 +27,10 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.api; import java.lang.reflect.Type; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.matcher.OpRef; import org.scijava.types.Nil; /** @@ -191,16 +188,16 @@ default OpBuilder op(final String opName) { * * @param opClass * @param priority - the assigned priority of the Op. + * @param names - the name(s) of the Op * @return an {@link OpInfo} which can make instances of {@code opClass} */ - OpInfo opify(Class opClass, double priority); + OpInfo opify(Class opClass, double priority, String... names); /** - * Makes the {@link OpInfo} {@code info} known to this {@link OpEnvironment} under the name {@code name} - * @param info - * @param name + * Makes the {@link OpInfo} {@code info} known to this {@link OpEnvironment}. + * @param info the {@link OpInfo} to be registered */ - void register(OpInfo info, String name); + void register(OpInfo info); /** * Sets the {@link Hints} for the {@link OpEnvironment}. Every Call to diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpExecutionSummary.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpExecutionSummary.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpExecutionSummary.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpExecutionSummary.java index ba8f970f5..9892b4fb1 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpExecutionSummary.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpExecutionSummary.java @@ -1,11 +1,8 @@ -package org.scijava.ops.provenance; +package org.scijava.ops.api; import java.util.UUID; -import org.scijava.ops.OpInfo; -import org.scijava.ops.impl.DefaultOpEnvironment; - /** * Describes the execution of an Op * @@ -22,7 +19,7 @@ public class OpExecutionSummary { /** The {@link Object} created by {@code info} */ private final Object instance; - /** The {@link Object} returned by the call to {@link DefaultOpEnvironment} */ + /** The {@link Object} returned by an {@link OpWrapper} */ private final Object wrappedInstance; /** diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/OpHints.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpHints.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/OpHints.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpHints.java index b245c4e17..d4b4a2b60 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/OpHints.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpHints.java @@ -1,5 +1,5 @@ -package org.scijava.ops.hints; +package org.scijava.ops.api; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpHistory.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpHistory.java similarity index 94% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpHistory.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpHistory.java index 1ea8c3a0a..09eca1918 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpHistory.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpHistory.java @@ -1,14 +1,11 @@ -package org.scijava.ops.provenance; +package org.scijava.ops.api; import com.google.common.graph.Graph; import java.util.List; import java.util.UUID; -import org.scijava.ops.OpInfo; -import org.scijava.service.SciJavaService; - /** * Log describing each execution of an Op. This class is designed to answer two * questions: diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpInfo.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpInfo.java similarity index 68% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpInfo.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpInfo.java index de0747cfa..fed912330 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpInfo.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpInfo.java @@ -1,23 +1,17 @@ -package org.scijava.ops; +package org.scijava.ops.api; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; -import org.scijava.log.Logger; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.OpHints; -import org.scijava.ops.hints.impl.ImmutableHints; -import org.scijava.ops.matcher.OpCandidate; -import org.scijava.ops.matcher.OpRef; -import org.scijava.param.ValidityException; import org.scijava.struct.Member; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; -import org.scijava.util.MiscUtils; +import org.scijava.struct.ValidityException; /** * Metadata about an op implementation. @@ -27,6 +21,9 @@ */ public interface OpInfo extends Comparable { + /** name(s) of the op. */ + List names(); + /** Generic type of the op. This will be the parameterized type of the concrete class */ Type opType(); @@ -36,11 +33,6 @@ public interface OpInfo extends Comparable { /** Gets the hints declared in the {@link OpHints} annotation */ Hints declaredHints(); - default Hints formHints(OpHints h) { - if (h == null) return new ImmutableHints(new String[0]); - return new ImmutableHints(h.hints()); - } - /** Gets the op's input parameters. */ default List> inputs() { return OpUtils.inputs(struct()); @@ -48,7 +40,13 @@ default List> inputs() { /** Gets the op's output parameters. */ default Member output() { - return OpUtils.outputs(struct()).get(0); + List> outputs = OpUtils.outputs(struct()); + + if (outputs.size() == 0) throw new IllegalStateException( + "No outputs in Struct " + struct()); + if (outputs.size() == 1) return outputs.get(0); + throw new IllegalStateException( + "Multiple outputs in Struct " + struct()); } /** Gets the op's dependencies on other ops. */ @@ -56,8 +54,8 @@ default List> dependencies() { return OpUtils.dependencies(struct()); } - default OpCandidate createCandidate(OpEnvironment env, Logger log, OpRef ref, Map, Type> typeVarAssigns) { - return new OpCandidate(env, log, ref, this, typeVarAssigns); + default OpCandidate createCandidate(OpEnvironment env, OpRef ref, Map, Type> typeVarAssigns) { + return new OpCandidate(env, ref, this, typeVarAssigns); } /** The op's priority. */ @@ -79,6 +77,6 @@ default OpCandidate createCandidate(OpEnvironment env, Logger log, OpRef ref, Ma default int compareTo(final OpInfo that) { if (this.priority() < that.priority()) return 1; if (this.priority() > that.priority()) return -1; - return MiscUtils.compare(this.implementationName(), that.implementationName()); + return this.implementationName().compareTo(that.implementationName()); } } diff --git a/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpInfoGenerator.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpInfoGenerator.java new file mode 100644 index 000000000..cdd8dfca4 --- /dev/null +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpInfoGenerator.java @@ -0,0 +1,9 @@ +package org.scijava.ops.api; + +import java.util.List; + +public interface OpInfoGenerator { + + List generateInfos(); + +} diff --git a/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpRef.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpRef.java new file mode 100644 index 000000000..2f74604ed --- /dev/null +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpRef.java @@ -0,0 +1,135 @@ +/* + * #%L + * ImageJ software for multidimensional image processing and analysis. + * %% + * Copyright (C) 2014 - 2018 ImageJ developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +package org.scijava.ops.api; + +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.Arrays; +import java.util.Map; +import java.util.Objects; + +import org.scijava.types.Types; + +/** + * Data structure which identifies an op by name and/or type(s) and/or argument + * type(s), along with a list of input arguments. + * + * @author Christian Dietz (University of Konstanz) + * @author Curtis Rueden + */ +public interface OpRef { + + // -- OpRef methods -- + + /** Gets the name of the op. */ + public String getName(); + + /** Gets the type which the op must match. */ + public Type getType(); + + /** + * Gets the op's output type constraint, or null for no constraint. + */ + public Type getOutType(); + + /** Gets the op's arguments. */ + public Type[] getArgs(); + + /** + * Gets a label identifying the op's scope (i.e., its name and/or types). + */ + public String getLabel(); + + public boolean typesMatch(final Type opType); + + /** + * Determines whether the specified type satisfies the op's required types + * using {@link Types#isApplicable(Type[], Type[])}. + */ + public boolean typesMatch(final Type opType, final Map, Type> typeVarAssigns); + + // -- Object methods -- + + default String refString() { + String n = getName() == null ? "" : "Name: \"" + getName() + "\", Types: "; + n += getType() + "\n"; + n += "Input Types: \n"; + for (Type arg : getArgs()) { + n += "\t\t* "; + n += arg == null ? "" : arg.getTypeName(); + n += "\n"; + } + n += "Output Type: \n"; + n += "\t\t* "; + n += getOutType() == null ? "" : getOutType().getTypeName(); + n += "\n"; + return n.substring(0, n.length() - 1); + } + + default boolean refEquals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final OpRef other = (OpRef) obj; + if (!Objects.equals(getName(), other.getName())) + return false; + if (!Objects.equals(getType(), other.getType())) + return false; + if (!Objects.equals(getOutType(), other.getOutType())) + return false; + if (!Arrays.equals(getArgs(), other.getArgs())) + return false; + return true; + } + + default int refHashCode() { + return Arrays.deepHashCode(new Object[] {getName(), getType(), getOutType(), getArgs()}); + } + + // -- Utility methods -- + + public static Type[] filterNulls(final Type... types) { + Type[] ts = Arrays.stream(types).filter(t -> t != null).toArray(Type[]::new); + return ts == null ? null : ts; + } + + // -- Helper methods -- + + static void append(final StringBuilder sb, final String s) { + if (s == null) + return; + if (sb.length() > 0) + sb.append("/"); + sb.append(s); + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpUtils.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpUtils.java similarity index 63% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpUtils.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpUtils.java index 32df09bfa..51e9a823d 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpUtils.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpUtils.java @@ -27,8 +27,9 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.api; +import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.Arrays; import java.util.Collections; @@ -36,19 +37,13 @@ import java.util.Objects; import java.util.stream.Collectors; -import org.scijava.ops.matcher.MatchingResult; -import org.scijava.ops.matcher.OpCandidate; -import org.scijava.ops.matcher.OpCandidate.StatusCode; -import org.scijava.ops.matcher.OpMatcher; -import org.scijava.ops.matcher.OpRef; -import org.scijava.param.ParameterMember; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; -import org.scijava.param.ValidityProblem; +import org.scijava.ValidityProblem; +import org.scijava.ops.api.OpCandidate.StatusCode; import org.scijava.struct.Member; import org.scijava.struct.MemberInstance; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; +import org.scijava.struct.ValidityException; import org.scijava.struct.ValueAccessible; import org.scijava.types.Types; @@ -200,7 +195,7 @@ public static Object[] padArgs(final OpCandidate candidate, final boolean second int inputCount = 0, requiredCount = 0; for (final Member item : members) { inputCount++; - if (isRequired(item)) + if (!item.isRequired()) requiredCount++; } if (args.length == inputCount) { @@ -229,7 +224,7 @@ public static Object[] padArgs(final OpCandidate candidate, final boolean second final Object[] paddedArgs = new Object[inputCount]; int argIndex = 0, paddedIndex = 0, optionalIndex = 0; for (final Member item : members) { - if (!isRequired(item) && optionalIndex++ >= optionalsToFill) { + if (!item.isRequired() && optionalIndex++ >= optionalsToFill) { // skip this optional parameter (pad with null) paddedIndex++; continue; @@ -238,12 +233,7 @@ public static Object[] padArgs(final OpCandidate candidate, final boolean second } return paddedArgs; } - - public static boolean isRequired(final Member item) { - return item instanceof ParameterMember && // - ((ParameterMember) item).isRequired(); - } - + public static List> injectableMembers(Struct struct) { return struct.members() .stream() @@ -256,11 +246,10 @@ public static List> injectableMembers(Struct struct) { * several matches that do not have equal output types, the output type may not * completely match the request as only raw type assignability will be checked * at the moment. - * @see OpMatcher#typesMatch(OpCandidate) * @param matches * @return */ - private static boolean typeCheckingIncomplete(List matches) { + public static boolean typeCheckingIncomplete(List matches) { Type outputType = null; for (OpCandidate match : matches) { Type ts = output(match).getType(); @@ -278,161 +267,90 @@ public static Type[] getTypes(List> members) { return members.stream().map(m -> m.getType()).toArray(Type[]::new); } - /** - * Gets a string with an analysis of a particular match request failure. - *

- * This method is used to generate informative exception messages when no - * matches, or too many matches, are found. - *

- * - * @param res - * The result of type matching - * @return A multi-line string describing the situation: 1) the type of - * match failure; 2) the list of matching ops (if any); 3) the - * request itself; and 4) the list of candidates including status - * (i.e., whether it matched, and if not, why not). - */ - public static String matchInfo(final MatchingResult res) { - final StringBuilder sb = new StringBuilder(); - - List candidates = res.getCandidates(); - List matches = res.getMatches(); - - final OpRef ref = res.getOriginalQueries().get(0); - if (matches.isEmpty()) { - // no matches - sb.append("No matching '" + ref.getLabel() + "' op\n"); - } else { - // multiple matches - final double priority = getPriority(matches.get(0)); - sb.append("Multiple '" + ref.getLabel() + "' ops of priority " + priority + ":\n"); - if (typeCheckingIncomplete(matches)) { - sb.append("Incomplete output type checking may have occured!\n"); - } - int count = 0; - for (final OpCandidate match : matches) { - sb.append(++count + ". "); - sb.append(match.toString() + "\n"); - } - } - - // fail, with information about the request and candidates - sb.append("\n"); - sb.append("Request:\n"); - sb.append("-\t" + ref.toString() + "\n"); - sb.append("\n"); - sb.append("Candidates:\n"); - if (candidates.isEmpty()) { - sb.append("-\t No candidates found!"); - } - int count = 0; - for (final OpCandidate candidate : candidates) { - sb.append(++count + ". "); - sb.append("\t" + opString(candidate.opInfo(), candidate.getStatusItem()) + "\n"); - final String status = candidate.getStatus(); - if (status != null) - sb.append("\t" + status + "\n"); - if (candidate.getStatusCode() == StatusCode.DOES_NOT_CONFORM) { - // TODO: Conformity not yet implemented - // // show argument values when a contingent op rejects them - // for (final ModuleItem item : inputs(info)) { - // final Object value = item.getValue(candidate.getModule()); - // sb.append("\t\t" + item.getName() + " = " + value + "\n"); - // } - } - } - return sb.toString(); + public static String opString(final OpInfo info) { + return opString(info, null); } - /** - * Gets a string describing the given op, highlighting the specific - * parameter. - * - * @param info - * The {@link OpInfo} metadata which describes the op. - * @param special - * A parameter of particular interest when describing the op. - * @return A string describing the op. - */ public static String opString(final OpInfo info, final Member special) { - final StringBuilder sb = new StringBuilder(); - final String outputString = paramString(outputs(info.struct()), null).trim(); - if (!outputString.isEmpty()) - sb.append("(" + outputString + ") =\n\t"); - sb.append(info.implementationName()); - sb.append("(" + paramString(inputs(info.struct()), special) + ")"); - return sb.toString(); - } - - /** - * Helper method of {@link #opString(OpInfo, Member)} which parses a set of - * items with a default delimiter of "," - */ - private static String paramString(final Iterable> items, final Member special) { - return paramString(items, special, ","); - } - - /** - * As {@link #paramString(Iterable, Member, String)} with an optional - * delimiter. - */ - private static String paramString(final Iterable> items, final Member special, final String delim) { - return paramString(items, special, delim, false); - } - - /** - * As {@link #paramString(Iterable, Member, String)} with a toggle to - * control if inputs are types only or include the names. - */ - private static String paramString(final Iterable> items, final Member special, final String delim, - final boolean typeOnly) { - final StringBuilder sb = new StringBuilder(); - boolean first = true; - for (final Member item : items) { - if (first) - first = false; - else - sb.append(delim); - sb.append("\n"); - if (item == special) - sb.append("==>"); // highlight special item - sb.append("\t\t"); - sb.append(item.getType().getTypeName()); - - if (!typeOnly) { - sb.append(" " + item.getKey()); - } - } - return sb.toString(); - } - - public static String opString(final OpInfo info) { final StringBuilder sb = new StringBuilder(); sb.append(info.implementationName() + "(\n\t Inputs:\n"); for (final Member arg : info.inputs()) { - sb.append("\t\t"); - sb.append(arg.getType().getTypeName()); - sb.append(" "); - sb.append(arg.getKey()); - sb.append("\n"); + appendParam(sb, arg, special); } sb.append("\t Outputs:\n"); - final Member arg = info.output(); - sb.append("\t\t"); + appendParam(sb, info.output(), special); + sb.append(")\n"); + return sb.toString(); + } + + private static void appendParam(final StringBuilder sb, final Member arg, + final Member special) + { + if (arg == special) sb.append("==> \t"); // highlight special item + else sb.append("\t\t"); sb.append(arg.getType().getTypeName()); sb.append(" "); sb.append(arg.getKey()); + if (!arg.getDescription().isEmpty()) { + sb.append(" -> "); + sb.append(arg.getDescription()); + } sb.append("\n"); - sb.append(")\n"); - return sb.toString(); + return; } public static Class findFirstImplementedFunctionalInterface(final OpRef opRef) { - final Class functionalInterface = ParameterStructs + final Class functionalInterface = OpUtils .findFunctionalInterface(Types.raw(opRef.getType())); if (functionalInterface != null) { return functionalInterface; } return null; } + + /** + * Searches for a {@code @FunctionalInterface} annotated interface in the + * class hierarchy of the specified type. The first one that is found will + * be returned. If no such interface can be found, null will be returned. + * + * @param type + * @return + */ + public static Class findFunctionalInterface(Class type) { + if (type == null) return null; + if (type.getAnnotation(FunctionalInterface.class) != null) return type; + for (Class iface : type.getInterfaces()) { + final Class result = findFunctionalInterface(iface); + if (result != null) return result; + } + return findFunctionalInterface(type.getSuperclass()); + } + + /** + * Attempts to find the single functional method of the specified + * class, by scanning the for functional interfaces. If there + * is no functional interface, null will be returned. + * + * @param cls + * @return + */ + public static Method findFunctionalMethod(Class cls) { + Class iFace = findFunctionalInterface(cls); + if (iFace == null) { + return null; + } + + List nonDefaults = Arrays.stream(iFace.getMethods()) + .filter(m -> !m.isDefault()).collect(Collectors.toList()); + + // The single non default method must be the functional one + if (nonDefaults.size() != 1) { + for (Class i : iFace.getInterfaces()) { + final Method result = findFunctionalMethod(i); + if (result != null) return result; + } + } + + return nonDefaults.get(0); + } } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/OpWrapper.java b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpWrapper.java similarity index 79% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/util/OpWrapper.java rename to scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpWrapper.java index f42138593..e7a6a3666 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/OpWrapper.java +++ b/scijava/scijava-ops-api/src/main/java/org/scijava/ops/api/OpWrapper.java @@ -1,12 +1,9 @@ -package org.scijava.ops.util; +package org.scijava.ops.api; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.UUID; -import org.scijava.ops.OpInfo; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.provenance.OpHistory; import org.scijava.plugin.SciJavaPlugin; import org.scijava.types.Types; diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/Globals.list b/scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/Globals.list similarity index 100% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/util/Globals.list rename to scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/Globals.list diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/core/builder/OpBuilder.list b/scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.list similarity index 56% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/core/builder/OpBuilder.list rename to scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.list index a3866eb1d..e231684ce 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/core/builder/OpBuilder.list +++ b/scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/api/Globals.list arities = (1..maxArity).collect() [OpBuilder.java] @@ -48,6 +48,7 @@ inputClassesToTypes = ``` ``` inputTypesArgs = ``` { arity -> + arity == 0 ? '' : String.join(', ', (1..arity).stream().map{a -> "final Nil in${a}Type"}.collect()) } ``` @@ -58,16 +59,73 @@ inputTypesFromArgs = ``` ``` inputTypesArgsWithOutput = ``` { arity -> + arity == 0 ? 'final Nil outType' : String.join(', ', (1..arity).stream().map{a -> "final Nil in${a}Type"}.collect()) + ', final Nil outType' } ``` inputTypes = ``` { arity -> + arity == 0 ? '' : String.join(', ', (1..arity).stream().map{a -> "in${a}Type"}.collect()) } ``` inputTypesWithOutput = ``` { arity -> + arity == 0 ? 'outType' : String.join(', ', (1..arity).stream().map{a -> "in${a}Type"}.collect()) + ', outType' } ``` +simplifiedClass = ``` +{ arity, num -> + simplifiedInplace(arity, num) + '.class' +} +``` +inplaceClass = ``` +{ arity, num -> + inplaceType(arity, num) + '.class' +} +``` +matchName = ``` +{ arity, num -> + arity == 1 ? "matchInplace" : + "matchInplace${num}" +} +``` +inplaceTypeVarNums = ``` +{ arity, io -> + (1..arity).subList(0, io - 1) + 'O' + (1..arity).subList(io, arity) +} +``` +inplaceGenericsList = ``` +{ arity, io -> + inplaceTypeVarNums(arity, io).stream().map{a -> "I$a"}.collect() +} +``` +inplaceGenerics = ``` +{ arity, io -> + '<' + String.join(', ', inplaceGenericsList(arity, io)) + '>' +} +``` +matchParams = ``` +{ arity, io -> + String.join(', ', inplaceGenericsList(arity, io).stream().map{a -> + a.charAt(1) == 'O'? + "final Nil<$a> ${a.toLowerCase()}Type" : + "final Nil<$a> in${a.substring(1)}Type"}.collect()) +} +``` +typeVarNums = ``` +{ arity, io -> + (1..arity).subList(0, io - 1) + 'O' + (1..arity).subList(io, arity) +} +``` +basicParamsList = ``` +{ arity, io -> + typeVarNums(arity, io).stream().map{a -> a == 'O' ? "ioType" : "in${a}Type"}.collect() +} +``` +basicParams = ``` +{ arity, io -> + String.join(', ', basicParamsList(arity, io)) +} +``` \ No newline at end of file diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/core/builder/OpBuilder.vm b/scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.vm similarity index 64% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/core/builder/OpBuilder.vm rename to scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.vm index ecccf660b..3e5be98c5 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/core/builder/OpBuilder.vm +++ b/scijava/scijava-ops-api/templates/main/java/org/scijava/ops/api/OpBuilder.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.core.builder; +package org.scijava.ops.api; import java.lang.reflect.Type; import java.util.function.BiFunction; @@ -42,11 +42,6 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.util.ComputerUtils; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.ops.util.InplaceUtils; import org.scijava.types.Nil; import org.scijava.types.Types; @@ -240,7 +235,7 @@ public class OpBuilder { } public Computers.Arity0 computer() { - return ComputerUtils.match(env, opName, outType); + return matchComputer(env, opName, outType); } public O create() { @@ -248,7 +243,7 @@ public class OpBuilder { } public Computers.Arity0 computer(Hints hints) { - return ComputerUtils.match(env, opName, outType, hints); + return matchComputer(env, opName, outType, hints); } public O create(Hints hints) { @@ -272,7 +267,7 @@ public class OpBuilder { } public Computers.Arity0 computer() { - return ComputerUtils.match(env, opName, type(out)); + return matchComputer(env, opName, type(out)); } public void compute() { @@ -280,7 +275,7 @@ public class OpBuilder { } public Computers.Arity0 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(out), hints); + return matchComputer(env, opName, type(out), hints); } public void compute(final Hints hints) { @@ -315,24 +310,24 @@ public class OpBuilder { } public $functionArity.call($arity)$generics.call($arity) function() { - return FunctionUtils.match(env, opName, $inputTypesWithOutput.call($arity)); + return matchFunction(env, opName, $inputTypesWithOutput.call($arity)); } public $functionArity.call($arity)$generics.call($arity) function(final Hints hints) { - return FunctionUtils.match(env, opName, $inputTypesWithOutput.call($arity), hints); + return matchFunction(env, opName, $inputTypesWithOutput.call($arity), hints); } public Computers.Arity${arity}$generics.call($arity) computer() { - return ComputerUtils.match(env, opName, $inputTypesWithOutput.call($arity)); + return matchComputer(env, opName, $inputTypesWithOutput.call($arity)); } public Computers.Arity${arity}$generics.call($arity) computer(final Hints hints) { - return ComputerUtils.match(env, opName, $inputTypesWithOutput.call($arity), hints); + return matchComputer(env, opName, $inputTypesWithOutput.call($arity), hints); } #foreach($a in [1..$arity]) public Inplaces.Arity$inplaceSuffix.call($arity, $a)$genericsWithoutOutput.call($arity) inplace${inplaceMatchNumber.call($arity, $a)}() { - return InplaceUtils.match${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypes.call($arity)); + return matchInplace${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypes.call($arity)); } #end @@ -368,16 +363,16 @@ public class OpBuilder { } public $functionArity.call($arity)$genericsWildcardFunction.call($arity) function() { - return FunctionUtils.match(env, opName, $inputTypes.call($arity), Nil.of(Object.class)); + return matchFunction(env, opName, $inputTypes.call($arity), Nil.of(Object.class)); } public $functionArity.call($arity)$genericsWildcardFunction.call($arity) function(final Hints hints) { - return FunctionUtils.match(env, opName, $inputTypes.call($arity), Nil.of(Object.class), hints); + return matchFunction(env, opName, $inputTypes.call($arity), Nil.of(Object.class), hints); } #foreach($a in [1..$arity]) public Inplaces.Arity$inplaceSuffix.call($arity, $a)$genericsWithoutOutput.call($arity) inplace${inplaceMatchNumber.call($arity, $a)}() { - return InplaceUtils.match${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypes.call($arity)); + return matchInplace${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypes.call($arity)); } #end @@ -408,19 +403,19 @@ public class OpBuilder { } public $functionArity.call($arity)$generics.call($arity) function() { - return FunctionUtils.match(env, opName, $inputTypesFromArgs.call($arity), outType); + return matchFunction(env, opName, $inputTypesFromArgs.call($arity), outType); } public $functionArity.call($arity)$generics.call($arity) function(final Hints hints) { - return FunctionUtils.match(env, opName, $inputTypesFromArgs.call($arity), outType, hints); + return matchFunction(env, opName, $inputTypesFromArgs.call($arity), outType, hints); } public Computers.Arity${arity}$generics.call($arity) computer() { - return ComputerUtils.match(env, opName, $inputTypesFromArgs.call($arity), outType); + return matchComputer(env, opName, $inputTypesFromArgs.call($arity), outType); } public Computers.Arity${arity}$generics.call($arity) computer(final Hints hints) { - return ComputerUtils.match(env, opName, $inputTypesFromArgs.call($arity), outType, hints); + return matchComputer(env, opName, $inputTypesFromArgs.call($arity), outType, hints); } public O apply() { @@ -467,24 +462,24 @@ public class OpBuilder { } public $functionArity.call($arity)$genericsWildcardFunction.call($arity) function() { - return FunctionUtils.match(env, opName, $inputTypesFromArgs.call($arity), Nil.of(Object.class)); + return matchFunction(env, opName, $inputTypesFromArgs.call($arity), Nil.of(Object.class)); } public $functionArity.call($arity)$genericsWildcardFunction.call($arity) function(final Hints hints) { - return FunctionUtils.match(env, opName, $inputTypesFromArgs.call($arity), Nil.of(Object.class), hints); + return matchFunction(env, opName, $inputTypesFromArgs.call($arity), Nil.of(Object.class), hints); } #foreach($a in [1..$arity]) public Inplaces.Arity$inplaceSuffix.call($arity, $a)$genericsWithoutOutput.call($arity) inplace${inplaceMatchNumber.call($arity, $a)}() { checkInplaceRefs($a, $inputObjects.call($arity)); - return InplaceUtils.match${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypesFromArgs.call($arity)); + return matchInplace${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypesFromArgs.call($arity)); } #end #foreach($a in [1..$arity]) public Inplaces.Arity$inplaceSuffix.call($arity, $a)$genericsWithoutOutput.call($arity) inplace${inplaceMatchNumber.call($arity, $a)}(final Hints hints) { checkInplaceRefs($a, $inputObjects.call($arity)); - return InplaceUtils.match${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypesFromArgs.call($arity), hints); + return matchInplace${inplaceMatchNumber.call($arity, $a)}(env, opName, $inputTypesFromArgs.call($arity), hints); } #end @@ -534,7 +529,7 @@ public class OpBuilder { } public Computers.Arity${arity}${generics.call($arity)} computer() { - return ComputerUtils.match(env, opName, $inputTypesFromArgs.call($arity), type(out)); + return matchComputer(env, opName, $inputTypesFromArgs.call($arity), type(out)); } public void compute() { @@ -542,7 +537,7 @@ public class OpBuilder { } public Computers.Arity${arity}${generics.call($arity)} computer(final Hints hints) { - return ComputerUtils.match(env, opName, $inputTypesFromArgs.call($arity), type(out), hints); + return matchComputer(env, opName, $inputTypesFromArgs.call($arity), type(out), hints); } public void compute(final Hints hints) { @@ -550,6 +545,132 @@ public class OpBuilder { } } +#end + +#foreach($arity in [0..$maxArity]) + @SuppressWarnings({ "unchecked" }) + public static $generics.call($arity) $functionArity.call($arity)$generics.call($arity) matchFunction(final OpEnvironment env, final String opName, $inputTypesArgsWithOutput.call($arity)) + { + return matchFunctionHelper(env, opName, ${functionArity.call($arity)}.class, outType#if( $arity == 0)#{else}, #end$inputTypes.call($arity)); + } + +#end +#foreach($arity in [0..$maxArity]) + @SuppressWarnings({ "unchecked" }) + public static $generics.call($arity) $functionArity.call($arity)$generics.call($arity) matchFunction(final OpEnvironment env, final String opName, $inputTypesArgsWithOutput.call($arity), final Hints hints) + { + return matchFunctionHelper(env, opName, hints, ${functionArity.call($arity)}.class, outType#if( $arity == 0)#{else}, #end$inputTypes.call($arity)); + } + +#end + @SuppressWarnings({ "unchecked" }) + private static T matchFunctionHelper(final OpEnvironment env, final String opName, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchFunctionHelper(final OpEnvironment env, final String opName, final Hints hints, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); + } + +#foreach($arity in [0..$maxArity]) + @SuppressWarnings("unchecked") + public static $generics.call($arity) $computerArity.call($arity)$generics.call($arity) matchComputer(final OpEnvironment env, final String opName, $inputTypesArgsWithOutput.call($arity)) + { + return matchComputerHelper(env, opName, ${computerArity.call($arity)}.class, outType#if( $arity == 0)#{else}, #end$inputTypes.call($arity)); + } + +#end +#foreach($arity in [0..$maxArity]) + @SuppressWarnings("unchecked") + public static $generics.call($arity) $computerArity.call($arity)$generics.call($arity) matchComputer(final OpEnvironment env, final String opName, $inputTypesArgsWithOutput.call($arity), final Hints hints) + { + return matchComputerHelper(env, opName, hints, ${computerArity.call($arity)}.class, outType#if( $arity == 0)#{else}, #end$inputTypes.call($arity)); + } + +#end + @SuppressWarnings({ "unchecked" }) + private static T matchComputerHelper(final OpEnvironment env, final String opName, final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + final Nil[] nils = new Nil[inTypes.length + 1]; + System.arraycopy(inTypes, 0, nils, 0, inTypes.length); + nils[nils.length - 1] = outType; + return (T) env.op(opName, Nil.of(specialType), nils, outType); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchComputerHelper(final OpEnvironment env, final String opName, final Hints hints, final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + final Nil[] nils = new Nil[inTypes.length + 1]; + System.arraycopy(inTypes, 0, nils, 0, inTypes.length); + nils[nils.length - 1] = outType; + return (T) env.op(opName, Nil.of(specialType), nils, outType, hints); + } + +#foreach($arity in $arities) +#foreach($a in [1..$arity]) + @SuppressWarnings({ "unchecked" }) + public static $inplaceGenerics.call($arity, $a) $inplaceType.call($arity, $a)$inplaceGenerics.call($arity, $a) $matchName.call($arity, $a)(final OpEnvironment env, final String opName, $matchParams.call($arity, $a)) + { + return matchInplaceHelper(env, opName, ${inplaceClass.call($arity, $a)}, ioType, new Nil[] {${basicParams.call($arity, $a)}}); + } #end +#end + +#foreach($arity in $arities) +#foreach($a in [1..$arity]) + @SuppressWarnings({ "unchecked" }) + public static $inplaceGenerics.call($arity, $a) $inplaceType.call($arity, $a)$inplaceGenerics.call($arity, $a) $matchName.call($arity, $a)(final OpEnvironment env, final String opName, $matchParams.call($arity, $a), final Hints hints) + { + return matchInplaceHelper(env, opName, hints, ${inplaceType.call($arity, $a)}.class, ioType, new Nil[] {${basicParams.call($arity, $a)}}); + } + +#end +#end + @SuppressWarnings({ "unchecked" }) + private static T matchInplaceHelper(final OpEnvironment env, final String opName, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchInplaceHelper(final OpEnvironment env, final String opName, final Hints hints, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); + } } diff --git a/scijava/scijava-ops-discovery/.gitignore b/scijava/scijava-ops-discovery/.gitignore new file mode 100644 index 000000000..00d2ab71d --- /dev/null +++ b/scijava/scijava-ops-discovery/.gitignore @@ -0,0 +1,2 @@ +/.apt_generated/ +/.apt_generated_tests/ diff --git a/scijava/scijava-ops-discovery/LICENSE.txt b/scijava/scijava-ops-discovery/LICENSE.txt new file mode 100644 index 000000000..ef17d5e7a --- /dev/null +++ b/scijava/scijava-ops-discovery/LICENSE.txt @@ -0,0 +1,24 @@ +Copyright (c) 2016 - 2019, SciJava Ops developers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/scijava/scijava-ops-discovery/README.md b/scijava/scijava-ops-discovery/README.md new file mode 100644 index 000000000..90608641c --- /dev/null +++ b/scijava/scijava-ops-discovery/README.md @@ -0,0 +1,12 @@ +The SciJava Ops projects offers a framework for typed operations, or Ops. + +Each op implements a particular functional interface, possessing typed inputs +or outputs. The system provides the ability to request ops matching particular +constraints, including implementing interface, input types and output types. + +It is like Java's method overloading, but more powerful, and more extensible. + +More documentation coming later. + +See also [ImageJ Ops](https://github.com/imagej/imagej-ops), a collection of +ops focused on scientific image processing and analysis. diff --git a/scijava/scijava-ops-discovery/bin/generate.groovy b/scijava/scijava-ops-discovery/bin/generate.groovy new file mode 100644 index 000000000..3e26050d9 --- /dev/null +++ b/scijava/scijava-ops-discovery/bin/generate.groovy @@ -0,0 +1,238 @@ +#!/usr/bin/env groovy + +/* + * #%L + * SciJava Operations: a framework for reusable algorithms. + * %% + * Copyright (C) 2018 SciJava developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +debug = System.getenv('DEBUG') +def debug(msg) { + if (debug) System.err.println("[DEBUG] $msg") +} + +@Grab('org.apache.velocity:velocity:1.7') +import org.apache.velocity.app.VelocityEngine + +// TODO: Get path to Groovy script and make these dirs relative to that. +templateDirectory = 'templates' +outputDirectory = 'src' + +knownFiles = new java.util.HashSet(); + +/* Gets the last modified timestamp for the given file. */ +def timestamp(dir, file) { + if (file == null) return Long.MAX_VALUE; + file = new java.io.File(dir, file); + knownFiles.add(file); + return file.lastModified(); +} + +/* Processes a template using Apache Velocity. */ +def processTemplate(engine, context, templateFile, outFilename) { + debug("processTemplate('$engine', '$context', '$templateFile', '$outFilename')") + + if (outFilename == null) return; // nothing to do + + // create output directory if it does not already exist + outFile = new java.io.File(outputDirectory, outFilename); + knownFiles.add(outFile); + if (outFile.getParentFile() != null) outFile.getParentFile().mkdirs(); + + // apply the template and write out the result + t = engine.getTemplate(templateFile); + writer = new StringWriter(); + t.merge(context, writer); + out = new PrintWriter(outFile, "UTF-8"); + out.print(writer.toString()); + out.close(); +} + +/* Evaluates a string using Groovy. */ +def parseValue(sh, translationsFile, key, expression) { + try { + result = sh.evaluate(expression) + sh.setVariable(key, result) + return result + } + catch (groovy.lang.GroovyRuntimeException e) { + print("[WARNING] $translationsFile: " + + "key '$key' has unparseable value: " + e.getMessage()); + } +} + +/* Reads a translations File */ +def readTranslation(engine, globalContext, reader, templateSubdirectory, templateFile, translationsFile, isInclude){ + sh = new groovy.lang.GroovyShell(); + for (;;) { + // read the line + line = reader.readLine(); + + if (line == null) break; + // check if the line starts a new section + if (line.startsWith("[") && line.endsWith("]")) { + // if we are parsing a .include file, return when we hit any sections + if(isInclude){ + println("[WARNING] $translationsFile: Section definition in .include file. Ending processing of $translationsFile"); + return context; + } + // write out the previous file + processTemplate(engine, context, templateFile, outputFilename); + + // start a new file + outputFilename = line.substring(1, line.length() - 1); + if (!templateDirectory.equals(templateSubdirectory)) { + subPath = templateSubdirectory.substring(templateDirectory.length() + 1); + outputFilename = "$subPath/$outputFilename"; + } + context = new org.apache.velocity.VelocityContext(globalContext); + continue; + } + + // ignore blank lines + trimmedLine = line.trim(); + if (trimmedLine.isEmpty()) continue; + + // ignore comments + if (trimmedLine.startsWith("#")) continue; + + // include any global files + if (trimmedLine.startsWith(".include")){ + includeFile = line.substring(9); + if(includeFile.startsWith("templates")){ + includeSubdirectory = includeFile.substring(0, includeFile.lastIndexOf("/")) + includeFile = includeFile.substring(includeFile.lastIndexOf("/")) + } + else{ + includeSubdirectory = templateSubdirectory + } + globalReader = new java.io.BufferedReader(new java.io.FileReader("$includeSubdirectory/$includeFile")); + encapsulatedContext = new org.apache.velocity.VelocityContext(context) + context = readTranslation(engine, encapsulatedContext, globalReader, templateSubdirectory, templateFile, includeFile, true) + continue; + } + + if (!line.contains('=')) { + print("[WARNING] $translationsFile: Ignoring spurious line: $line"); + continue; + } + + int idx = line.indexOf('='); + key = line.substring(0, idx).trim(); + value = line.substring(idx + 1); + + if (value.trim().equals('```')) { + // multi-line value + builder = new StringBuilder(); + for (;;) { + line = reader.readLine(); + if (line == null) { + throw new RuntimeException("Unfinished value: " + builder.toString()); + } + if (line.equals('```')) { + break; + } + if (builder.length() > 0) { + builder.append("\n"); + } + builder.append(line); + } + value = builder.toString(); + } + + context.put(key, parseValue(sh, translationsFile, key, value)); + } + + return context; +} + +/* + * Translates a template into many files in the outputDirectory, + * given a translations file in INI style; e.g.: + * + * [filename1] + * variable1 = value1 + * variable2 = value2 + * ... + * [filename2] + * variable1 = value3 + * variable2 = value4 + * ... + */ +def translate(templateSubdirectory, templateFile, translationsFile) { + debug("translate('$templateSubdirectory', '$templateFile', '$translationsFile')") + + // initialize the Velocity engine + engine = new org.apache.velocity.app.VelocityEngine(); + p = new java.util.Properties(); + // fail if template uses an invalid expression; e.g., an undefined variable + p.setProperty("runtime.references.strict", "true"); + // tell Velocity where the templates are located + p.setProperty("file.resource.loader.path", "$templateSubdirectory"); + // tell Velocity to log to stderr rather than to a velocity.log file + p.setProperty(org.apache.velocity.runtime.RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, + "org.apache.velocity.runtime.log.SystemLogChute"); + engine.init(p); + + // read translation lines + outputFilename = null; + context = globalContext = new org.apache.velocity.VelocityContext(); + reader = new java.io.BufferedReader(new java.io.FileReader("$templateSubdirectory/$translationsFile")); + + readTranslation(engine, context, reader, templateSubdirectory, templateFile, translationsFile, false); + + reader.close(); + + // process the template + processTemplate(engine, context, templateFile, outputFilename); +} + +/* Recursively translates all templates in the given directory. */ +def translateDirectory(templateSubdirectory) { + debug("translateDirectory('$templateSubdirectory')") + + for (file in new java.io.File(templateSubdirectory).listFiles()) { + if (file.isDirectory()) { + // process subdirectories recursively + translateDirectory(file.getPath()); + } + else { + // process Velocity template files only + name = file.getName(); + if (!name.endsWith('.vm')) continue; + prefix = name.substring(0, name.lastIndexOf('.')); + translate(templateSubdirectory, name, prefix + '.list'); + } + } +} + +try { + translateDirectory(templateDirectory); +} +catch (Throwable t) { + t.printStackTrace(System.err); + throw t; +} diff --git a/scijava/scijava-ops-discovery/pom.xml b/scijava/scijava-ops-discovery/pom.xml new file mode 100644 index 000000000..b55aca60c --- /dev/null +++ b/scijava/scijava-ops-discovery/pom.xml @@ -0,0 +1,112 @@ + + + 4.0.0 + + + org.scijava + scijava-incubator + 0-SNAPSHOT + ../.. + + + scijava-ops-discovery + + SciJava Ops Discovery + SciJava Operations Discovery: Discovery mechanisms used by the SciJava Operations framework. + https://github.com/scijava/scijava-ops-discovery + 2021 + + SciJava + https://scijava.org/ + + + + Simplified BSD License + repo + + + + + + ctrueden + Curtis Rueden + https://imagej.net/User:Rueden + + founder + lead + reviewer + support + maintainer + + + + gselzer + Gabriel Selzer + + founder + developer + debugger + reviewer + support + + + + + + Christian Dietz + https://imagej.net/User:Dietzc + + founder + + + dietzc + + + + David Kolb + + founder + + + Treiblesschorle + + + + + + + Image.sc Forum + https://forum.image.sc/tags/scijava-ops-discovery + + + + + scm:git:git://github.com/scijava/incubator + scm:git:git@github.com:scijava/incubator + HEAD + https://github.com/scijava/incubator + + + GitHub Issues + https://github.com/scijava/scijava-ops-discovery/issues + + + Travis CI + https://travis-ci.com/scijava/incubator + + + + org.scijava.ops.discovery.Main + org.scijava.ops.discovery + + bsd_2 + SciJava developers. + + ${scijava.allowedDuplicateClasses},com.github.therapi.runtimejavadoc.repack.com.eclipsesource.json.* + ${scijava-ops-discovery.allowedDuplicateClasses} + + + + diff --git a/scijava/scijava-ops-discovery/src/main/java/module-info.java b/scijava/scijava-ops-discovery/src/main/java/module-info.java new file mode 100644 index 000000000..e1803e6dd --- /dev/null +++ b/scijava/scijava-ops-discovery/src/main/java/module-info.java @@ -0,0 +1,5 @@ +module org.scijava.ops.discovery { + + exports org.scijava.ops.discovery; + +} diff --git a/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/Discoverer.java b/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/Discoverer.java new file mode 100644 index 000000000..52dcdc50c --- /dev/null +++ b/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/Discoverer.java @@ -0,0 +1,14 @@ + +package org.scijava.ops.discovery; + +import java.util.List; + +public interface Discoverer { + + List> implementingClasses(Class c); + + List implementingInstances(Class c, Class[] constructorClasses, Object[] constructorArgs); + + List> implementationsOf(Class c); + +} diff --git a/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/Implementation.java b/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/Implementation.java new file mode 100644 index 000000000..ed7b2d434 --- /dev/null +++ b/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/Implementation.java @@ -0,0 +1,35 @@ +package org.scijava.ops.discovery; + +import java.lang.reflect.Type; + +/** + * An implementation of a particular base {@link Class} + * @author Gabriel Selzer + * + * @param the base class {@link Type} + */ +public class Implementation { + + private final Class c; + private final Class implOf; + private final String name; + + public Implementation(final Class c, final Class implOf, final String name) { + this.c = c; + this.implOf = implOf; + this.name = name; + } + + public Class implementation() { + return c; + } + + public Class implementingClass() { + return implOf; + } + + public String name() { + return name; + } + +} diff --git a/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/StaticDiscoverer.java b/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/StaticDiscoverer.java new file mode 100644 index 000000000..d6038f6e9 --- /dev/null +++ b/scijava/scijava-ops-discovery/src/main/java/org/scijava/ops/discovery/StaticDiscoverer.java @@ -0,0 +1,58 @@ + +package org.scijava.ops.discovery; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public class StaticDiscoverer implements Discoverer { + + Map, String> names; + + public StaticDiscoverer() { + names = new HashMap<>(); + } + + public void register(Class c, String name) { + names.put(c, name); + } + + @SuppressWarnings("unchecked") + @Override + public List> implementingClasses(Class c) { + return names.keySet().stream() // + .filter(cls -> cls.isAssignableFrom(c)) // + .map(cls -> (Class) cls) // + .collect(Collectors.toList()); + } + + @Override + public List implementingInstances(Class c, + Class[] constructorClasses, Object[] constructorArgs) + { + return implementingClasses(c).stream() // + .map(cls -> classToObjectOrNull(cls, constructorClasses, constructorArgs)) // + .filter(o -> o != null) // + .collect(Collectors.toList()); + } + + private T classToObjectOrNull(Class c, Class[] constructorClasses, Object[] constructorArgs) { + try { + return c.getDeclaredConstructor(constructorClasses).newInstance( + constructorArgs); + } + catch (Throwable t) + { + return null; + } + } + + @Override + public List> implementationsOf(Class c) { + return implementingClasses(c).stream() // + .map(cls -> new Implementation<>(cls, c, names.get(cls))) // + .collect(Collectors.toList()); + } + +} diff --git a/scijava/scijava-ops-engine/.gitignore b/scijava/scijava-ops-engine/.gitignore new file mode 100644 index 000000000..00d2ab71d --- /dev/null +++ b/scijava/scijava-ops-engine/.gitignore @@ -0,0 +1,2 @@ +/.apt_generated/ +/.apt_generated_tests/ diff --git a/scijava/scijava-ops-engine/LICENSE.txt b/scijava/scijava-ops-engine/LICENSE.txt new file mode 100644 index 000000000..ef17d5e7a --- /dev/null +++ b/scijava/scijava-ops-engine/LICENSE.txt @@ -0,0 +1,24 @@ +Copyright (c) 2016 - 2019, SciJava Ops developers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/scijava/scijava-ops-engine/README.md b/scijava/scijava-ops-engine/README.md new file mode 100644 index 000000000..90608641c --- /dev/null +++ b/scijava/scijava-ops-engine/README.md @@ -0,0 +1,12 @@ +The SciJava Ops projects offers a framework for typed operations, or Ops. + +Each op implements a particular functional interface, possessing typed inputs +or outputs. The system provides the ability to request ops matching particular +constraints, including implementing interface, input types and output types. + +It is like Java's method overloading, but more powerful, and more extensible. + +More documentation coming later. + +See also [ImageJ Ops](https://github.com/imagej/imagej-ops), a collection of +ops focused on scientific image processing and analysis. diff --git a/scijava/scijava-ops-engine/bin/generate.groovy b/scijava/scijava-ops-engine/bin/generate.groovy new file mode 100644 index 000000000..3e26050d9 --- /dev/null +++ b/scijava/scijava-ops-engine/bin/generate.groovy @@ -0,0 +1,238 @@ +#!/usr/bin/env groovy + +/* + * #%L + * SciJava Operations: a framework for reusable algorithms. + * %% + * Copyright (C) 2018 SciJava developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +debug = System.getenv('DEBUG') +def debug(msg) { + if (debug) System.err.println("[DEBUG] $msg") +} + +@Grab('org.apache.velocity:velocity:1.7') +import org.apache.velocity.app.VelocityEngine + +// TODO: Get path to Groovy script and make these dirs relative to that. +templateDirectory = 'templates' +outputDirectory = 'src' + +knownFiles = new java.util.HashSet(); + +/* Gets the last modified timestamp for the given file. */ +def timestamp(dir, file) { + if (file == null) return Long.MAX_VALUE; + file = new java.io.File(dir, file); + knownFiles.add(file); + return file.lastModified(); +} + +/* Processes a template using Apache Velocity. */ +def processTemplate(engine, context, templateFile, outFilename) { + debug("processTemplate('$engine', '$context', '$templateFile', '$outFilename')") + + if (outFilename == null) return; // nothing to do + + // create output directory if it does not already exist + outFile = new java.io.File(outputDirectory, outFilename); + knownFiles.add(outFile); + if (outFile.getParentFile() != null) outFile.getParentFile().mkdirs(); + + // apply the template and write out the result + t = engine.getTemplate(templateFile); + writer = new StringWriter(); + t.merge(context, writer); + out = new PrintWriter(outFile, "UTF-8"); + out.print(writer.toString()); + out.close(); +} + +/* Evaluates a string using Groovy. */ +def parseValue(sh, translationsFile, key, expression) { + try { + result = sh.evaluate(expression) + sh.setVariable(key, result) + return result + } + catch (groovy.lang.GroovyRuntimeException e) { + print("[WARNING] $translationsFile: " + + "key '$key' has unparseable value: " + e.getMessage()); + } +} + +/* Reads a translations File */ +def readTranslation(engine, globalContext, reader, templateSubdirectory, templateFile, translationsFile, isInclude){ + sh = new groovy.lang.GroovyShell(); + for (;;) { + // read the line + line = reader.readLine(); + + if (line == null) break; + // check if the line starts a new section + if (line.startsWith("[") && line.endsWith("]")) { + // if we are parsing a .include file, return when we hit any sections + if(isInclude){ + println("[WARNING] $translationsFile: Section definition in .include file. Ending processing of $translationsFile"); + return context; + } + // write out the previous file + processTemplate(engine, context, templateFile, outputFilename); + + // start a new file + outputFilename = line.substring(1, line.length() - 1); + if (!templateDirectory.equals(templateSubdirectory)) { + subPath = templateSubdirectory.substring(templateDirectory.length() + 1); + outputFilename = "$subPath/$outputFilename"; + } + context = new org.apache.velocity.VelocityContext(globalContext); + continue; + } + + // ignore blank lines + trimmedLine = line.trim(); + if (trimmedLine.isEmpty()) continue; + + // ignore comments + if (trimmedLine.startsWith("#")) continue; + + // include any global files + if (trimmedLine.startsWith(".include")){ + includeFile = line.substring(9); + if(includeFile.startsWith("templates")){ + includeSubdirectory = includeFile.substring(0, includeFile.lastIndexOf("/")) + includeFile = includeFile.substring(includeFile.lastIndexOf("/")) + } + else{ + includeSubdirectory = templateSubdirectory + } + globalReader = new java.io.BufferedReader(new java.io.FileReader("$includeSubdirectory/$includeFile")); + encapsulatedContext = new org.apache.velocity.VelocityContext(context) + context = readTranslation(engine, encapsulatedContext, globalReader, templateSubdirectory, templateFile, includeFile, true) + continue; + } + + if (!line.contains('=')) { + print("[WARNING] $translationsFile: Ignoring spurious line: $line"); + continue; + } + + int idx = line.indexOf('='); + key = line.substring(0, idx).trim(); + value = line.substring(idx + 1); + + if (value.trim().equals('```')) { + // multi-line value + builder = new StringBuilder(); + for (;;) { + line = reader.readLine(); + if (line == null) { + throw new RuntimeException("Unfinished value: " + builder.toString()); + } + if (line.equals('```')) { + break; + } + if (builder.length() > 0) { + builder.append("\n"); + } + builder.append(line); + } + value = builder.toString(); + } + + context.put(key, parseValue(sh, translationsFile, key, value)); + } + + return context; +} + +/* + * Translates a template into many files in the outputDirectory, + * given a translations file in INI style; e.g.: + * + * [filename1] + * variable1 = value1 + * variable2 = value2 + * ... + * [filename2] + * variable1 = value3 + * variable2 = value4 + * ... + */ +def translate(templateSubdirectory, templateFile, translationsFile) { + debug("translate('$templateSubdirectory', '$templateFile', '$translationsFile')") + + // initialize the Velocity engine + engine = new org.apache.velocity.app.VelocityEngine(); + p = new java.util.Properties(); + // fail if template uses an invalid expression; e.g., an undefined variable + p.setProperty("runtime.references.strict", "true"); + // tell Velocity where the templates are located + p.setProperty("file.resource.loader.path", "$templateSubdirectory"); + // tell Velocity to log to stderr rather than to a velocity.log file + p.setProperty(org.apache.velocity.runtime.RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, + "org.apache.velocity.runtime.log.SystemLogChute"); + engine.init(p); + + // read translation lines + outputFilename = null; + context = globalContext = new org.apache.velocity.VelocityContext(); + reader = new java.io.BufferedReader(new java.io.FileReader("$templateSubdirectory/$translationsFile")); + + readTranslation(engine, context, reader, templateSubdirectory, templateFile, translationsFile, false); + + reader.close(); + + // process the template + processTemplate(engine, context, templateFile, outputFilename); +} + +/* Recursively translates all templates in the given directory. */ +def translateDirectory(templateSubdirectory) { + debug("translateDirectory('$templateSubdirectory')") + + for (file in new java.io.File(templateSubdirectory).listFiles()) { + if (file.isDirectory()) { + // process subdirectories recursively + translateDirectory(file.getPath()); + } + else { + // process Velocity template files only + name = file.getName(); + if (!name.endsWith('.vm')) continue; + prefix = name.substring(0, name.lastIndexOf('.')); + translate(templateSubdirectory, name, prefix + '.list'); + } + } +} + +try { + translateDirectory(templateDirectory); +} +catch (Throwable t) { + t.printStackTrace(System.err); + throw t; +} diff --git a/scijava/scijava-ops/pom.xml b/scijava/scijava-ops-engine/pom.xml similarity index 62% rename from scijava/scijava-ops/pom.xml rename to scijava/scijava-ops-engine/pom.xml index 4226e99fa..334c4bcca 100644 --- a/scijava/scijava-ops/pom.xml +++ b/scijava/scijava-ops-engine/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 @@ -9,11 +11,11 @@ ../.. - scijava-ops + scijava-ops-engine - SciJava Ops - SciJava Operations: a framework for reusable algorithms. - https://github.com/scijava/scijava-ops + SciJava Ops Engine + SciJava Operations Engine: a framework for reusable algorithms. + https://github.com/scijava/scijava-ops-engine 2016 SciJava @@ -55,20 +57,28 @@ Christian Dietz https://imagej.net/User:Dietzc - founder - dietzc + + founder + + + dietzc + David Kolb - founder - Treiblesschorle + + founder + + + Treiblesschorle + Image.sc Forum - https://forum.image.sc/tags/scijava-ops + https://forum.image.sc/tags/scijava-ops-engine @@ -80,7 +90,7 @@ GitHub Issues - https://github.com/scijava/scijava-ops/issues + https://github.com/scijava/scijava-ops-engine/issues Travis CI @@ -88,13 +98,15 @@ - org.scijava.ops.Main - org.scijava.ops + org.scijava.ops.engine.Main + org.scijava.ops.engine bsd_2 SciJava developers. + + ${scijava.allowedDuplicateClasses},com.github.therapi.runtimejavadoc.repack.com.eclipsesource.json.* + ${scijava-ops-engine.allowedDuplicateClasses} - @@ -111,48 +123,53 @@

@@ -63,11 +61,6 @@ * @author Kyle Harrington (University of Idaho) */ @Plugin(type = Op.class, name = "geom.voxelization") -@Parameter(key = "input") -@Parameter(key = "width", required = false) -@Parameter(key = "height", required = false) -@Parameter(key = "depth", required = false) -@Parameter(key = "voxelizedImage") public class DefaultVoxelization3D implements Functions.Arity4> { @@ -83,6 +76,15 @@ public class DefaultVoxelization3D @OpDependency(name = "create.img") private BiFunction> imgCreator; + /** + * TODO + * + * @param input + * @param width + * @param height + * @param depth + * @param voxelizedImage + */ @Override public RandomAccessibleInterval apply(Mesh input, Integer width, Integer height, Integer depth) { if (width == null) diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Facet.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Facet.java similarity index 97% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Facet.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Facet.java index 19175bffd..606904a18 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Facet.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Facet.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; public interface Facet { // NB: Marker Interface diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Horizon.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Horizon.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Horizon.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Horizon.java index 1bf644f1c..67716e8ed 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Horizon.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Horizon.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; /** * A Horizon is the result of n neighboring {@link TriangularFacet} which are merged. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/RAIToMeshConverter.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/RAIToMeshConverter.java similarity index 92% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/RAIToMeshConverter.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/RAIToMeshConverter.java index 37e03d465..51e79aeca 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/RAIToMeshConverter.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/RAIToMeshConverter.java @@ -27,7 +27,7 @@ * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; import java.lang.reflect.Type; import java.util.function.Function; @@ -41,12 +41,11 @@ import org.scijava.convert.AbstractConverter; import org.scijava.convert.ConversionRequest; import org.scijava.convert.Converter; -import org.scijava.function.Functions; -import org.scijava.ops.OpService; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.types.Nil; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.OpService; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; +import org.scijava.types.Nil; /** * Converts a RandomAccessibleInterval to a Mesh @@ -68,7 +67,7 @@ public class RAIToMeshConverter > extends @Override public T convert(Object src, Class dest) { if (marchingCubesFunc == null) { - marchingCubesFunc = FunctionUtils.match(ops.env(), "geom.marchingCubes", new Nil>() {}, + marchingCubesFunc = OpBuilder.matchFunction(ops.env(), "geom.marchingCubes", new Nil>() {}, new Nil() {}); } if (src instanceof IterableInterval) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/TriangularFacet.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/TriangularFacet.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/TriangularFacet.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/TriangularFacet.java index a52fad74a..2d45fd534 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/TriangularFacet.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/TriangularFacet.java @@ -26,14 +26,12 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.imagej.ops2.geom.geom3d.DefaultConvexHull3D; - import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/UpdateablePointSet.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/UpdateablePointSet.java similarity index 99% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/UpdateablePointSet.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/UpdateablePointSet.java index 99f9d9faf..72cca5aba 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/UpdateablePointSet.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/UpdateablePointSet.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; import java.util.List; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Vertex.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Vertex.java similarity index 98% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Vertex.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Vertex.java index 004337f34..c6a99568b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/Vertex.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/Vertex.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; import java.util.ArrayList; import java.util.Iterator; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/VertexInterpolator.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/VertexInterpolator.java similarity index 97% rename from imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/VertexInterpolator.java rename to imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/VertexInterpolator.java index e94d64824..d07512b55 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/mesh/VertexInterpolator.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/geom/geom3d/VertexInterpolator.java @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package net.imagej.ops2.geom.geom3d.mesh; +package net.imagej.ops2.geom.geom3d; public interface VertexInterpolator { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/AbstractHelp.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/AbstractHelp.java index ff14d734d..1dc4ef1dc 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/AbstractHelp.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/AbstractHelp.java @@ -33,9 +33,9 @@ import java.util.Iterator; import java.util.List; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.matcher.OpCandidate; +import org.scijava.ops.api.OpCandidate; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; /** * Base class for help operations. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/HelpForName.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/HelpForName.java index 9a8e0e7be..34d664e0d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/HelpForName.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/help/HelpForName.java @@ -32,12 +32,10 @@ import java.util.function.BiFunction; import org.scijava.Priority; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpService; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Gets documentation for the given name. @@ -46,11 +44,14 @@ */ @Plugin(type = Op.class, name = "help", priority = Priority.HIGH, description = "Gets documentation for all Ops with the given name") -@Parameter(key = "name") -@Parameter(key = "opService") -@Parameter(key = "opInfo") public class HelpForName extends AbstractHelp implements BiFunction { + /** + * TODO + * + * @param name + * @param opService + */ @Override public String apply(String name, OpService ops) { final Iterable allOps = ops.env().infos(name); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/identity/DefaultIdentity.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/identity/DefaultIdentity.java index 1c6401559..53aac4f16 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/identity/DefaultIdentity.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/identity/DefaultIdentity.java @@ -30,10 +30,8 @@ package net.imagej.ops2.identity; import org.scijava.function.Inplaces; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Default implementation of the {@link IdentityOp} op. @@ -41,10 +39,14 @@ * @author Curtis Rueden */ @Plugin(type = Op.class, name = "identity") -@Parameter(key = "io") public class DefaultIdentity implements Inplaces.Arity1 { + /** + * TODO + * + * @param io + */ @Override public void mutate(final A input) { // NB: No implementation needed. diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/ascii/DefaultASCII.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/ascii/DefaultASCII.java index d5afe0064..f466c3f47 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/ascii/DefaultASCII.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/ascii/DefaultASCII.java @@ -37,11 +37,9 @@ import net.imglib2.util.Pair; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Generates an ASCII version of an image. @@ -52,10 +50,6 @@ * @author Curtis Rueden */ @Plugin(type = Op.class, name = "image.ascii") -@Parameter(key = "iterableInput") -@Parameter(key = "min") -@Parameter(key = "max") -@Parameter(key = "ASCIIArt") public class DefaultASCII> implements Functions.Arity3, T, T, String> { @@ -64,6 +58,14 @@ public class DefaultASCII> implements Functions.Arity3, Pair> minMaxFunc; + /** + * TODO + * + * @param iterableInput + * @param min + * @param max + * @param ASCIIArt + */ @Override public String apply(final IterableInterval input, T min, T max) { if (min == null || max == null) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/cooccurrenceMatrix/CooccurrenceMatrix.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/cooccurrenceMatrix/CooccurrenceMatrix.java index af0133b3d..068ca578d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/cooccurrenceMatrix/CooccurrenceMatrix.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/cooccurrenceMatrix/CooccurrenceMatrix.java @@ -7,11 +7,9 @@ import net.imglib2.util.Pair; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Handler Op delegating between {@link CooccurrenceMatrix2D} and @@ -22,17 +20,21 @@ * @param - the input {@link RealType}. */ @Plugin(type = Op.class, name = "image.cooccurrenceMatrix") -@Parameter(key = "iterableInput") -@Parameter(key = "nrGreyLevels", min = "0", max = "128", stepSize = "1", initializer = "32") -@Parameter(key = "distance", min = "0", max = "128", stepSize = "1", initializer = "1") -@Parameter(key = "matrixOrientation") -@Parameter(key = "cooccurrenceMatrix") public class CooccurrenceMatrix> implements Functions.Arity4, Integer, Integer, MatrixOrientation, double[][]> { @OpDependency(name = "stats.minMax") private Function, Pair> minmax; + /** + * TODO + * + * @param iterableInput + * @param nrGreyLevels + * @param distance + * @param matrixOrientation + * @param cooccurrenceMatrix + */ @Override public double[][] apply(RandomAccessibleInterval input, Integer nrGreyLevels, Integer distance, MatrixOrientation orientation) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/CalibratedDistanceTransformer.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/CalibratedDistanceTransformer.java index 645db9d9e..de8411889 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/CalibratedDistanceTransformer.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/CalibratedDistanceTransformer.java @@ -36,10 +36,8 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Passes an input image of any dimension off to the correct Distance Transform @@ -55,13 +53,17 @@ * - the {@link RealType} of the output image */ @Plugin(type = Op.class, name = "image.distanceTransform") -@Parameter(key = "binaryInput") -@Parameter(key = "calibration") -@Parameter(key = "executorService") -@Parameter(key = "output") public class CalibratedDistanceTransformer, T extends RealType> implements Computers.Arity3, double[], ExecutorService, RandomAccessibleInterval> { + /** + * TODO + * + * @param binaryInput + * @param calibration + * @param executorService + * @param output + */ @Override public void compute(final RandomAccessibleInterval in, final double[] calibration, final ExecutorService es, final RandomAccessibleInterval out) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformCalibration.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformCalibration.java index 078cf7361..ce505ca16 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformCalibration.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DefaultDistanceTransformCalibration.java @@ -42,10 +42,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @@ -309,12 +307,16 @@ public Void call() throws Exception { } @Plugin(type = Op.class, name = "image.distanceTransform", priority = Priority.LAST) -@Parameter(key = "binaryInput") -@Parameter(key = "calibration") -@Parameter(key = "executorService") -@Parameter(key = "output") class DefaultDistanceTransformCalibrationOp , T extends RealType>implements Computers.Arity3, double[], ExecutorService, RandomAccessibleInterval>{ + /** + * TODO + * + * @param binaryInput + * @param calibration + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in, double[] calibration, ExecutorService es, RandomAccessibleInterval out) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DistanceTransformer.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DistanceTransformer.java index e47059294..13a67b635 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DistanceTransformer.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/distancetransform/DistanceTransformer.java @@ -36,10 +36,8 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Passes an input image of any dimension off to the correct Distance Transform @@ -53,12 +51,16 @@ * @param - the {@link RealType} of the output image */ @Plugin(type = Op.class, name = "image.distanceTransform") -@Parameter(key = "binaryInput") -@Parameter(key = "executorService") -@Parameter(key = "output") public class DistanceTransformer, T extends RealType> implements Computers.Arity2, ExecutorService, RandomAccessibleInterval> { + /** + * TODO + * + * @param binaryInput + * @param executorService + * @param output + */ @Override public void compute(RandomAccessibleInterval in, ExecutorService es, RandomAccessibleInterval out) { // make sure that the output type is suitable to be able to hold the maximum diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultCoordinatesEquation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultCoordinatesEquation.java index 404140f14..a16214a3b 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultCoordinatesEquation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultCoordinatesEquation.java @@ -36,10 +36,8 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * An equation operation which computes image values from coordinates using @@ -49,11 +47,15 @@ * @author Brian Northan */ @Plugin(type = Op.class, name = "image.equation") -@Parameter(key = "op") -@Parameter(key = "output") public class DefaultCoordinatesEquation, N extends Number> implements Computers.Arity1, IterableInterval> { + /** + * TODO + * + * @param op + * @param output + */ @Override public void compute(final Function op, final IterableInterval output) { diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultEquation.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultEquation.java index 2cf453670..d740c4875 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultEquation.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/equation/DefaultEquation.java @@ -41,13 +41,11 @@ import net.imglib2.type.numeric.RealType; import org.scijava.function.Computers; -import org.scijava.ops.OpExecutionException; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.OpExecutionException; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; import org.scijava.script.ScriptLanguage; import org.scijava.script.ScriptService; -import org.scijava.struct.ItemIO; /** * Computes an image using an equation. @@ -64,13 +62,17 @@ * @author Curtis Rueden */ @Plugin(type = Op.class, name = "image.equation") -@Parameter(key = "input") -@Parameter(key = "scriptService") -@Parameter(key = "output") public class DefaultEquation> implements Computers.Arity2> { + /** + * TODO + * + * @param input + * @param scriptService + * @param output + */ @Override public void compute(final String input, final ScriptService scriptService, final IterableInterval output) { final String equation = input + ";"; diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/DefaultFill.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/DefaultFill.java index 5bb153a57..9eb6282ee 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/DefaultFill.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/DefaultFill.java @@ -35,10 +35,8 @@ import net.imglib2.type.Type; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Fill an {@link IterableInterval} with some constant value. @@ -46,13 +44,17 @@ * @author Leon Yang */ @Plugin(type = Op.class, name = "image.fill") -@Parameter(key = "constant") -@Parameter(key = "iterableOutput") public class DefaultFill> implements Computers.Arity1> { //TODO can we find a way to parallelize this (or use lift?) + /** + * TODO + * + * @param constant + * @param iterableOutput + */ @Override public void compute(final T constant, final Iterable output) { Iterator iterator = output.iterator(); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/FillRAI.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/FillRAI.java index ddc9e793a..8cea990b2 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/FillRAI.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/fill/FillRAI.java @@ -35,10 +35,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Fill a {@link RandomAccessibleInterval} with some constant value. Operates in @@ -47,13 +45,15 @@ * @author Gabriel Selzer */ @Plugin(type = Op.class, name = "image.fill", priority = Priority.HIGH) -@Parameter(key = "constant") -@Parameter(key = "iterableOutput") public class FillRAI> implements Computers.Arity1> { //TODO can we find a way to parallelize this (or use lift?) + /** + * @param constant + * @param output + */ @Override public void compute(final T constant, final RandomAccessibleInterval output) { LoopBuilder.setImages(output).multiThreaded().forEachPixel(pixel -> pixel.set(constant)); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/histogram/HistogramCreate.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/histogram/HistogramCreate.java index e6fb82714..82e58c144 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/histogram/HistogramCreate.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/histogram/HistogramCreate.java @@ -37,20 +37,15 @@ import net.imglib2.type.numeric.RealType; import net.imglib2.util.Pair; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * @author Martin Horn (University of Konstanz) * @author Christian Dietz (University of Konstanz) */ @Plugin(type = Op.class, name = "image.histogram") -@Parameter(key = "iterable") -@Parameter(key = "numBins", required = false) -@Parameter(key = "histogram") public class HistogramCreate> implements BiFunction, Integer, Histogram1d> { public static final int DEFAULT_NUM_BINS = 256; @@ -58,6 +53,13 @@ public class HistogramCreate> implements BiFunction, Pair> minMaxFunc; + /** + * TODO + * + * @param iterable + * @param numBins + * @param histogram + */ @Override public Histogram1d apply(final Iterable input, Integer numBins) { if (numBins == null) @@ -76,13 +78,17 @@ public Histogram1d apply(final Iterable input, Integer numBins) { } @Plugin(type = Op.class, name = "image.histogram") -@Parameter(key = "iterable") -@Parameter(key = "histogram") class HistogramCreateSimple> implements Function, Histogram1d> { @OpDependency(name = "image.histogram") private BiFunction, Integer, Histogram1d> histogramOp; + /** + * TODO + * + * @param iterable + * @param histogram + */ @Override public Histogram1d apply(final Iterable input) { return histogramOp.apply(input, null); diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/AbstractIntegralImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/AbstractIntegralImg.java index 130994197..ec50b2eff 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/AbstractIntegralImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/AbstractIntegralImg.java @@ -37,7 +37,7 @@ import net.imglib2.view.Views; import org.scijava.function.Computers; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/DefaultIntegralImg.java b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/DefaultIntegralImg.java index 595aed5f5..d280e458d 100644 --- a/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/DefaultIntegralImg.java +++ b/imagej/imagej-ops2/src/main/java/net/imagej/ops2/image/integral/DefaultIntegralImg.java @@ -36,10 +36,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** *

org.scijava - scijava-function + scijava-ops-api ${project.version} org.scijava - scijava-types + scijava-ops-spi ${project.version} - - com.google.guava - guava + org.scijava + scijava-ops-discovery + ${project.version} - io.leangen.geantyref - geantyref - ${geantyref.version} + org.scijava + scijava-struct + ${project.version} - org.javassist - javassist + org.scijava + scijava-types + ${project.version} - - org.junit.jupiter - junit-jupiter-api - test + org.scijava + scijava-function + ${project.version} + - org.junit.jupiter - junit-jupiter-engine - test + com.google.guava + guava - org.junit.vintage - junit-vintage-engine - test + org.javassist + javassist - org.scijava - scijava-testutil - ${project.version} + com.github.therapi + therapi-runtime-javadoc + 0.12.0 + + + + + junit + junit test diff --git a/scijava/scijava-ops-engine/src/main/java/module-info.java b/scijava/scijava-ops-engine/src/main/java/module-info.java new file mode 100644 index 000000000..40e4e563e --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/module-info.java @@ -0,0 +1,48 @@ +module org.scijava.ops.engine { + +/* + * This is autogenerated source code -- DO NOT EDIT. Instead, edit the + * corresponding template in templates/ and rerun bin/generate.groovy. + */ + + + exports org.scijava.ops.engine; + exports org.scijava.ops.engine.conversionLoss; + exports org.scijava.ops.engine.util; + + opens org.scijava.ops.engine.util.internal to therapi.runtime.javadoc; + opens org.scijava.ops.engine to therapi.runtime.javadoc, org.scijava; + opens org.scijava.ops.engine.monitor to therapi.runtime.javadoc; + opens org.scijava.ops.engine.create to therapi.runtime.javadoc; + opens org.scijava.ops.engine.matcher.impl to therapi.runtime.javadoc, org.scijava; + opens org.scijava.ops.engine.conversionLoss to therapi.runtime.javadoc; + opens org.scijava.ops.engine.copy to therapi.runtime.javadoc; + opens org.scijava.ops.engine.log to therapi.runtime.javadoc; + opens org.scijava.ops.engine.matcher to therapi.runtime.javadoc; + opens org.scijava.ops.engine.simplify to therapi.runtime.javadoc; + opens org.scijava.ops.engine.impl to therapi.runtime.javadoc, org.scijava; + opens org.scijava.ops.engine.conversionLoss.impl to therapi.runtime.javadoc, org.scijava; + opens org.scijava.ops.engine.adapt.complexLift to therapi.runtime.javadoc; + opens org.scijava.ops.engine.adapt.lift to therapi.runtime.javadoc; + opens org.scijava.ops.engine.struct to therapi.runtime.javadoc; + opens org.scijava.ops.engine.adapt.functional to therapi.runtime.javadoc; + opens org.scijava.ops.engine.hint to therapi.runtime.javadoc; + opens org.scijava.ops.engine.stats to therapi.runtime.javadoc; + opens org.scijava.ops.engine.util to therapi.runtime.javadoc; + opens org.scijava.ops.engine.math to therapi.runtime.javadoc; + + requires java.desktop; + + requires org.scijava; + requires org.scijava.function; + requires org.scijava.struct; + requires org.scijava.ops.api; + requires org.scijava.ops.discovery; + requires org.scijava.ops.spi; + requires org.scijava.types; + requires javassist; + requires java.compiler; + requires therapi.runtime.javadoc; + + uses javax.annotation.processing.Processor; +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/BaseOpHints.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/BaseOpHints.java similarity index 94% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/BaseOpHints.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/BaseOpHints.java index 647222a02..3eeed8b44 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/BaseOpHints.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/BaseOpHints.java @@ -1,4 +1,4 @@ -package org.scijava.ops.hints; +package org.scijava.ops.engine; import java.lang.annotation.Annotation; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpExecutionException.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpExecutionException.java similarity index 86% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpExecutionException.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpExecutionException.java index 7d9b07185..365c69a42 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpExecutionException.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpExecutionException.java @@ -26,22 +26,21 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.scijava.ops; + +package org.scijava.ops.engine; /** * Thrown to indicate that an Op failed in its execution * * @author Gabriel Selzer - * */ public class OpExecutionException extends RuntimeException { /** - * Constructs a OpExecutionException with the specified reason for - * failure. + * Constructs a OpExecutionException with the specified reason + * for failure. * - * @param s - * the reason for the failure + * @param s the reason for the failure */ public OpExecutionException(String s) { super(s); @@ -50,21 +49,18 @@ public OpExecutionException(String s) { /** * Constructs a OpExecutionException with the specified cause. * - * @param cause - * the cause of the failure + * @param cause the cause of the failure */ public OpExecutionException(Throwable cause) { super(cause); } /** - * Constructs a OpExecutionException with the specified reason for - * failure and cause. + * Constructs a OpExecutionException with the specified reason + * for failure and cause. * - * @param message - * the reason for the failure - * @param cause - * the cause of the failure + * @param message the reason for the failure + * @param cause the cause of the failure */ public OpExecutionException(String message, Throwable cause) { super(message, cause); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpHistoryService.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpHistoryService.java similarity index 62% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpHistoryService.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpHistoryService.java index 8318d434d..41e25ba0c 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/OpHistoryService.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpHistoryService.java @@ -1,5 +1,6 @@ -package org.scijava.ops.provenance; +package org.scijava.ops.engine; +import org.scijava.ops.api.OpHistory; import org.scijava.service.SciJavaService; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpInstance.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpInstance.java similarity index 91% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpInstance.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpInstance.java index 9b37948f7..313c7cf5c 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpInstance.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpInstance.java @@ -1,10 +1,12 @@ -package org.scijava.ops; +package org.scijava.ops.engine; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.Map; import java.util.Objects; +import org.scijava.ops.api.OpInfo; + /** * An instance of an {@link OpInfo} * diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpService.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpService.java similarity index 75% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpService.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpService.java index 150871589..e55b654d6 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpService.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/OpService.java @@ -26,25 +26,21 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.scijava.ops; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.ops.impl.DefaultOpEnvironment; -import org.scijava.plugin.Plugin; -import org.scijava.service.AbstractService; +package org.scijava.ops.engine; + +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpEnvironment; import org.scijava.service.SciJavaService; -import org.scijava.service.Service; /** * Service to provide a list of available ops structured in a prefix tree and to * search for ops matching specified types. * + * @author Gabriel Selzer * @author David Kolb */ -@Plugin(type = Service.class) -public class OpService extends AbstractService implements SciJavaService { - - private OpEnvironment env; +public interface OpService extends SciJavaService { /** * Begins declaration of an op matching request for locating an op with a @@ -56,20 +52,9 @@ public class OpService extends AbstractService implements SciJavaService { * @return An {@link OpBuilder} for refining the search criteria for an op. * @see OpBuilder */ - public OpBuilder op(final String opName) { - return env().op(opName); - } + public OpBuilder op(final String opName); /** Retrieves the motherlode of available ops. */ - public OpEnvironment env() { - if (env == null) initEnv(); - return env; - } - - // -- Helper methods - lazy initialization -- + public OpEnvironment env(); - private synchronized void initEnv() { - if (env != null) return; - env = new DefaultOpEnvironment(context()); - } } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.java index 9a4bbae1c..12ab0d16a 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.java @@ -66,7 +66,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import java.util.function.BiFunction; import java.util.function.Function; @@ -74,9 +74,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -88,8 +88,6 @@ public class ComputersToFunctionsAndLift { @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer1ToFunction1AndLiftViaSource implements Function, Function, Iterable>> { @@ -98,6 +96,10 @@ public static class Computer1ToFunction1AndLiftViaSource @OpDependency(name = "adapt", adaptable = false) Function, Function, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Function, Iterable> apply(Computers.Arity1 computer) { return lifter.apply(adaptor.apply(computer)); @@ -106,8 +108,6 @@ public Function, Iterable> apply(Computers.Arity1 computer) } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer2ToFunction2AndLiftViaSource implements Function, BiFunction, Iterable, Iterable>> { @@ -116,6 +116,10 @@ public static class Computer2ToFunction2AndLiftViaSource @OpDependency(name = "adapt", adaptable = false) Function, BiFunction, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public BiFunction, Iterable, Iterable> apply(Computers.Arity2 computer) { return lifter.apply(adaptor.apply(computer)); @@ -124,8 +128,6 @@ public BiFunction, Iterable, Iterable> apply(Computers.Arity } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer3ToFunction3AndLiftViaSource implements Function, Functions.Arity3, Iterable, Iterable, Iterable>> { @@ -134,6 +136,10 @@ public static class Computer3ToFunction3AndLiftViaSource @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity3, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity3, Iterable, Iterable, Iterable> apply(Computers.Arity3 computer) { return lifter.apply(adaptor.apply(computer)); @@ -142,8 +148,6 @@ public Functions.Arity3, Iterable, Iterable, Iterable> a } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer4ToFunction4AndLiftViaSource implements Function, Functions.Arity4, Iterable, Iterable, Iterable, Iterable>> { @@ -152,6 +156,10 @@ public static class Computer4ToFunction4AndLiftViaSource @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity4, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity4, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity4 computer) { return lifter.apply(adaptor.apply(computer)); @@ -160,8 +168,6 @@ public Functions.Arity4, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer5ToFunction5AndLiftViaSource implements Function, Functions.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -170,6 +176,10 @@ public static class Computer5ToFunction5AndLiftViaSource @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity5 computer) { return lifter.apply(adaptor.apply(computer)); @@ -178,8 +188,6 @@ public Functions.Arity5, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer6ToFunction6AndLiftViaSource implements Function, Functions.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -188,6 +196,10 @@ public static class Computer6ToFunction6AndLiftViaSource, Functions.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity6 computer) { return lifter.apply(adaptor.apply(computer)); @@ -196,8 +208,6 @@ public Functions.Arity6, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer7ToFunction7AndLiftViaSource implements Function, Functions.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -206,6 +216,10 @@ public static class Computer7ToFunction7AndLiftViaSource, Functions.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity7 computer) { return lifter.apply(adaptor.apply(computer)); @@ -214,8 +228,6 @@ public Functions.Arity7, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer8ToFunction8AndLiftViaSource implements Function, Functions.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -224,6 +236,10 @@ public static class Computer8ToFunction8AndLiftViaSource, Functions.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity8 computer) { return lifter.apply(adaptor.apply(computer)); @@ -232,8 +248,6 @@ public Functions.Arity8, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer9ToFunction9AndLiftViaSource implements Function, Functions.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -242,6 +256,10 @@ public static class Computer9ToFunction9AndLiftViaSource, Functions.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity9 computer) { return lifter.apply(adaptor.apply(computer)); @@ -250,8 +268,6 @@ public Functions.Arity9, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer10ToFunction10AndLiftViaSource implements Function, Functions.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -260,6 +276,10 @@ public static class Computer10ToFunction10AndLiftViaSource, Functions.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity10 computer) { return lifter.apply(adaptor.apply(computer)); @@ -268,8 +288,6 @@ public Functions.Arity10, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer11ToFunction11AndLiftViaSource implements Function, Functions.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -278,6 +296,10 @@ public static class Computer11ToFunction11AndLiftViaSource, Functions.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity11 computer) { return lifter.apply(adaptor.apply(computer)); @@ -286,8 +308,6 @@ public Functions.Arity11, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer12ToFunction12AndLiftViaSource implements Function, Functions.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -296,6 +316,10 @@ public static class Computer12ToFunction12AndLiftViaSource, Functions.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity12 computer) { return lifter.apply(adaptor.apply(computer)); @@ -304,8 +328,6 @@ public Functions.Arity12, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer13ToFunction13AndLiftViaSource implements Function, Functions.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -314,6 +336,10 @@ public static class Computer13ToFunction13AndLiftViaSource, Functions.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity13 computer) { return lifter.apply(adaptor.apply(computer)); @@ -322,8 +348,6 @@ public Functions.Arity13, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer14ToFunction14AndLiftViaSource implements Function, Functions.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -332,6 +356,10 @@ public static class Computer14ToFunction14AndLiftViaSource, Functions.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity14 computer) { return lifter.apply(adaptor.apply(computer)); @@ -340,8 +368,6 @@ public Functions.Arity14, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer15ToFunction15AndLiftViaSource implements Function, Functions.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -350,6 +376,10 @@ public static class Computer15ToFunction15AndLiftViaSource, Functions.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity15 computer) { return lifter.apply(adaptor.apply(computer)); @@ -358,8 +388,6 @@ public Functions.Arity15, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer16ToFunction16AndLiftViaSource implements Function, Functions.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -368,6 +396,10 @@ public static class Computer16ToFunction16AndLiftViaSource, Functions.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public Functions.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply(Computers.Arity16 computer) { return lifter.apply(adaptor.apply(computer)); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.java index 6dcf8b8b2..b44b16657 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.java @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import java.util.function.BiFunction; import java.util.function.Function; @@ -40,9 +40,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -55,8 +55,6 @@ public class FunctionsToComputersAndLift { @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function1ToComputer1AndLiftAfter implements Function, Computers.Arity1, Iterable>> { @@ -66,6 +64,10 @@ public static class Function1ToComputer1AndLiftAfter implements @OpDependency(name = "adapt", adaptable = false) Function, Computers.Arity1, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity1, Iterable> apply( Function function) @@ -76,8 +78,6 @@ public Computers.Arity1, Iterable> apply( } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function1ToComputer1AndLiftBefore implements Function, Computers.Arity1, Iterable>> { @@ -87,6 +87,10 @@ public static class Function1ToComputer1AndLiftBefore implements @OpDependency(name = "adapt", adaptable = false) Function, Function, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity1, Iterable> apply( Function function) @@ -97,8 +101,6 @@ public Computers.Arity1, Iterable> apply( } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function2ToComputer2AndLiftAfter implements Function, Computers.Arity2, Iterable, Iterable>> { @@ -108,6 +110,10 @@ public static class Function2ToComputer2AndLiftAfter implements @OpDependency(name = "adapt", adaptable = false) Function, Computers.Arity2, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity2, Iterable, Iterable> apply( BiFunction function) @@ -118,8 +124,6 @@ public Computers.Arity2, Iterable, Iterable> apply( } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function2ToComputer2AndLiftBefore implements Function, Computers.Arity2, Iterable, Iterable>> { @@ -129,6 +133,10 @@ public static class Function2ToComputer2AndLiftBefore implements @OpDependency(name = "adapt", adaptable = false) Function, BiFunction, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity2, Iterable, Iterable> apply( BiFunction function) @@ -139,8 +147,6 @@ public Computers.Arity2, Iterable, Iterable> apply( } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function3ToComputer3AndLiftAfter implements Function, Computers.Arity3, Iterable, Iterable, Iterable>> { @@ -150,6 +156,10 @@ public static class Function3ToComputer3AndLiftAfter implements @OpDependency(name = "adapt", adaptable = false) Function, Computers.Arity3, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity3, Iterable, Iterable, Iterable> apply( Functions.Arity3 function) @@ -160,8 +170,6 @@ public Computers.Arity3, Iterable, Iterable, Iterable> a } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function3ToComputer3AndLiftBefore implements Function, Computers.Arity3, Iterable, Iterable, Iterable>> { @@ -171,6 +179,10 @@ public static class Function3ToComputer3AndLiftBefore implements @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity3, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity3, Iterable, Iterable, Iterable> apply( Functions.Arity3 function) @@ -181,8 +193,6 @@ public Computers.Arity3, Iterable, Iterable, Iterable> a } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function4ToComputer4AndLiftAfter implements Function, Computers.Arity4, Iterable, Iterable, Iterable, Iterable>> { @@ -192,6 +202,10 @@ public static class Function4ToComputer4AndLiftAfter implemen @OpDependency(name = "adapt", adaptable = false) Function, Computers.Arity4, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity4, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity4 function) @@ -202,8 +216,6 @@ public Computers.Arity4, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function4ToComputer4AndLiftBefore implements Function, Computers.Arity4, Iterable, Iterable, Iterable, Iterable>> { @@ -213,6 +225,10 @@ public static class Function4ToComputer4AndLiftBefore impleme @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity4, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity4, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity4 function) @@ -223,8 +239,6 @@ public Computers.Arity4, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function5ToComputer5AndLiftAfter implements Function, Computers.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -234,6 +248,10 @@ public static class Function5ToComputer5AndLiftAfter impl @OpDependency(name = "adapt", adaptable = false) Function, Computers.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity5 function) @@ -244,8 +262,6 @@ public Computers.Arity5, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function5ToComputer5AndLiftBefore implements Function, Computers.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -255,6 +271,10 @@ public static class Function5ToComputer5AndLiftBefore imp @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity5 function) @@ -265,8 +285,6 @@ public Computers.Arity5, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function6ToComputer6AndLiftAfter implements Function, Computers.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -276,6 +294,10 @@ public static class Function6ToComputer6AndLiftAfter @OpDependency(name = "adapt", adaptable = false) Function, Computers.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity6 function) @@ -286,8 +308,6 @@ public Computers.Arity6, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function6ToComputer6AndLiftBefore implements Function, Computers.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -297,6 +317,10 @@ public static class Function6ToComputer6AndLiftBefore @OpDependency(name = "adapt", adaptable = false) Function, Functions.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity6 function) @@ -307,8 +331,6 @@ public Computers.Arity6, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function7ToComputer7AndLiftAfter implements Function, Computers.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -318,6 +340,10 @@ public static class Function7ToComputer7AndLiftAfter, Computers.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity7 function) @@ -328,8 +354,6 @@ public Computers.Arity7, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function7ToComputer7AndLiftBefore implements Function, Computers.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -339,6 +363,10 @@ public static class Function7ToComputer7AndLiftBefore, Functions.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity7 function) @@ -349,8 +377,6 @@ public Computers.Arity7, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function8ToComputer8AndLiftAfter implements Function, Computers.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -360,6 +386,10 @@ public static class Function8ToComputer8AndLiftAfter, Computers.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity8 function) @@ -370,8 +400,6 @@ public Computers.Arity8, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function8ToComputer8AndLiftBefore implements Function, Computers.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -381,6 +409,10 @@ public static class Function8ToComputer8AndLiftBefore, Functions.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity8 function) @@ -391,8 +423,6 @@ public Computers.Arity8, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function9ToComputer9AndLiftAfter implements Function, Computers.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -402,6 +432,10 @@ public static class Function9ToComputer9AndLiftAfter, Computers.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity9 function) @@ -412,8 +446,6 @@ public Computers.Arity9, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function9ToComputer9AndLiftBefore implements Function, Computers.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -423,6 +455,10 @@ public static class Function9ToComputer9AndLiftBefore, Functions.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity9 function) @@ -433,8 +469,6 @@ public Computers.Arity9, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function10ToComputer10AndLiftAfter implements Function, Computers.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -444,6 +478,10 @@ public static class Function10ToComputer10AndLiftAfter, Computers.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity10 function) @@ -454,8 +492,6 @@ public Computers.Arity10, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function10ToComputer10AndLiftBefore implements Function, Computers.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -465,6 +501,10 @@ public static class Function10ToComputer10AndLiftBefore, Functions.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity10 function) @@ -475,8 +515,6 @@ public Computers.Arity10, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function11ToComputer11AndLiftAfter implements Function, Computers.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -486,6 +524,10 @@ public static class Function11ToComputer11AndLiftAfter, Computers.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity11 function) @@ -496,8 +538,6 @@ public Computers.Arity11, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function11ToComputer11AndLiftBefore implements Function, Computers.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -507,6 +547,10 @@ public static class Function11ToComputer11AndLiftBefore, Functions.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity11 function) @@ -517,8 +561,6 @@ public Computers.Arity11, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function12ToComputer12AndLiftAfter implements Function, Computers.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -528,6 +570,10 @@ public static class Function12ToComputer12AndLiftAfter, Computers.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity12 function) @@ -538,8 +584,6 @@ public Computers.Arity12, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function12ToComputer12AndLiftBefore implements Function, Computers.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -549,6 +593,10 @@ public static class Function12ToComputer12AndLiftBefore, Functions.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity12 function) @@ -559,8 +607,6 @@ public Computers.Arity12, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function13ToComputer13AndLiftAfter implements Function, Computers.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -570,6 +616,10 @@ public static class Function13ToComputer13AndLiftAfter, Computers.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity13 function) @@ -580,8 +630,6 @@ public Computers.Arity13, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function13ToComputer13AndLiftBefore implements Function, Computers.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -591,6 +639,10 @@ public static class Function13ToComputer13AndLiftBefore, Functions.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity13 function) @@ -601,8 +653,6 @@ public Computers.Arity13, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function14ToComputer14AndLiftAfter implements Function, Computers.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -612,6 +662,10 @@ public static class Function14ToComputer14AndLiftAfter, Computers.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity14 function) @@ -622,8 +676,6 @@ public Computers.Arity14, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function14ToComputer14AndLiftBefore implements Function, Computers.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -633,6 +685,10 @@ public static class Function14ToComputer14AndLiftBefore, Functions.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity14 function) @@ -643,8 +699,6 @@ public Computers.Arity14, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function15ToComputer15AndLiftAfter implements Function, Computers.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -654,6 +708,10 @@ public static class Function15ToComputer15AndLiftAfter, Computers.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity15 function) @@ -664,8 +722,6 @@ public Computers.Arity15, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function15ToComputer15AndLiftBefore implements Function, Computers.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -675,6 +731,10 @@ public static class Function15ToComputer15AndLiftBefore, Functions.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity15 function) @@ -685,8 +745,6 @@ public Computers.Arity15, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function16ToComputer16AndLiftAfter implements Function, Computers.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -696,6 +754,10 @@ public static class Function16ToComputer16AndLiftAfter, Computers.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity16 function) @@ -706,8 +768,6 @@ public Computers.Arity16, Iterable, Iterable, Iterable, } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function16ToComputer16AndLiftBefore implements Function, Computers.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> { @@ -717,6 +777,10 @@ public static class Function16ToComputer16AndLiftBefore, Functions.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public Computers.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable> apply( Functions.Arity16 function) diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.java index 917007c54..2a1911fa1 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.java @@ -32,16 +32,16 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -54,14 +54,16 @@ public class ComputersToFunctionsViaFunction { @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer1ToFunction1ViaFunction implements Function, Function> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Function apply(Computers.Arity1 computer) { return (in) -> { @@ -74,14 +76,16 @@ public Function apply(Computers.Arity1 computer) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer2ToFunction2ViaFunction implements Function, BiFunction> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public BiFunction apply(Computers.Arity2 computer) { return (in1, in2) -> { @@ -94,14 +98,16 @@ public BiFunction apply(Computers.Arity2 computer) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer3ToFunction3ViaFunction implements Function, Functions.Arity3> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity3 apply(Computers.Arity3 computer) { return (in1, in2, in3) -> { @@ -114,14 +120,16 @@ public Functions.Arity3 apply(Computers.Arity3 com } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer4ToFunction4ViaFunction implements Function, Functions.Arity4> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity4 apply(Computers.Arity4 computer) { return (in1, in2, in3, in4) -> { @@ -134,14 +142,16 @@ public Functions.Arity4 apply(Computers.Arity4 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity5 apply(Computers.Arity5 computer) { return (in1, in2, in3, in4, in5) -> { @@ -154,14 +164,16 @@ public Functions.Arity5 apply(Computers.Arity5 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity6 apply(Computers.Arity6 computer) { return (in1, in2, in3, in4, in5, in6) -> { @@ -174,14 +186,16 @@ public Functions.Arity6 apply(Computers.Arity6 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity7 apply(Computers.Arity7 computer) { return (in1, in2, in3, in4, in5, in6, in7) -> { @@ -194,14 +208,16 @@ public Functions.Arity7 apply(Computers.Arity7 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity8 apply(Computers.Arity8 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8) -> { @@ -214,14 +230,16 @@ public Functions.Arity8 apply(Computers.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer9ToFunction9ViaFunction implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity9 apply(Computers.Arity9 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9) -> { @@ -234,14 +252,16 @@ public Functions.Arity9 apply(Computers.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer10ToFunction10ViaFunction implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity10 apply(Computers.Arity10 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10) -> { @@ -254,14 +274,16 @@ public Functions.Arity10 apply(Compu } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer11ToFunction11ViaFunction implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity11 apply(Computers.Arity11 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11) -> { @@ -274,14 +296,16 @@ public Functions.Arity11 apply( } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer12ToFunction12ViaFunction implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity12 apply(Computers.Arity12 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12) -> { @@ -294,14 +318,16 @@ public Functions.Arity12 a } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer13ToFunction13ViaFunction implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity13 apply(Computers.Arity13 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13) -> { @@ -314,14 +340,16 @@ public Functions.Arity13 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity14 apply(Computers.Arity14 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14) -> { @@ -334,14 +362,16 @@ public Functions.Arity14 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity15 apply(Computers.Arity15 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15) -> { @@ -354,14 +384,16 @@ public Functions.Arity15 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public Functions.Arity16 apply(Computers.Arity16 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16) -> { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.java index 25b0b9965..dda01ba59 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.java @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; @@ -41,9 +41,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Producer; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -56,14 +56,16 @@ public class ComputersToFunctionsViaSource { @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer0ToFunction0ViaSource implements Function, Producer> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Producer apply(Computers.Arity0 computer) { return () -> { @@ -76,14 +78,16 @@ public Producer apply(Computers.Arity0 computer) { } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer1ToFunction1ViaSource implements Function, Function> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Function apply(Computers.Arity1 computer) { return (in) -> { @@ -96,14 +100,16 @@ public Function apply(Computers.Arity1 computer) { } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer2ToFunction2ViaSource implements Function, BiFunction> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public BiFunction apply(Computers.Arity2 computer) { return (in1, in2) -> { @@ -116,14 +122,16 @@ public BiFunction apply(Computers.Arity2 computer) { } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer3ToFunction3ViaSource implements Function, Functions.Arity3> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity3 apply(Computers.Arity3 computer) { return (in1, in2, in3) -> { @@ -136,14 +144,16 @@ public Functions.Arity3 apply(Computers.Arity3 com } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer4ToFunction4ViaSource implements Function, Functions.Arity4> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity4 apply(Computers.Arity4 computer) { return (in1, in2, in3, in4) -> { @@ -156,14 +166,16 @@ public Functions.Arity4 apply(Computers.Arity4 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity5 apply(Computers.Arity5 computer) { return (in1, in2, in3, in4, in5) -> { @@ -176,14 +188,16 @@ public Functions.Arity5 apply(Computers.Arity5 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity6 apply(Computers.Arity6 computer) { return (in1, in2, in3, in4, in5, in6) -> { @@ -196,14 +210,16 @@ public Functions.Arity6 apply(Computers.Arity6 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity7 apply(Computers.Arity7 computer) { return (in1, in2, in3, in4, in5, in6, in7) -> { @@ -216,14 +232,16 @@ public Functions.Arity7 apply(Computers.Arity7 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity8 apply(Computers.Arity8 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8) -> { @@ -236,14 +254,16 @@ public Functions.Arity8 apply(Computers.Arity } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer9ToFunction9ViaSource implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity9 apply(Computers.Arity9 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9) -> { @@ -256,14 +276,16 @@ public Functions.Arity9 apply(Computers.A } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer10ToFunction10ViaSource implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity10 apply(Computers.Arity10 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10) -> { @@ -276,14 +298,16 @@ public Functions.Arity10 apply(Compu } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer11ToFunction11ViaSource implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity11 apply(Computers.Arity11 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11) -> { @@ -296,14 +320,16 @@ public Functions.Arity11 apply( } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer12ToFunction12ViaSource implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity12 apply(Computers.Arity12 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12) -> { @@ -316,14 +342,16 @@ public Functions.Arity12 a } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer13ToFunction13ViaSource implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity13 apply(Computers.Arity13 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13) -> { @@ -336,14 +364,16 @@ public Functions.Arity13 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity14 apply(Computers.Arity14 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14) -> { @@ -356,14 +386,16 @@ public Functions.Arity14 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity15 apply(Computers.Arity15 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15) -> { @@ -376,14 +408,16 @@ public Functions.Arity15 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public Functions.Arity16 apply(Computers.Arity16 computer) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16) -> { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.java index c4291efce..9e029b654 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.java @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; @@ -40,9 +40,9 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Producer; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -55,13 +55,15 @@ public class FunctionsToComputers { @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function0ToComputer0 implements Function, Computers.Arity0> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity0 apply(Producer function) { return (out) -> { @@ -73,13 +75,15 @@ public Computers.Arity0 apply(Producer function) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function1ToComputer1 implements Function, Computers.Arity1> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity1 apply(Function function) { return (in, out) -> { @@ -91,13 +95,15 @@ public Computers.Arity1 apply(Function function) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function2ToComputer2 implements Function, Computers.Arity2> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity2 apply(BiFunction function) { return (in1, in2, out) -> { @@ -109,13 +115,15 @@ public Computers.Arity2 apply(BiFunction function) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function3ToComputer3 implements Function, Computers.Arity3> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity3 apply(Functions.Arity3 function) { return (in1, in2, in3, out) -> { @@ -127,13 +135,15 @@ public Computers.Arity3 apply(Functions.Arity3 fun } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function4ToComputer4 implements Function, Computers.Arity4> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity4 apply(Functions.Arity4 function) { return (in1, in2, in3, in4, out) -> { @@ -145,13 +155,15 @@ public Computers.Arity4 apply(Functions.Arity4 implements Function, Computers.Arity5> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity5 apply(Functions.Arity5 function) { return (in1, in2, in3, in4, in5, out) -> { @@ -163,13 +175,15 @@ public Computers.Arity5 apply(Functions.Arity5 implements Function, Computers.Arity6> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity6 apply(Functions.Arity6 function) { return (in1, in2, in3, in4, in5, in6, out) -> { @@ -181,13 +195,15 @@ public Computers.Arity6 apply(Functions.Arity6 implements Function, Computers.Arity7> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity7 apply(Functions.Arity7 function) { return (in1, in2, in3, in4, in5, in6, in7, out) -> { @@ -199,13 +215,15 @@ public Computers.Arity7 apply(Functions.Arity7 implements Function, Computers.Arity8> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity8 apply(Functions.Arity8 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, out) -> { @@ -217,13 +235,15 @@ public Computers.Arity8 apply(Functions.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function9ToComputer9 implements Function, Computers.Arity9> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity9 apply(Functions.Arity9 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, out) -> { @@ -235,13 +255,15 @@ public Computers.Arity9 apply(Functions.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function10ToComputer10 implements Function, Computers.Arity10> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity10 apply(Functions.Arity10 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out) -> { @@ -253,13 +275,15 @@ public Computers.Arity10 apply(Funct } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function11ToComputer11 implements Function, Computers.Arity11> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity11 apply(Functions.Arity11 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out) -> { @@ -271,13 +295,15 @@ public Computers.Arity11 apply( } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function12ToComputer12 implements Function, Computers.Arity12> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity12 apply(Functions.Arity12 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out) -> { @@ -289,13 +315,15 @@ public Computers.Arity12 a } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function13ToComputer13 implements Function, Computers.Arity13> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity13 apply(Functions.Arity13 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out) -> { @@ -307,13 +335,15 @@ public Computers.Arity13 implements Function, Computers.Arity14> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity14 apply(Functions.Arity14 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out) -> { @@ -325,13 +355,15 @@ public Computers.Arity14 implements Function, Computers.Arity15> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity15 apply(Functions.Arity15 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out) -> { @@ -343,13 +375,15 @@ public Computers.Arity15 implements Function, Computers.Arity16> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public Computers.Arity16 apply(Functions.Arity16 function) { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out) -> { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.java similarity index 91% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.java index 8422cabc9..e97a194e1 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.java @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; @@ -40,11 +40,11 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpField; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -57,8 +57,6 @@ public class InplacesToFunctions { @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace1ToFunction1 implements Function, Function> { @OpDependency(name = "create", adaptable = false) @@ -66,6 +64,10 @@ static class Inplace1ToFunction1 implements Function, Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Function apply(Inplaces.Arity1 t) { return (IO io) -> { @@ -78,8 +80,6 @@ public Function apply(Inplaces.Arity1 t) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace2_1ToFunction2 implements Function, BiFunction> { @OpDependency(name = "create", adaptable = false) @@ -87,6 +87,10 @@ static class Inplace2_1ToFunction2 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public BiFunction apply(Inplaces.Arity2_1 t) { return (IO io, I2 in2) -> { @@ -99,8 +103,6 @@ public BiFunction apply(Inplaces.Arity2_1 t) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace2_2ToFunction2 implements Function, BiFunction> { @OpDependency(name = "create", adaptable = false) @@ -108,6 +110,10 @@ static class Inplace2_2ToFunction2 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public BiFunction apply(Inplaces.Arity2_2 t) { return (I1 in1, IO io) -> { @@ -120,8 +126,6 @@ public BiFunction apply(Inplaces.Arity2_2 t) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace3_1ToFunction3 implements Function, Functions.Arity3> { @OpDependency(name = "create", adaptable = false) @@ -129,6 +133,10 @@ static class Inplace3_1ToFunction3 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity3 apply(Inplaces.Arity3_1 t) { return (IO io, I2 in2, I3 in3) -> { @@ -141,8 +149,6 @@ public Functions.Arity3 apply(Inplaces.Arity3_1 t) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace3_2ToFunction3 implements Function, Functions.Arity3> { @OpDependency(name = "create", adaptable = false) @@ -150,6 +156,10 @@ static class Inplace3_2ToFunction3 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity3 apply(Inplaces.Arity3_2 t) { return (I1 in1, IO io, I3 in3) -> { @@ -162,8 +172,6 @@ public Functions.Arity3 apply(Inplaces.Arity3_2 t) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace3_3ToFunction3 implements Function, Functions.Arity3> { @OpDependency(name = "create", adaptable = false) @@ -171,6 +179,10 @@ static class Inplace3_3ToFunction3 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity3 apply(Inplaces.Arity3_3 t) { return (I1 in1, I2 in2, IO io) -> { @@ -183,8 +195,6 @@ public Functions.Arity3 apply(Inplaces.Arity3_3 t) { } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace4_1ToFunction4 implements Function, Functions.Arity4> { @OpDependency(name = "create", adaptable = false) @@ -192,6 +202,10 @@ static class Inplace4_1ToFunction4 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity4 apply(Inplaces.Arity4_1 t) { return (IO io, I2 in2, I3 in3, I4 in4) -> { @@ -204,8 +218,6 @@ public Functions.Arity4 apply(Inplaces.Arity4_1 implements Function, Functions.Arity4> { @OpDependency(name = "create", adaptable = false) @@ -213,6 +225,10 @@ static class Inplace4_2ToFunction4 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity4 apply(Inplaces.Arity4_2 t) { return (I1 in1, IO io, I3 in3, I4 in4) -> { @@ -225,8 +241,6 @@ public Functions.Arity4 apply(Inplaces.Arity4_2 implements Function, Functions.Arity4> { @OpDependency(name = "create", adaptable = false) @@ -234,6 +248,10 @@ static class Inplace4_3ToFunction4 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity4 apply(Inplaces.Arity4_3 t) { return (I1 in1, I2 in2, IO io, I4 in4) -> { @@ -246,8 +264,6 @@ public Functions.Arity4 apply(Inplaces.Arity4_3 implements Function, Functions.Arity4> { @OpDependency(name = "create", adaptable = false) @@ -255,6 +271,10 @@ static class Inplace4_4ToFunction4 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity4 apply(Inplaces.Arity4_4 t) { return (I1 in1, I2 in2, I3 in3, IO io) -> { @@ -267,8 +287,6 @@ public Functions.Arity4 apply(Inplaces.Arity4_4 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) @@ -276,6 +294,10 @@ static class Inplace5_1ToFunction5 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity5 apply(Inplaces.Arity5_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5) -> { @@ -288,8 +310,6 @@ public Functions.Arity5 apply(Inplaces.Arity5_1 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) @@ -297,6 +317,10 @@ static class Inplace5_2ToFunction5 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity5 apply(Inplaces.Arity5_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5) -> { @@ -309,8 +333,6 @@ public Functions.Arity5 apply(Inplaces.Arity5_2 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) @@ -318,6 +340,10 @@ static class Inplace5_3ToFunction5 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity5 apply(Inplaces.Arity5_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5) -> { @@ -330,8 +356,6 @@ public Functions.Arity5 apply(Inplaces.Arity5_3 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) @@ -339,6 +363,10 @@ static class Inplace5_4ToFunction5 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity5 apply(Inplaces.Arity5_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5) -> { @@ -351,8 +379,6 @@ public Functions.Arity5 apply(Inplaces.Arity5_4 implements Function, Functions.Arity5> { @OpDependency(name = "create", adaptable = false) @@ -360,6 +386,10 @@ static class Inplace5_5ToFunction5 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity5 apply(Inplaces.Arity5_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io) -> { @@ -372,8 +402,6 @@ public Functions.Arity5 apply(Inplaces.Arity5_5 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) @@ -381,6 +409,10 @@ static class Inplace6_1ToFunction6 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity6 apply(Inplaces.Arity6_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6) -> { @@ -393,8 +425,6 @@ public Functions.Arity6 apply(Inplaces.Arity6_1 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) @@ -402,6 +432,10 @@ static class Inplace6_2ToFunction6 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity6 apply(Inplaces.Arity6_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6) -> { @@ -414,8 +448,6 @@ public Functions.Arity6 apply(Inplaces.Arity6_2 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) @@ -423,6 +455,10 @@ static class Inplace6_3ToFunction6 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity6 apply(Inplaces.Arity6_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6) -> { @@ -435,8 +471,6 @@ public Functions.Arity6 apply(Inplaces.Arity6_3 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) @@ -444,6 +478,10 @@ static class Inplace6_4ToFunction6 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity6 apply(Inplaces.Arity6_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6) -> { @@ -456,8 +494,6 @@ public Functions.Arity6 apply(Inplaces.Arity6_4 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) @@ -465,6 +501,10 @@ static class Inplace6_5ToFunction6 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity6 apply(Inplaces.Arity6_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6) -> { @@ -477,8 +517,6 @@ public Functions.Arity6 apply(Inplaces.Arity6_5 implements Function, Functions.Arity6> { @OpDependency(name = "create", adaptable = false) @@ -486,6 +524,10 @@ static class Inplace6_6ToFunction6 implements Function copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity6 apply(Inplaces.Arity6_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io) -> { @@ -498,8 +540,6 @@ public Functions.Arity6 apply(Inplaces.Arity6_6 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -507,6 +547,10 @@ static class Inplace7_1ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7) -> { @@ -519,8 +563,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_1< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace7_2ToFunction7 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -528,6 +570,10 @@ static class Inplace7_2ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7) -> { @@ -540,8 +586,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_2< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace7_3ToFunction7 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -549,6 +593,10 @@ static class Inplace7_3ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7) -> { @@ -561,8 +609,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_3< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace7_4ToFunction7 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -570,6 +616,10 @@ static class Inplace7_4ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7) -> { @@ -582,8 +632,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_4< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace7_5ToFunction7 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -591,6 +639,10 @@ static class Inplace7_5ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7) -> { @@ -603,8 +655,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_5< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace7_6ToFunction7 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -612,6 +662,10 @@ static class Inplace7_6ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7) -> { @@ -624,8 +678,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_6< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace7_7ToFunction7 implements Function, Functions.Arity7> { @OpDependency(name = "create", adaptable = false) @@ -633,6 +685,10 @@ static class Inplace7_7ToFunction7 implements Functi @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity7 apply(Inplaces.Arity7_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io) -> { @@ -645,8 +701,6 @@ public Functions.Arity7 apply(Inplaces.Arity7_7< } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_1ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -654,6 +708,10 @@ static class Inplace8_1ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8) -> { @@ -666,8 +724,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_2ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -675,6 +731,10 @@ static class Inplace8_2ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8) -> { @@ -687,8 +747,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_3ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -696,6 +754,10 @@ static class Inplace8_3ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8) -> { @@ -708,8 +770,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_4ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -717,6 +777,10 @@ static class Inplace8_4ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8) -> { @@ -729,8 +793,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_5ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -738,6 +800,10 @@ static class Inplace8_5ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8) -> { @@ -750,8 +816,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_6ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -759,6 +823,10 @@ static class Inplace8_6ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8) -> { @@ -771,8 +839,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_7ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -780,6 +846,10 @@ static class Inplace8_7ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8) -> { @@ -792,8 +862,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace8_8ToFunction8 implements Function, Functions.Arity8> { @OpDependency(name = "create", adaptable = false) @@ -801,6 +869,10 @@ static class Inplace8_8ToFunction8 implements Fu @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity8 apply(Inplaces.Arity8_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io) -> { @@ -813,8 +885,6 @@ public Functions.Arity8 apply(Inplaces.Arity } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_1ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -822,6 +892,10 @@ static class Inplace9_1ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9) -> { @@ -834,8 +908,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_2ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -843,6 +915,10 @@ static class Inplace9_2ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9) -> { @@ -855,8 +931,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_3ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -864,6 +938,10 @@ static class Inplace9_3ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9) -> { @@ -876,8 +954,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_4ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -885,6 +961,10 @@ static class Inplace9_4ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9) -> { @@ -897,8 +977,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_5ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -906,6 +984,10 @@ static class Inplace9_5ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9) -> { @@ -918,8 +1000,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_6ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -927,6 +1007,10 @@ static class Inplace9_6ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9) -> { @@ -939,8 +1023,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_7ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -948,6 +1030,10 @@ static class Inplace9_7ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9) -> { @@ -960,8 +1046,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_8ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -969,6 +1053,10 @@ static class Inplace9_8ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9) -> { @@ -981,8 +1069,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace9_9ToFunction9 implements Function, Functions.Arity9> { @OpDependency(name = "create", adaptable = false) @@ -990,6 +1076,10 @@ static class Inplace9_9ToFunction9 implement @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity9 apply(Inplaces.Arity9_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io) -> { @@ -1002,8 +1092,6 @@ public Functions.Arity9 apply(Inplaces.A } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_1ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1011,6 +1099,10 @@ static class Inplace10_1ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10) -> { @@ -1023,8 +1115,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_2ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1032,6 +1122,10 @@ static class Inplace10_2ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10) -> { @@ -1044,8 +1138,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_3ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1053,6 +1145,10 @@ static class Inplace10_3ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10) -> { @@ -1065,8 +1161,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_4ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1074,6 +1168,10 @@ static class Inplace10_4ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10) -> { @@ -1086,8 +1184,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_5ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1095,6 +1191,10 @@ static class Inplace10_5ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10) -> { @@ -1107,8 +1207,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_6ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1116,6 +1214,10 @@ static class Inplace10_6ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10) -> { @@ -1128,8 +1230,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_7ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1137,6 +1237,10 @@ static class Inplace10_7ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10) -> { @@ -1149,8 +1253,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_8ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1158,6 +1260,10 @@ static class Inplace10_8ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10) -> { @@ -1170,8 +1276,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_9ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1179,6 +1283,10 @@ static class Inplace10_9ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10) -> { @@ -1191,8 +1299,6 @@ public Functions.Arity10 apply(Inpl } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace10_10ToFunction10 implements Function, Functions.Arity10> { @OpDependency(name = "create", adaptable = false) @@ -1200,6 +1306,10 @@ static class Inplace10_10ToFunction10 im @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity10 apply(Inplaces.Arity10_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io) -> { @@ -1212,8 +1322,6 @@ public Functions.Arity10 apply(Inpla } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_1ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1221,6 +1329,10 @@ static class Inplace11_1ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1233,8 +1345,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_2ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1242,6 +1352,10 @@ static class Inplace11_2ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1254,8 +1368,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_3ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1263,6 +1375,10 @@ static class Inplace11_3ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1275,8 +1391,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_4ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1284,6 +1398,10 @@ static class Inplace11_4ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1296,8 +1414,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_5ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1305,6 +1421,10 @@ static class Inplace11_5ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1317,8 +1437,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_6ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1326,6 +1444,10 @@ static class Inplace11_6ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1338,8 +1460,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_7ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1347,6 +1467,10 @@ static class Inplace11_7ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10, I11 in11) -> { @@ -1359,8 +1483,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_8ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1368,6 +1490,10 @@ static class Inplace11_8ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10, I11 in11) -> { @@ -1380,8 +1506,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_9ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1389,6 +1513,10 @@ static class Inplace11_9ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10, I11 in11) -> { @@ -1401,8 +1529,6 @@ public Functions.Arity11 apply } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_10ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1410,6 +1536,10 @@ static class Inplace11_10ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io, I11 in11) -> { @@ -1422,8 +1552,6 @@ public Functions.Arity11 apply( } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace11_11ToFunction11 implements Function, Functions.Arity11> { @OpDependency(name = "create", adaptable = false) @@ -1431,6 +1559,10 @@ static class Inplace11_11ToFunction11 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity11 apply(Inplaces.Arity11_11 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, IO io) -> { @@ -1443,8 +1575,6 @@ public Functions.Arity11 apply( } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_1ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1452,6 +1582,10 @@ static class Inplace12_1ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1464,8 +1598,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_2ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1473,6 +1605,10 @@ static class Inplace12_2ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1485,8 +1621,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_3ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1494,6 +1628,10 @@ static class Inplace12_3ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1506,8 +1644,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_4ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1515,6 +1651,10 @@ static class Inplace12_4ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1527,8 +1667,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_5ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1536,6 +1674,10 @@ static class Inplace12_5ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1548,8 +1690,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_6ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1557,6 +1697,10 @@ static class Inplace12_6ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1569,8 +1713,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_7ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1578,6 +1720,10 @@ static class Inplace12_7ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1590,8 +1736,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_8ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1599,6 +1743,10 @@ static class Inplace12_8ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10, I11 in11, I12 in12) -> { @@ -1611,8 +1759,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_9ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1620,6 +1766,10 @@ static class Inplace12_9ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10, I11 in11, I12 in12) -> { @@ -1632,8 +1782,6 @@ public Functions.Arity12 } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_10ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1641,6 +1789,10 @@ static class Inplace12_10ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io, I11 in11, I12 in12) -> { @@ -1653,8 +1805,6 @@ public Functions.Arity12 a } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_11ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1662,6 +1812,10 @@ static class Inplace12_11ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_11 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, IO io, I12 in12) -> { @@ -1674,8 +1828,6 @@ public Functions.Arity12 a } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace12_12ToFunction12 implements Function, Functions.Arity12> { @OpDependency(name = "create", adaptable = false) @@ -1683,6 +1835,10 @@ static class Inplace12_12ToFunction12 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity12 apply(Inplaces.Arity12_12 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, IO io) -> { @@ -1695,8 +1851,6 @@ public Functions.Arity12 a } @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace13_1ToFunction13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1704,6 +1858,10 @@ static class Inplace13_1ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1716,8 +1874,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1725,6 +1881,10 @@ static class Inplace13_2ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1737,8 +1897,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1746,6 +1904,10 @@ static class Inplace13_3ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1758,8 +1920,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1767,6 +1927,10 @@ static class Inplace13_4ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1779,8 +1943,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1788,6 +1950,10 @@ static class Inplace13_5ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1800,8 +1966,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1809,6 +1973,10 @@ static class Inplace13_6ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1821,8 +1989,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1830,6 +1996,10 @@ static class Inplace13_7ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1842,8 +2012,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1851,6 +2019,10 @@ static class Inplace13_8ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1863,8 +2035,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1872,6 +2042,10 @@ static class Inplace13_9ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10, I11 in11, I12 in12, I13 in13) -> { @@ -1884,8 +2058,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1893,6 +2065,10 @@ static class Inplace13_10ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io, I11 in11, I12 in12, I13 in13) -> { @@ -1905,8 +2081,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1914,6 +2088,10 @@ static class Inplace13_11ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_11 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, IO io, I12 in12, I13 in13) -> { @@ -1926,8 +2104,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1935,6 +2111,10 @@ static class Inplace13_12ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_12 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, IO io, I13 in13) -> { @@ -1947,8 +2127,6 @@ public Functions.Arity13 implements Function, Functions.Arity13> { @OpDependency(name = "create", adaptable = false) @@ -1956,6 +2134,10 @@ static class Inplace13_13ToFunction13 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity13 apply(Inplaces.Arity13_13 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, IO io) -> { @@ -1968,8 +2150,6 @@ public Functions.Arity13 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -1977,6 +2157,10 @@ static class Inplace14_1ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -1989,8 +2173,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -1998,6 +2180,10 @@ static class Inplace14_2ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2010,8 +2196,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2019,6 +2203,10 @@ static class Inplace14_3ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2031,8 +2219,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2040,6 +2226,10 @@ static class Inplace14_4ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2052,8 +2242,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2061,6 +2249,10 @@ static class Inplace14_5ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2073,8 +2265,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2082,6 +2272,10 @@ static class Inplace14_6ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2094,8 +2288,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2103,6 +2295,10 @@ static class Inplace14_7ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2115,8 +2311,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2124,6 +2318,10 @@ static class Inplace14_8ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2136,8 +2334,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2145,6 +2341,10 @@ static class Inplace14_9ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2157,8 +2357,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2166,6 +2364,10 @@ static class Inplace14_10ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io, I11 in11, I12 in12, I13 in13, I14 in14) -> { @@ -2178,8 +2380,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2187,6 +2387,10 @@ static class Inplace14_11ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_11 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, IO io, I12 in12, I13 in13, I14 in14) -> { @@ -2199,8 +2403,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2208,6 +2410,10 @@ static class Inplace14_12ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_12 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, IO io, I13 in13, I14 in14) -> { @@ -2220,8 +2426,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2229,6 +2433,10 @@ static class Inplace14_13ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_13 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, IO io, I14 in14) -> { @@ -2241,8 +2449,6 @@ public Functions.Arity14 implements Function, Functions.Arity14> { @OpDependency(name = "create", adaptable = false) @@ -2250,6 +2456,10 @@ static class Inplace14_14ToFunction14 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity14 apply(Inplaces.Arity14_14 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, IO io) -> { @@ -2262,8 +2472,6 @@ public Functions.Arity14 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2271,6 +2479,10 @@ static class Inplace15_1ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2283,8 +2495,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2292,6 +2502,10 @@ static class Inplace15_2ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2304,8 +2518,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2313,6 +2525,10 @@ static class Inplace15_3ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2325,8 +2541,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2334,6 +2548,10 @@ static class Inplace15_4ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2346,8 +2564,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2355,6 +2571,10 @@ static class Inplace15_5ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2367,8 +2587,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2376,6 +2594,10 @@ static class Inplace15_6ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2388,8 +2610,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2397,6 +2617,10 @@ static class Inplace15_7ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2409,8 +2633,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2418,6 +2640,10 @@ static class Inplace15_8ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2430,8 +2656,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2439,6 +2663,10 @@ static class Inplace15_9ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2451,8 +2679,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2460,6 +2686,10 @@ static class Inplace15_10ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2472,8 +2702,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2481,6 +2709,10 @@ static class Inplace15_11ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_11 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, IO io, I12 in12, I13 in13, I14 in14, I15 in15) -> { @@ -2493,8 +2725,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2502,6 +2732,10 @@ static class Inplace15_12ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_12 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, IO io, I13 in13, I14 in14, I15 in15) -> { @@ -2514,8 +2748,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2523,6 +2755,10 @@ static class Inplace15_13ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_13 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, IO io, I14 in14, I15 in15) -> { @@ -2535,8 +2771,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2544,6 +2778,10 @@ static class Inplace15_14ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_14 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, IO io, I15 in15) -> { @@ -2556,8 +2794,6 @@ public Functions.Arity15 implements Function, Functions.Arity15> { @OpDependency(name = "create", adaptable = false) @@ -2565,6 +2801,10 @@ static class Inplace15_15ToFunction15 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity15 apply(Inplaces.Arity15_15 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, IO io) -> { @@ -2577,8 +2817,6 @@ public Functions.Arity15 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2586,6 +2824,10 @@ static class Inplace16_1ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_1 t) { return (IO io, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2598,8 +2840,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2607,6 +2847,10 @@ static class Inplace16_2ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_2 t) { return (I1 in1, IO io, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2619,8 +2863,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2628,6 +2870,10 @@ static class Inplace16_3ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_3 t) { return (I1 in1, I2 in2, IO io, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2640,8 +2886,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2649,6 +2893,10 @@ static class Inplace16_4ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_4 t) { return (I1 in1, I2 in2, I3 in3, IO io, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2661,8 +2909,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2670,6 +2916,10 @@ static class Inplace16_5ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_5 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, IO io, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2682,8 +2932,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2691,6 +2939,10 @@ static class Inplace16_6ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_6 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, IO io, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2703,8 +2955,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2712,6 +2962,10 @@ static class Inplace16_7ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_7 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, IO io, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2724,8 +2978,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2733,6 +2985,10 @@ static class Inplace16_8ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_8 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, IO io, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2745,8 +3001,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2754,6 +3008,10 @@ static class Inplace16_9ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_9 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, IO io, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2766,8 +3024,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2775,6 +3031,10 @@ static class Inplace16_10ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_10 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, IO io, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2787,8 +3047,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2796,6 +3054,10 @@ static class Inplace16_11ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_11 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, IO io, I12 in12, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2808,8 +3070,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2817,6 +3077,10 @@ static class Inplace16_12ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_12 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, IO io, I13 in13, I14 in14, I15 in15, I16 in16) -> { @@ -2829,8 +3093,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2838,6 +3100,10 @@ static class Inplace16_13ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_13 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, IO io, I14 in14, I15 in15, I16 in16) -> { @@ -2850,8 +3116,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2859,6 +3123,10 @@ static class Inplace16_14ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_14 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, IO io, I15 in15, I16 in16) -> { @@ -2871,8 +3139,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2880,6 +3146,10 @@ static class Inplace16_15ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_15 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, IO io, I16 in16) -> { @@ -2892,8 +3162,6 @@ public Functions.Arity16 implements Function, Functions.Arity16> { @OpDependency(name = "create", adaptable = false) @@ -2901,6 +3169,10 @@ static class Inplace16_16ToFunction16 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public Functions.Arity16 apply(Inplaces.Arity16_16 t) { return (I1 in1, I2 in2, I3 in3, I4 in4, I5 in5, I6 in6, I7 in7, I8 in8, I9 in9, I10 in10, I11 in11, I12 in12, I13 in13, I14 in14, I15 in15, IO io) -> { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.java similarity index 96% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.java index 110be871c..bf4185998 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.java @@ -32,13 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.function.Function; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.java similarity index 95% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.java index 4a8d46954..75f6f0ec1 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.java @@ -32,15 +32,16 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.Iterator; import java.util.function.Function; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -55,8 +56,6 @@ public class ComputerToIterables { @OpField(names = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public final Function, Computers.Arity0>> liftComputer0 = (computer) -> { return (out) -> { @@ -68,8 +67,6 @@ public class ComputerToIterables, Computers.Arity1, Iterable>> liftComputer1 = (computer) -> { return (in, out) -> { @@ -82,8 +79,6 @@ public class ComputerToIterables, Computers.Arity2, Iterable, Iterable>> liftComputer2 = (computer) -> { return (in1, in2, out) -> { @@ -97,8 +92,6 @@ public class ComputerToIterables, Computers.Arity3, Iterable, Iterable, Iterable>> liftComputer3 = (computer) -> { return (in1, in2, in3, out) -> { @@ -113,8 +106,6 @@ public class ComputerToIterables, Computers.Arity4, Iterable, Iterable, Iterable, Iterable>> liftComputer4 = (computer) -> { return (in1, in2, in3, in4, out) -> { @@ -130,8 +121,6 @@ public class ComputerToIterables, Computers.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer5 = (computer) -> { return (in1, in2, in3, in4, in5, out) -> { @@ -148,8 +137,6 @@ public class ComputerToIterables, Computers.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer6 = (computer) -> { return (in1, in2, in3, in4, in5, in6, out) -> { @@ -167,8 +154,6 @@ public class ComputerToIterables, Computers.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer7 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, out) -> { @@ -187,8 +172,6 @@ public class ComputerToIterables, Computers.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer8 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, out) -> { @@ -208,8 +191,6 @@ public class ComputerToIterables, Computers.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer9 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, out) -> { @@ -230,8 +211,6 @@ public class ComputerToIterables, Computers.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer10 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out) -> { @@ -253,8 +232,6 @@ public class ComputerToIterables, Computers.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer11 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out) -> { @@ -277,8 +254,6 @@ public class ComputerToIterables, Computers.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer12 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out) -> { @@ -302,8 +277,6 @@ public class ComputerToIterables, Computers.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer13 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out) -> { @@ -328,8 +301,6 @@ public class ComputerToIterables, Computers.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer14 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out) -> { @@ -355,8 +326,6 @@ public class ComputerToIterables, Computers.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer15 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out) -> { @@ -383,8 +352,6 @@ public class ComputerToIterables, Computers.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftComputer16 = (computer) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out) -> { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.java similarity index 98% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.java index 74d03ee08..bc0ea45ea 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.java @@ -32,15 +32,17 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.lang.reflect.Array; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.java similarity index 93% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.java index 176831936..f945a6c8b 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.java @@ -32,16 +32,17 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.Iterator; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -60,8 +61,6 @@ public class FunctionToIterables, Function, Iterable>> liftFunction1 = (function) -> { return (in1) -> lazyIterable(itrs -> function.apply((I) itrs[0].next()), in1); @@ -69,8 +68,6 @@ public class FunctionToIterables, BiFunction, Iterable, Iterable>> liftFunction2 = (function) -> { return (in1, in2) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next()), in1, in2); @@ -78,8 +75,6 @@ public class FunctionToIterables, Functions.Arity3, Iterable, Iterable, Iterable>> liftFunction3 = (function) -> { return (in1, in2, in3) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next()), in1, in2, in3); @@ -87,8 +82,6 @@ public class FunctionToIterables, Functions.Arity4, Iterable, Iterable, Iterable, Iterable>> liftFunction4 = (function) -> { return (in1, in2, in3, in4) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next()), in1, in2, in3, in4); @@ -96,8 +89,6 @@ public class FunctionToIterables, Functions.Arity5, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction5 = (function) -> { return (in1, in2, in3, in4, in5) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next()), in1, in2, in3, in4, in5); @@ -105,8 +96,6 @@ public class FunctionToIterables, Functions.Arity6, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction6 = (function) -> { return (in1, in2, in3, in4, in5, in6) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next()), in1, in2, in3, in4, in5, in6); @@ -114,8 +103,6 @@ public class FunctionToIterables, Functions.Arity7, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction7 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next()), in1, in2, in3, in4, in5, in6, in7); @@ -123,8 +110,6 @@ public class FunctionToIterables, Functions.Arity8, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction8 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next()), in1, in2, in3, in4, in5, in6, in7, in8); @@ -132,8 +117,6 @@ public class FunctionToIterables, Functions.Arity9, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction9 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9); @@ -141,8 +124,6 @@ public class FunctionToIterables, Functions.Arity10, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction10 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); @@ -150,8 +131,6 @@ public class FunctionToIterables, Functions.Arity11, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction11 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next(), (I11) itrs[10].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); @@ -159,8 +138,6 @@ public class FunctionToIterables, Functions.Arity12, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction12 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next(), (I11) itrs[10].next(), (I12) itrs[11].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); @@ -168,8 +145,6 @@ public class FunctionToIterables, Functions.Arity13, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction13 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next(), (I11) itrs[10].next(), (I12) itrs[11].next(), (I13) itrs[12].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); @@ -177,8 +152,6 @@ public class FunctionToIterables, Functions.Arity14, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction14 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next(), (I11) itrs[10].next(), (I12) itrs[11].next(), (I13) itrs[12].next(), (I14) itrs[13].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); @@ -186,8 +159,6 @@ public class FunctionToIterables, Functions.Arity15, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction15 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next(), (I11) itrs[10].next(), (I12) itrs[11].next(), (I13) itrs[12].next(), (I14) itrs[13].next(), (I15) itrs[14].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); @@ -195,8 +166,6 @@ public class FunctionToIterables, Functions.Arity16, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable, Iterable>> liftFunction16 = (function) -> { return (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16) -> lazyIterable(itrs -> function.apply((I1) itrs[0].next(), (I2) itrs[1].next(), (I3) itrs[2].next(), (I4) itrs[3].next(), (I5) itrs[4].next(), (I6) itrs[5].next(), (I7) itrs[6].next(), (I8) itrs[7].next(), (I9) itrs[8].next(), (I10) itrs[9].next(), (I11) itrs[10].next(), (I12) itrs[11].next(), (I13) itrs[12].next(), (I14) itrs[13].next(), (I15) itrs[14].next(), (I16) itrs[15].next()), in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.java similarity index 97% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.java index 4a4b3429b..0aa712412 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.java @@ -32,13 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.function.Function; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LossReporter.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/LossReporter.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LossReporter.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/LossReporter.java index 4b98e7869..7e15781aa 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LossReporter.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/LossReporter.java @@ -1,5 +1,5 @@ -package org.scijava.ops.conversionLoss; +package org.scijava.ops.engine.conversionLoss; import java.lang.reflect.Type; import java.util.function.BiFunction; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LosslessReporter.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/LosslessReporter.java similarity index 83% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LosslessReporter.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/LosslessReporter.java index 47e2ddcae..ddfbabc8c 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LosslessReporter.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/LosslessReporter.java @@ -1,5 +1,5 @@ -package org.scijava.ops.conversionLoss; +package org.scijava.ops.engine.conversionLoss; import org.scijava.types.Nil; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/IdentityLossReporter.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/IdentityLossReporter.java new file mode 100644 index 000000000..979780587 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/IdentityLossReporter.java @@ -0,0 +1,31 @@ + +package org.scijava.ops.engine.conversionLoss.impl; + +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.conversionLoss.LossReporter; +import org.scijava.ops.spi.Op; +import org.scijava.plugin.Plugin; +import org.scijava.types.Nil; + +/** + * A {@link LossReporter} used when a type is not simplified. + * + * @author Gabriel Selzer + * @param - the type that is not being simplified. + */ +@OpHints(hints = {Simplification.FORBIDDEN}) +@Plugin(type = Op.class, name = "lossReporter") +public class IdentityLossReporter implements LossReporter { + + /** + * @param t the Nil describing the type that is being converted from + * @param u the Nil describing the type that is being converted to + * @return the worst-case loss converting from type T to type T (i.e. 0) + */ + @Override + public Double apply(Nil t, Nil u) { + return 0.; + } + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LossReporterWrapper.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/LossReporterWrapper.java similarity index 74% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LossReporterWrapper.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/LossReporterWrapper.java index 26fcbb1cd..b27977090 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/LossReporterWrapper.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/LossReporterWrapper.java @@ -1,14 +1,15 @@ -package org.scijava.ops.conversionLoss; +package org.scijava.ops.engine.conversionLoss.impl; import java.lang.reflect.Type; import java.util.UUID; -import org.scijava.ops.OpInfo; -import org.scijava.ops.hints.BaseOpHints.DependencyMatching; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.provenance.OpExecutionSummary; -import org.scijava.ops.provenance.OpHistory; -import org.scijava.ops.util.OpWrapper; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpExecutionSummary; +import org.scijava.ops.api.OpHistory; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpWrapper; +import org.scijava.ops.engine.BaseOpHints.DependencyMatching; +import org.scijava.ops.engine.conversionLoss.LossReporter; import org.scijava.plugin.Plugin; import org.scijava.types.GenericTyped; import org.scijava.types.Nil; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/PrimitiveArrayLossReporters.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/PrimitiveArrayLossReporters.java new file mode 100644 index 000000000..ae77082c1 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/PrimitiveArrayLossReporters.java @@ -0,0 +1,21 @@ +package org.scijava.ops.engine.conversionLoss.impl; + +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.conversionLoss.LossReporter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.plugin.Plugin; + +@Plugin(type = OpCollection.class) +public class PrimitiveArrayLossReporters { + + @OpHints(hints = {Simplification.FORBIDDEN}) + @OpField(names = "lossReporter") + public final LossReporter bArrIArr = (from, to) -> 0.; + + @OpHints(hints = {Simplification.FORBIDDEN}) + @OpField(names = "lossReporter") + public final LossReporter dArrIArr = (from, to) -> 0.; + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/PrimitiveLossReporters.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/PrimitiveLossReporters.java similarity index 87% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/PrimitiveLossReporters.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/PrimitiveLossReporters.java index c159ec686..8d959c9d3 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/PrimitiveLossReporters.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/PrimitiveLossReporters.java @@ -1,10 +1,11 @@ -package org.scijava.ops.conversionLoss; +package org.scijava.ops.engine.conversionLoss.impl; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.OpHints; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.conversionLoss.LossReporter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.types.Nil; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/package-info.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/package-info.java new file mode 100644 index 000000000..6da68b810 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/impl/package-info.java @@ -0,0 +1,2 @@ + +package org.scijava.ops.engine.conversionLoss.impl; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/package-info.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/package-info.java new file mode 100644 index 000000000..74cdc1756 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/conversionLoss/package-info.java @@ -0,0 +1,18 @@ +/** + * This package is intended to house classes dealing with the calculation of + * loss with respect to type conversion and Op simplification. + *

+ * This package is {@code exported}, and should be reserved for + * interfaces; implementations belong within + * {@link org.scijava.ops.engine.conversionLoss.impl} + *

+ * NB: These interfaces do not belong in SciJava Ops API as they are an + * implementation detail of simplification, which is an aspect of SciJava Ops + * Engine. + * + * @author Gabriel Selzer + * @see org.scijava.ops.engine.conversionLoss.impl + * @see org.scijava.ops.engine.simplify + */ + +package org.scijava.ops.engine.conversionLoss; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/copy/CopyOpCollection.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/copy/CopyOpCollection.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/copy/CopyOpCollection.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/copy/CopyOpCollection.java index 83975861d..ed692dd1c 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/copy/CopyOpCollection.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/copy/CopyOpCollection.java @@ -1,9 +1,9 @@ -package org.scijava.ops.copy; +package org.scijava.ops.engine.copy; import org.scijava.Priority; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/create/CreateOpCollection.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/create/CreateOpCollection.java similarity index 84% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/create/CreateOpCollection.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/create/CreateOpCollection.java index 3fbad7421..c931c7c30 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/create/CreateOpCollection.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/create/CreateOpCollection.java @@ -1,16 +1,19 @@ -package org.scijava.ops.create; +package org.scijava.ops.engine.create; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.Priority; import org.scijava.function.Producer; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; +/** + * Creation ops + * @author G + * + */ @Plugin(type = OpCollection.class) public class CreateOpCollection { @@ -29,6 +32,5 @@ public class CreateOpCollection { }; @OpField(names = "create", priority = Priority.HIGH) - @Parameter(key = "output") public static final Producer doubleSource = () -> 0.0; } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/AbstractHints.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/AbstractHints.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/AbstractHints.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/AbstractHints.java index 7ca7bb648..4da3db725 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/AbstractHints.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/AbstractHints.java @@ -1,11 +1,11 @@ -package org.scijava.ops.hints.impl; +package org.scijava.ops.engine.hint; import java.util.HashMap; import java.util.Map; import java.util.NoSuchElementException; import java.util.UUID; -import org.scijava.ops.hints.Hints; +import org.scijava.ops.api.Hints; /** * Abstract class containing behavior common to most {@link Hints} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/AdaptationHints.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/AdaptationHints.java similarity index 85% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/AdaptationHints.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/AdaptationHints.java index f151c8153..5c21613b4 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/AdaptationHints.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/AdaptationHints.java @@ -1,12 +1,12 @@ -package org.scijava.ops.hints.impl; +package org.scijava.ops.engine.hint; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.BaseOpHints.Adaptation; +import org.scijava.ops.api.Hints; +import org.scijava.ops.engine.BaseOpHints.Adaptation; /** * A set of {@link Hints} governing Adaptation procedures. diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/DefaultHints.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/DefaultHints.java similarity index 71% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/DefaultHints.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/DefaultHints.java index ef7862d4b..705217712 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/DefaultHints.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/DefaultHints.java @@ -1,13 +1,13 @@ -package org.scijava.ops.hints.impl; +package org.scijava.ops.engine.hint; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.BaseOpHints.DependencyMatching; -import org.scijava.ops.hints.BaseOpHints.Simplification; +import org.scijava.ops.api.Hints; +import org.scijava.ops.engine.BaseOpHints.Adaptation; +import org.scijava.ops.engine.BaseOpHints.DependencyMatching; +import org.scijava.ops.engine.BaseOpHints.Simplification; /** * Default Implementation of {@link Hints} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/ImmutableHints.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/ImmutableHints.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/ImmutableHints.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/ImmutableHints.java index 6e45e6e31..2eebad906 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/ImmutableHints.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/ImmutableHints.java @@ -1,10 +1,10 @@ -package org.scijava.ops.hints.impl; +package org.scijava.ops.engine.hint; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.scijava.ops.hints.Hints; +import org.scijava.ops.api.Hints; /** * A {@link Hints} not modifiable after creation. diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/SimplificationHints.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/SimplificationHints.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/SimplificationHints.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/SimplificationHints.java index b6d4b42f3..e87468a94 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/hints/impl/SimplificationHints.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/hint/SimplificationHints.java @@ -1,12 +1,12 @@ -package org.scijava.ops.hints.impl; +package org.scijava.ops.engine.hint; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.BaseOpHints.Simplification; +import org.scijava.ops.api.Hints; +import org.scijava.ops.engine.BaseOpHints.Simplification; public class SimplificationHints extends AbstractHints { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/impl/DefaultOpEnvironment.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpEnvironment.java similarity index 81% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/impl/DefaultOpEnvironment.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpEnvironment.java index ba7df6fa9..c8a153870 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/impl/DefaultOpEnvironment.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpEnvironment.java @@ -27,11 +27,8 @@ * #L% */ -package org.scijava.ops.impl; +package org.scijava.ops.engine.impl; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; @@ -45,56 +42,47 @@ import java.util.Set; import java.util.TreeSet; import java.util.UUID; +import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Collectors; -import org.scijava.AbstractContextual; -import org.scijava.Context; -import org.scijava.InstantiableException; import org.scijava.Priority; import org.scijava.log.LogService; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpDependencyMember; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpInstance; -import org.scijava.ops.OpMethod; -import org.scijava.ops.OpUtils; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.BaseOpHints.DependencyMatching; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.impl.AdaptationHints; -import org.scijava.ops.hints.impl.DefaultHints; -import org.scijava.ops.hints.impl.SimplificationHints; -import org.scijava.ops.matcher.DefaultOpMatcher; -import org.scijava.ops.matcher.DependencyMatchingException; -import org.scijava.ops.matcher.MatchingUtils; -import org.scijava.ops.matcher.OpAdaptationInfo; -import org.scijava.ops.matcher.OpCandidate; -import org.scijava.ops.matcher.OpCandidate.StatusCode; -import org.scijava.ops.matcher.OpClassInfo; -import org.scijava.ops.matcher.OpFieldInfo; -import org.scijava.ops.matcher.OpMatcher; -import org.scijava.ops.matcher.OpMatchingException; -import org.scijava.ops.matcher.OpMethodInfo; -import org.scijava.ops.matcher.OpRef; -import org.scijava.ops.provenance.OpHistoryService; -import org.scijava.ops.simplify.SimplifiedOpInfo; -import org.scijava.ops.util.OpWrapper; -import org.scijava.param.FunctionalMethodType; -import org.scijava.param.ParameterStructs; -import org.scijava.plugin.Parameter; -import org.scijava.plugin.PluginInfo; -import org.scijava.plugin.PluginService; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpCandidate; +import org.scijava.ops.api.OpCandidate.StatusCode; +import org.scijava.ops.api.OpDependencyMember; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpInfoGenerator; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.api.OpWrapper; +import org.scijava.ops.discovery.Discoverer; +import org.scijava.ops.engine.BaseOpHints.Adaptation; +import org.scijava.ops.engine.BaseOpHints.DependencyMatching; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.OpInstance; +import org.scijava.ops.engine.hint.AdaptationHints; +import org.scijava.ops.engine.hint.DefaultHints; +import org.scijava.ops.engine.hint.SimplificationHints; +import org.scijava.ops.engine.matcher.DependencyMatchingException; +import org.scijava.ops.engine.matcher.OpMatcher; +import org.scijava.ops.engine.matcher.OpMatchingException; +import org.scijava.ops.engine.matcher.impl.DefaultOpMatcher; +import org.scijava.ops.engine.matcher.impl.DefaultOpRef; +import org.scijava.ops.engine.matcher.impl.OpAdaptationInfo; +import org.scijava.ops.engine.matcher.impl.OpClassInfo; +import org.scijava.ops.engine.simplify.SimplifiedOpInfo; +import org.scijava.ops.engine.struct.FunctionalParameters; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; +import org.scijava.struct.FunctionalMethodType; import org.scijava.struct.ItemIO; import org.scijava.types.Nil; import org.scijava.types.TypeService; import org.scijava.types.Types; -import org.scijava.util.ClassUtils; +import org.scijava.types.inference.GenericAssignability; /** * Default implementation of {@link OpEnvironment}, whose ops and related state @@ -102,22 +90,23 @@ * * @author Curtis Rueden */ -public class DefaultOpEnvironment extends AbstractContextual implements OpEnvironment { +public class DefaultOpEnvironment implements OpEnvironment { - @Parameter - private PluginService pluginService; + private final Discoverer discoverer; private OpMatcher matcher; - @Parameter private LogService log; - @Parameter private TypeService typeService; - @Parameter private OpHistoryService history; + /** + * The {@link OpInfoGenerator}s providing {@link OpInfo}s to this environment + */ + private List infoGenerators; + /** * Data structure storing all known Ops, grouped by name. This reduces the * search size for any Op request to the number of known Ops with the name @@ -148,9 +137,13 @@ public class DefaultOpEnvironment extends AbstractContextual implements OpEnviro */ private Hints environmentHints = null; - public DefaultOpEnvironment(final Context context) { - context.inject(this); - matcher = new DefaultOpMatcher(log); + public DefaultOpEnvironment(final Discoverer d, final TypeService typeService, final LogService log, final OpHistoryService history, final List infoGenerators) { + this.discoverer = d; + this.typeService = typeService; + this.log = log; + this.history = history; + this.infoGenerators = infoGenerators; + matcher = new DefaultOpMatcher(); } @Override @@ -198,7 +191,11 @@ public T op(final String opName, final Nil specialType, @Override public T op(final OpInfo info, final Nil specialType, final Nil[] inTypes, final Nil outType) { - return op(info, specialType, inTypes, outType, getHints()); + try { + return findOp(info, specialType, inTypes, outType, getHints()); + } catch (OpMatchingException e) { + throw new IllegalArgumentException(e); + } } @Override @@ -236,20 +233,20 @@ public OpInfo opify(final Class opClass) { } @Override - public OpInfo opify(final Class opClass, final double priority) { - return new OpClassInfo(opClass, priority); + public OpInfo opify(final Class opClass, final double priority, final String... names) { + return new OpClassInfo(opClass, priority, names); } @Override - public void register(final OpInfo info, final String name) { + public void register(final OpInfo info) { if (opDirectory == null) initOpDirectory(); - addToOpIndex(info, name); + addToOpIndex.accept(info); } @SuppressWarnings("unchecked") private T findOp(final String opName, final Nil specialType, final Nil[] inTypes, - final Nil outType, Hints hints) throws OpMatchingException { - final OpRef ref = OpRef.fromTypes(opName, specialType.getType(), outType != null ? outType.getType() : null, + final Nil outType, Hints hints) { + final OpRef ref = DefaultOpRef.fromTypes(opName, specialType.getType(), outType != null ? outType.getType() : null, toTypes(inTypes)); MatchingConditions conditions = MatchingConditions.from(ref, hints, true); generateOpInstance(conditions); @@ -260,7 +257,7 @@ private T findOp(final String opName, final Nil specialType, final Nil private T findOp(final OpInfo info, final Nil specialType, final Nil[] inTypes, final Nil outType, Hints hints) throws OpMatchingException { - OpRef ref = OpRef.fromTypes(specialType.getType(), outType.getType(), + OpRef ref = DefaultOpRef.fromTypes(specialType.getType(), outType.getType(), toTypes(inTypes)); MatchingConditions conditions = MatchingConditions.from(ref, hints, true); generateOpInstance(conditions, info); @@ -282,13 +279,13 @@ private Type[] toTypes(Nil... nils) { * @param info * @throws OpMatchingException */ - private void generateOpInstance(final MatchingConditions conditions, final OpInfo info) throws OpMatchingException { + private void generateOpInstance(final MatchingConditions conditions, final OpInfo info) { // create new OpCandidate from ref and info Map, Type> typeVarAssigns = new HashMap<>(); if (!conditions.ref().typesMatch(info.opType(), typeVarAssigns)) throw new OpMatchingException( "The given OpRef and OpInfo are not compatible!"); - OpCandidate candidate = new OpCandidate(this, this.log, conditions.ref(), info, + OpCandidate candidate = new OpCandidate(this, conditions.ref(), info, typeVarAssigns); // TODO: can this be replaced by simply setting the status code to match? if (!matcher.typesMatch(candidate)) throw new OpMatchingException( @@ -322,9 +319,8 @@ private Object wrapViaCache(MatchingConditions conditions, * * @param conditions - the {@link MatchingConditions} outlining the * requirements that must be fulfilled by the Op returned - * @throws OpMatchingException */ - private void generateOpInstance(final MatchingConditions conditions) throws OpMatchingException + private void generateOpInstance(final MatchingConditions conditions) { // see if the ref has been matched already OpInstance cachedOp = getInstance(conditions); @@ -355,7 +351,7 @@ private OpInstance getInstance(MatchingConditions conditions) { return opCache.get(conditions); } - private OpCandidate findOpCandidate(OpRef ref, Hints hints) throws OpMatchingException{ + private OpCandidate findOpCandidate(OpRef ref, Hints hints) { try { // attempt to find a direct match return matcher.findSingleMatch(this, ref, hints); @@ -390,7 +386,7 @@ private OpCandidate findOpCandidate(OpRef ref, Hints hints) throws OpMatchingExc } } - private OpCandidate findSimplifiedOp(OpRef ref, Hints hints) throws OpMatchingException { + private OpCandidate findSimplifiedOp(OpRef ref, Hints hints) { Hints simplificationHints = SimplificationHints.generateHints(hints, false); return matcher.findSingleMatch(this, ref, simplificationHints); } @@ -401,10 +397,8 @@ private OpCandidate findSimplifiedOp(OpRef ref, Hints hints) throws OpMatchingEx * * @param candidate * @return an Op with all needed dependencies - * @throws OpMatchingException */ private Object instantiateOp(final OpCandidate candidate, Hints hints) - throws OpMatchingException { final List instances = resolveOpDependencies(candidate, hints); Object op = candidate.createOp(wrappedDeps(instances, hints.executionChainID())); @@ -486,13 +480,15 @@ private List> filterWrapperSuperclasses( return list; } - private List resolveOpDependencies(OpCandidate candidate, Hints hints) throws OpMatchingException { + private List resolveOpDependencies(OpCandidate candidate, Hints hints) { return resolveOpDependencies(candidate.opInfo(), candidate.typeVarAssigns(), hints); } private void initWrappers() { wrappers = new HashMap<>(); - for (OpWrapper wrapper : pluginService.createInstancesOfType(OpWrapper.class)) { + Class[] constructorClasses = {}; + Object[] constructorObjects = {}; + for (OpWrapper wrapper : discoverer.implementingInstances(OpWrapper.class, constructorClasses, constructorObjects)) { wrappers.put(wrapper.type(), wrapper); } } @@ -506,11 +502,8 @@ private void initWrappers() { * injected * @param typeVarAssigns - the mapping of {@link TypeVariable}s in the * {@code OpInfo} to {@link Type}s given in the request. - * @throws OpMatchingException if the type of the specified object is not - * functional, if the Op matching the functional type and the name - * could not be found, if an exception occurs during injection */ - private List resolveOpDependencies(OpInfo info, Map, Type> typeVarAssigns, Hints hints) throws OpMatchingException { + private List resolveOpDependencies(OpInfo info, Map, Type> typeVarAssigns, Hints hints) { final List> dependencies = info.dependencies(); final List resolvedDependencies = new ArrayList<>(dependencies.size()); @@ -559,9 +552,8 @@ private List resolveOpDependencies(OpInfo info, Map depExceptions = new ArrayList<>(); for (final OpInfo adaptor : infos("adapt")) { @@ -604,7 +596,7 @@ private OpCandidate adaptOp(OpRef ref, Hints hints) throws OpMatchingException { .getType(), map); OpAdaptationInfo adaptedInfo = new OpAdaptationInfo(srcCandidate .opInfo(), adapterOpType, adaptorOp); - OpCandidate adaptedCandidate = new OpCandidate(this, log, ref, adaptedInfo, map); + OpCandidate adaptedCandidate = new OpCandidate(this, ref, adaptedInfo, map); adaptedCandidate.setStatus(StatusCode.MATCH); return adaptedCandidate; } @@ -629,7 +621,6 @@ private OpCandidate adaptOp(OpRef ref, Hints hints) throws OpMatchingException { } private OpCandidate findAdaptationCandidate(final OpRef srcOpRef, final Hints hints) - throws OpMatchingException { Hints adaptationHints = AdaptationHints.generateHints(hints, false); final OpCandidate srcCandidate = findOpCandidate(srcOpRef, adaptationHints); @@ -640,7 +631,7 @@ private boolean adaptOpOutputSatisfiesRefTypes(Type adaptTo, Map Type opType = ref.getType(); // TODO: clean this logic -- can this just be ref.typesMatch() ? if (opType instanceof ParameterizedType) { - if (!MatchingUtils.checkGenericAssignability(adaptTo, + if (!GenericAssignability.checkGenericAssignability(adaptTo, (ParameterizedType) opType, map, true)) { return false; @@ -653,7 +644,7 @@ else if (!Types.isAssignable(opType, adaptTo, map)) { } private OpRef inferOpRef(OpDependencyMember dependency, - Map, Type> typeVarAssigns) throws OpMatchingException + Map, Type> typeVarAssigns) { final Type mappedDependencyType = Types.mapVarToTypes(new Type[] { dependency.getType() }, typeVarAssigns)[0]; @@ -691,8 +682,8 @@ private OpRef inferOpRef(OpDependencyMember dependency, * @return null if the specified type has no functional method */ private OpRef inferOpRef(Type type, String name, Map, Type> typeVarAssigns) - throws OpMatchingException { - List fmts = ParameterStructs.findFunctionalMethodTypes(type); + { + List fmts = FunctionalParameters.findFunctionalMethodTypes(type); if (fmts == null) return null; @@ -717,50 +708,19 @@ private OpRef inferOpRef(Type type, String name, Map, Type> type error += ". This is not supported."; throw new OpMatchingException(error); } - return new OpRef(name, type, mappedOutputs[0], mappedInputs); + return new DefaultOpRef(name, type, mappedOutputs[0], mappedInputs); } private void initOpDirectory() { opDirectory = new HashMap<>(); - - // Add regular Ops - for (final PluginInfo pluginInfo : pluginService.getPluginsOfType(Op.class)) { - try { - final Class opClass = pluginInfo.loadClass(); - OpInfo opInfo = new OpClassInfo(opClass); - addToOpIndex(opInfo, pluginInfo.getName()); - } catch (InstantiableException exc) { - log.error("Can't load class from plugin info: " + pluginInfo.toString(), exc); - } - } - // Add Ops contained in an OpCollection - for (final PluginInfo pluginInfo : pluginService.getPluginsOfType(OpCollection.class)) { - try { - final Class c = pluginInfo.loadClass(); - final List fields = ClassUtils.getAnnotatedFields(c, OpField.class); - Object instance = null; - for (Field field : fields) { - final boolean isStatic = Modifier.isStatic(field.getModifiers()); - if (!isStatic && instance == null) { - instance = field.getDeclaringClass().newInstance(); - } - OpInfo opInfo = new OpFieldInfo(isStatic ? null : instance, field); - addToOpIndex(opInfo, field.getAnnotation(OpField.class).names()); - } - final List methods = ClassUtils.getAnnotatedMethods(c, OpMethod.class); - for (final Method method: methods) { - OpInfo opInfo = new OpMethodInfo(method); - addToOpIndex(opInfo, method.getAnnotation(OpMethod.class).names()); - } - } catch (InstantiableException | InstantiationException | IllegalAccessException exc) { - log.error("Can't load class from plugin info: " + pluginInfo.toString(), exc); - } + for (final OpInfoGenerator generator : infoGenerators) { + List infos = generator.generateInfos(); + infos.forEach(addToOpIndex); } } - private void addToOpIndex(final OpInfo opInfo, final String opNames) { - String[] parsedOpNames = OpUtils.parseOpNames(opNames); - if (parsedOpNames == null || parsedOpNames.length == 0) { + private final Consumer addToOpIndex = (final OpInfo opInfo) -> { + if (opInfo.names() == null || opInfo.names().size() == 0) { log.error("Skipping Op " + opInfo.implementationName() + ":\n" + "Op implementation must provide name."); return; } @@ -769,13 +729,13 @@ private void addToOpIndex(final OpInfo opInfo, final String opNames) { + opInfo.getValidityException().getMessage()); return; } - for (String opName : parsedOpNames) { + for (String opName : opInfo.names()) { if (!opDirectory.containsKey(opName)) opDirectory.put(opName, new TreeSet<>()); boolean success = opDirectory.get(opName).add(opInfo); if(!success) System.out.println("Did not add OpInfo "+ opInfo); } - } + }; private Set opsOfName(final String name) { final Set ops = opDirectory.getOrDefault(name, Collections.emptySet()); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/impl/DefaultOpHistory.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpHistory.java similarity index 94% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/impl/DefaultOpHistory.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpHistory.java index b46516dfe..ff0ece8c8 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/impl/DefaultOpHistory.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpHistory.java @@ -1,5 +1,5 @@ -package org.scijava.ops.provenance.impl; +package org.scijava.ops.engine.impl; import com.google.common.graph.Graph; import com.google.common.graph.GraphBuilder; @@ -13,10 +13,10 @@ import java.util.concurrent.ConcurrentLinkedDeque; import java.util.stream.Collectors; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpInfo; -import org.scijava.ops.provenance.OpExecutionSummary; -import org.scijava.ops.provenance.OpHistory; +import org.scijava.ops.api.OpExecutionSummary; +import org.scijava.ops.api.OpHistory; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; import org.scijava.service.AbstractService; import org.scijava.service.Service; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpService.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpService.java new file mode 100644 index 000000000..3a5cf2dfb --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/DefaultOpService.java @@ -0,0 +1,174 @@ +/* + * #%L + * SciJava Operations: a framework for reusable algorithms. + * %% + * Copyright (C) 2018 SciJava developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +package org.scijava.ops.engine.impl; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import org.scijava.Context; +import org.scijava.InstantiableException; +import org.scijava.log.LogService; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfoGenerator; +import org.scijava.ops.discovery.Discoverer; +import org.scijava.ops.discovery.Implementation; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.OpService; +import org.scijava.plugin.Plugin; +import org.scijava.plugin.PluginInfo; +import org.scijava.plugin.PluginService; +import org.scijava.plugin.SciJavaPlugin; +import org.scijava.service.AbstractService; +import org.scijava.service.Service; +import org.scijava.types.TypeService; + +/** + * Service to provide a list of available ops structured in a prefix tree and to + * search for ops matching specified types. + * + * @author David Kolb + */ +@Plugin(type = Service.class) +public class DefaultOpService extends AbstractService implements OpService { + + private OpEnvironment env; + + /** + * Begins declaration of an op matching request for locating an op with a + * particular name. Additional criteria are specified as chained method calls + * on the returned {@link OpBuilder} object. See {@link OpBuilder} for + * examples. + * + * @param opName The name of the op to be matched. + * @return An {@link OpBuilder} for refining the search criteria for an op. + * @see OpBuilder + */ + @Override + public OpBuilder op(final String opName) { + return env().op(opName); + } + + /** Retrieves the motherlode of available ops. */ + @Override + public OpEnvironment env() { + if (env == null) initEnv(); + return env; + } + + // -- Helper methods - lazy initialization -- + + private synchronized void initEnv() { + if (env != null) return; + PluginService plugins = context().getService(PluginService.class); + LogService log = context().getService(LogService.class); + TypeService types = context().getService(TypeService.class); + OpHistoryService history = context().getService(OpHistoryService.class); + List infoGenerators = Arrays.asList( + new PluginBasedClassOpInfoGenerator(plugins), + new PluginBasedOpCollectionInfoGenerator(plugins)); + env = new DefaultOpEnvironment(new PluginBasedDiscoverer(context()), types, + log, history, infoGenerators); + } +} + +class PluginBasedDiscoverer implements Discoverer { + + private final PluginService p; + + public PluginBasedDiscoverer(Context ctx) { + p = ctx.getService(PluginService.class); + } + + @Override + @SuppressWarnings("unchecked") + public List> implementingClasses(Class c) { + if (!SciJavaPlugin.class.isAssignableFrom(c)) { + throw new UnsupportedOperationException( + "Current discovery mechanism tied to SciJava Context; only able to search for SciJavaPlugins"); + } + List> infos = p.getPluginsOfType( + (Class) c); + return infos.stream() // + .map(info -> makeClassOrNull(c, info)) // + .filter(cls -> cls != null).collect(Collectors.toList()); + } + + @Override + @SuppressWarnings("unchecked") + public List implementingInstances(Class c, + Class[] constructorClasses, Object[] constructorArgs) + { + if (!SciJavaPlugin.class.isAssignableFrom(c)) { + throw new UnsupportedOperationException( + "Current discovery mechanism tied to SciJava Context; only able to search for SciJavaPlugins"); + } + List instances = p.createInstancesOfType( + (Class) c); + return instances.stream().map(instance -> (T) instance).collect(Collectors + .toList()); + } + + @Override + @SuppressWarnings("unchecked") + public List> implementationsOf(Class c) { + if (!SciJavaPlugin.class.isAssignableFrom(c)) { + throw new UnsupportedOperationException( + "Current discovery mechanism tied to SciJava Context; only able to search for SciJavaPlugins"); + } + List> instances = p.getPluginsOfType( + (Class) c); + return instances.stream() // + .map(instance -> makeDiscoveryOrNull(c, instance)) // + .filter(d -> d.implementation() != null) // + .collect(Collectors.toList()); + } + + @SuppressWarnings("unchecked") + private Class makeClassOrNull(@SuppressWarnings("unused") Class type, + PluginInfo instance) + { + try { + return (Class) instance.loadClass(); + } + catch (InstantiableException exc) { + return null; + } + } + + private Implementation makeDiscoveryOrNull(Class type, + PluginInfo instance) + { + return new Implementation<>(makeClassOrNull(type, instance), type, instance + .getName()); + } + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/impl/LambdaTypeBaker.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/LambdaTypeBaker.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/impl/LambdaTypeBaker.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/LambdaTypeBaker.java index b33f48eae..390eb7102 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/impl/LambdaTypeBaker.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/LambdaTypeBaker.java @@ -1,13 +1,14 @@ -package org.scijava.ops.impl; +package org.scijava.ops.engine.impl; import java.lang.invoke.MethodHandles; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Type; -import org.scijava.param.ParameterStructs; +import org.scijava.ops.api.OpUtils; import org.scijava.types.GenericTyped; import org.scijava.types.Types; +import org.scijava.types.inference.InterfaceInference; import javassist.CannotCompileException; import javassist.ClassPool; @@ -34,8 +35,8 @@ public static T bakeLambdaType(T originalOp, Type reifiedType) { private static void ensureImplementation(T originalOp, Type reifiedType) { Class opClass = originalOp.getClass(); - Class opFIFace = ParameterStructs.findFunctionalInterface(opClass); - Class typeFIFace = ParameterStructs.findFunctionalInterface(Types.raw(reifiedType)); + Class opFIFace = OpUtils.findFunctionalInterface(opClass); + Class typeFIFace = OpUtils.findFunctionalInterface(Types.raw(reifiedType)); if (!opFIFace.equals(typeFIFace)) { throw new IllegalArgumentException(originalOp + " does not implement " + Types.raw(reifiedType)); } @@ -173,7 +174,7 @@ private static String createFunctionalMethod(Type reifiedType) { // determine the name of the functional method Class raw = Types.raw(reifiedType); - Method m = ParameterStructs.singularAbstractMethod(raw); + Method m = InterfaceInference.singularAbstractMethod(raw); //-- signature -- // sb.append(generateSignature(m)); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/impl/MatchingConditions.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/MatchingConditions.java similarity index 84% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/impl/MatchingConditions.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/MatchingConditions.java index 85c4b29bd..f083015da 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/impl/MatchingConditions.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/MatchingConditions.java @@ -1,10 +1,10 @@ -package org.scijava.ops.impl; +package org.scijava.ops.engine.impl; import java.util.Objects; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.matcher.OpRef; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpRef; public class MatchingConditions { diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/PluginBasedClassOpInfoGenerator.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/PluginBasedClassOpInfoGenerator.java new file mode 100644 index 000000000..8bc55e2fb --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/PluginBasedClassOpInfoGenerator.java @@ -0,0 +1,42 @@ +package org.scijava.ops.engine.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.scijava.InstantiableException; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpInfoGenerator; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.engine.matcher.impl.OpClassInfo; +import org.scijava.ops.spi.Op; +import org.scijava.plugin.PluginInfo; +import org.scijava.plugin.PluginService; + + +public class PluginBasedClassOpInfoGenerator implements OpInfoGenerator { + + private final PluginService service; + + public PluginBasedClassOpInfoGenerator(PluginService service) { + this.service = service; + } + + @Override + public List generateInfos() { + List infos = new ArrayList<>(); + for (PluginInfo info : service.getPluginsOfType(Op.class) ) { + Class opClass; + try { + opClass = info.loadClass(); + String[] parsedOpNames = OpUtils.parseOpNames(info.getName()); + infos.add(new OpClassInfo(opClass, parsedOpNames)); + } + catch (InstantiableException exc) { + exc.printStackTrace(); + } + + } + return infos; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/PluginBasedOpCollectionInfoGenerator.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/PluginBasedOpCollectionInfoGenerator.java new file mode 100644 index 000000000..c4334cf05 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/PluginBasedOpCollectionInfoGenerator.java @@ -0,0 +1,63 @@ +package org.scijava.ops.engine.impl; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.List; + +import org.scijava.InstantiableException; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpInfoGenerator; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.engine.matcher.impl.OpFieldInfo; +import org.scijava.ops.engine.matcher.impl.OpMethodInfo; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpMethod; +import org.scijava.plugin.PluginInfo; +import org.scijava.plugin.PluginService; +import org.scijava.util.ClassUtils; + + +public class PluginBasedOpCollectionInfoGenerator implements OpInfoGenerator { + + private final PluginService service; + + public PluginBasedOpCollectionInfoGenerator(PluginService service) { + this.service = service; + } + + @Override + public List generateInfos() { + List infos = new ArrayList<>(); + for (PluginInfo info : service.getPluginsOfType(OpCollection.class) ) { + try { + Class c = info.loadClass(); + final List fields = ClassUtils.getAnnotatedFields(c, OpField.class); + Object instance = null; + for (Field field : fields) { + final boolean isStatic = Modifier.isStatic(field.getModifiers()); + if (!isStatic && instance == null) { + instance = field.getDeclaringClass().newInstance(); + } + String unparsedOpNames = field.getAnnotation(OpField.class).names(); + String[] parsedOpNames = OpUtils.parseOpNames(unparsedOpNames); + infos.add(new OpFieldInfo(isStatic ? null : instance, field, + parsedOpNames)); + } + final List methods = ClassUtils.getAnnotatedMethods(c, OpMethod.class); + for (final Method method: methods) { + String unparsedOpNames = method.getAnnotation(OpMethod.class).names(); + String[] parsedOpNames = OpUtils.parseOpNames(unparsedOpNames); + infos.add(new OpMethodInfo(method, parsedOpNames)); + } + } catch (InstantiationException | IllegalAccessException | InstantiableException exc) { + // TODO: Consider how best to handle this. + exc.printStackTrace(); + } + } + return infos; + } + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/impl/SingletonOpHistoryService.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/SingletonOpHistoryService.java similarity index 73% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/impl/SingletonOpHistoryService.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/SingletonOpHistoryService.java index a773beca9..656d30398 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/provenance/impl/SingletonOpHistoryService.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/impl/SingletonOpHistoryService.java @@ -1,7 +1,7 @@ -package org.scijava.ops.provenance.impl; +package org.scijava.ops.engine.impl; -import org.scijava.ops.provenance.OpHistory; -import org.scijava.ops.provenance.OpHistoryService; +import org.scijava.ops.api.OpHistory; +import org.scijava.ops.engine.OpHistoryService; import org.scijava.plugin.Plugin; import org.scijava.service.AbstractService; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/log/Logger.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/log/Logger.java similarity index 99% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/log/Logger.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/log/Logger.java index 585924f3f..f212b15a6 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/log/Logger.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/log/Logger.java @@ -1,5 +1,5 @@ -package org.scijava.ops.log; +package org.scijava.ops.engine.log; import static org.scijava.log.LogLevel.DEBUG; import static org.scijava.log.LogLevel.ERROR; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/DependencyMatchingException.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/DependencyMatchingException.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/DependencyMatchingException.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/DependencyMatchingException.java index c76d9458b..cc7af3682 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/DependencyMatchingException.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/DependencyMatchingException.java @@ -1,5 +1,7 @@ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; + +import org.scijava.ops.api.OpRef; /** * An {@link OpMatchingException} caused by another {@code OpMatchingException} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/MatchingResult.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/MatchingResult.java new file mode 100644 index 000000000..c6f206413 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/MatchingResult.java @@ -0,0 +1,133 @@ +package org.scijava.ops.engine.matcher; + +import java.util.ArrayList; +import java.util.List; + +import org.scijava.ops.api.OpCandidate; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.api.OpCandidate.StatusCode; + +/** + * Class representing the result from type matching done by the + * {@link OpMatcher}. Contains the original candidates which match + * the types specified by {@link OpRef} and the final matches that match all + * inputs, outputs, and arguments. + * + * @author David Kolb + */ +public class MatchingResult { + + private final List candidates; + private final List matches; + private final List originalQueries; + + public static MatchingResult empty(final List originalQueries) { + return new MatchingResult(new ArrayList(), new ArrayList(), originalQueries); + } + + public MatchingResult(final List candidates, final List matches, final List originalQueries) { + this.candidates = candidates; + this.matches = matches; + this.originalQueries = originalQueries; + } + + public List getOriginalQueries() { + return originalQueries; + } + + public List getCandidates() { + return candidates; + } + + public List getMatches() { + return matches; + } + + public OpCandidate singleMatch() { + if (matches.size() == 1) { + // if (log.isDebug()) { + // log.debug("Selected '" + match.getRef().getLabel() + "' op: " + + // match.opInfo().opClass().getName()); + // } + + // TODO: DO we still need this initialization? + // // initialize the op, if appropriate + // if (m.object() instanceof Initializable) { + // ((Initializable) m.object()).initialize(); + // } + + return matches.get(0); + } + + // There is no clear matching Op + final String analysis = MatchingResult.matchInfo(this); + throw new OpMatchingException(analysis); + } + + /** + * Gets a string with an analysis of a particular match request failure. + *

+ * This method is used to generate informative exception messages when no + * matches, or too many matches, are found. + *

+ * + * @param res + * The result of type matching + * @return A multi-line string describing the situation: 1) the type of + * match failure; 2) the list of matching ops (if any); 3) the + * request itself; and 4) the list of candidates including status + * (i.e., whether it matched, and if not, why not). + */ + public static String matchInfo(final MatchingResult res) { + final StringBuilder sb = new StringBuilder(); + + List candidates = res.getCandidates(); + List matches = res.getMatches(); + + final OpRef ref = res.getOriginalQueries().get(0); + if (matches.isEmpty()) { + // no matches + sb.append("No matching '" + ref.getLabel() + "' op\n"); + } else { + // multiple matches + final double priority = OpUtils.getPriority(matches.get(0)); + sb.append("Multiple '" + ref.getLabel() + "' ops of priority " + priority + ":\n"); + if (OpUtils.typeCheckingIncomplete(matches)) { + sb.append("Incomplete output type checking may have occured!\n"); + } + int count = 0; + for (final OpCandidate match : matches) { + sb.append(++count + ". "); + sb.append(match.toString() + "\n"); + } + } + + // fail, with information about the request and candidates + sb.append("\n"); + sb.append("Request:\n"); + sb.append("-\t" + ref.toString() + "\n"); + sb.append("\n"); + sb.append("Candidates:\n"); + if (candidates.isEmpty()) { + sb.append("-\t No candidates found!"); + } + int count = 0; + for (final OpCandidate candidate : candidates) { + sb.append(++count + ". "); + sb.append("\t" + OpUtils.opString(candidate.opInfo(), candidate.getStatusItem()) + "\n"); + final String status = candidate.getStatus(); + if (status != null) + sb.append("\t" + status + "\n"); + if (candidate.getStatusCode() == StatusCode.DOES_NOT_CONFORM) { + // TODO: Conformity not yet implemented + // // show argument values when a contingent op rejects them + // for (final ModuleItem item : inputs(info)) { + // final Object value = item.getValue(candidate.getModule()); + // sb.append("\t\t" + item.getName() + " = " + value + "\n"); + // } + } + } + return sb.toString(); + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMatcher.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/OpMatcher.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMatcher.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/OpMatcher.java index 02b4a2ccd..e937b4622 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMatcher.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/OpMatcher.java @@ -27,12 +27,15 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import java.util.List; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpCandidate; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.engine.matcher.MatchingResult; /** * Finds Ops which match an {@link OpRef}. @@ -42,9 +45,9 @@ //TODO javadoc public interface OpMatcher { - OpCandidate findSingleMatch(OpEnvironment env, OpRef ref) throws OpMatchingException; + OpCandidate findSingleMatch(OpEnvironment env, OpRef ref); - OpCandidate findSingleMatch(OpEnvironment env, OpRef ref, Hints hints) throws OpMatchingException; + OpCandidate findSingleMatch(OpEnvironment env, OpRef ref, Hints hints); MatchingResult findMatch(OpEnvironment env, OpRef ref); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMatchingException.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/OpMatchingException.java similarity index 75% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMatchingException.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/OpMatchingException.java index 9788ae674..4077db150 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMatchingException.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/OpMatchingException.java @@ -1,11 +1,13 @@ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; + +import org.scijava.ops.api.OpRef; /** * Indicates that no op matching a given {@link OpRef} could be found. * * @author David Kolb */ -public class OpMatchingException extends Exception { +public class OpMatchingException extends RuntimeException { private static final long serialVersionUID = 2334342967056340218L; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/DefaultOpMatcher.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/DefaultOpMatcher.java similarity index 94% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/DefaultOpMatcher.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/DefaultOpMatcher.java index dbd71d3b3..a0caffebf 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/DefaultOpMatcher.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/DefaultOpMatcher.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; @@ -43,15 +43,18 @@ import java.util.Set; import java.util.function.Predicate; -import org.scijava.log.Logger; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.impl.DefaultHints; -import org.scijava.ops.matcher.OpCandidate.StatusCode; -import org.scijava.ops.simplify.InfoSimplificationGenerator; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpCandidate; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.api.OpCandidate.StatusCode; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.hint.DefaultHints; +import org.scijava.ops.engine.matcher.MatchingResult; +import org.scijava.ops.engine.matcher.OpMatcher; +import org.scijava.ops.engine.simplify.InfoSimplificationGenerator; import org.scijava.service.AbstractService; import org.scijava.struct.Member; import org.scijava.types.Types; @@ -65,19 +68,13 @@ */ public class DefaultOpMatcher extends AbstractService implements OpMatcher { - private final Logger log; - - public DefaultOpMatcher(final Logger log) { - this.log = log; - } - @Override - public OpCandidate findSingleMatch(final OpEnvironment env, final OpRef ref) throws OpMatchingException { + public OpCandidate findSingleMatch(final OpEnvironment env, final OpRef ref) { return findMatch(env, ref).singleMatch(); } @Override - public OpCandidate findSingleMatch(final OpEnvironment env, final OpRef ref, final Hints hints) throws OpMatchingException { + public OpCandidate findSingleMatch(final OpEnvironment env, final OpRef ref, final Hints hints) { return findMatch(env, ref, hints).singleMatch(); } @@ -130,7 +127,7 @@ public List findCandidates(final OpEnvironment env, final List, Type> typeVarAssigns = new HashMap<>(); if (ref.typesMatch(info.opType(), typeVarAssigns)) { - OpCandidate candidate = info.createCandidate(env, log, ref, typeVarAssigns); + OpCandidate candidate = info.createCandidate(env, ref, typeVarAssigns); candidates.add(candidate); } } @@ -266,7 +263,7 @@ private List filterMatches(final List candidates, fina private boolean missArgs(final OpCandidate candidate, final Type[] paddedArgs) { int i = 0; for (final Member member : OpUtils.inputs(candidate)) { - if (paddedArgs[i++] == null && OpUtils.isRequired(member)) { + if (paddedArgs[i++] == null && member.isRequired()) { candidate.setStatus(StatusCode.REQUIRED_ARG_IS_NULL, null, member); return true; } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpRef.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/DefaultOpRef.java similarity index 62% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpRef.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/DefaultOpRef.java index e2247ff94..d38418aa8 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpRef.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/DefaultOpRef.java @@ -27,21 +27,19 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; -import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import java.util.Objects; -import org.scijava.log.Logger; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.core.Op; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.engine.matcher.OpMatcher; +import org.scijava.ops.spi.Op; import org.scijava.types.Types; +import org.scijava.types.inference.GenericAssignability; /** * Data structure which identifies an op by name and/or type(s) and/or argument @@ -54,7 +52,7 @@ * @author Christian Dietz (University of Konstanz) * @author Curtis Rueden */ -public class OpRef { +public class DefaultOpRef implements OpRef { /** Name of the op, or null for any name. */ private final String name; @@ -70,12 +68,16 @@ public class OpRef { // -- Static construction methods -- - public static OpRef fromTypes(final Type type, final Type outType, final Type... args) { - return new OpRef(null, type, outType, filterNulls(args)); + public static DefaultOpRef fromTypes(final Type type, final Type outType, + final Type... args) + { + return new DefaultOpRef(null, type, outType, OpRef.filterNulls(args)); } - public static OpRef fromTypes(final String name, final Type type, final Type outType, final Type... args) { - return new OpRef(name, type, outType, filterNulls(args)); + public static DefaultOpRef fromTypes(final String name, final Type type, + final Type outType, final Type... args) + { + return new DefaultOpRef(name, type, outType, OpRef.filterNulls(args)); } // -- Constructor -- @@ -83,16 +85,14 @@ public static OpRef fromTypes(final String name, final Type type, final Type out /** * Creates a new op reference. * - * @param name - * name of the op, or null for any name. - * @param type - * type which the ops must match. - * @param outType - * the op's required output type. - * @param args - * arguments to the op. + * @param name name of the op, or null for any name. + * @param type type which the ops must match. + * @param outType the op's required output type. + * @param args arguments to the op. */ - public OpRef(final String name, final Type type, final Type outType, final Type[] args) { + public DefaultOpRef(final String name, final Type type, final Type outType, + final Type[] args) + { this.name = name; this.type = type; this.outType = outType; @@ -102,11 +102,13 @@ public OpRef(final String name, final Type type, final Type outType, final Type[ // -- OpRef methods -- /** Gets the name of the op. */ + @Override public String getName() { return name; } /** Gets the type which the op must match. */ + @Override public Type getType() { return type; } @@ -114,11 +116,13 @@ public Type getType() { /** * Gets the op's output type constraint, or null for no constraint. */ + @Override public Type getOutType() { return outType; } /** Gets the op's arguments. */ + @Override public Type[] getArgs() { return args.clone(); } @@ -126,15 +130,17 @@ public Type[] getArgs() { /** * Gets a label identifying the op's scope (i.e., its name and/or types). */ + @Override public String getLabel() { final StringBuilder sb = new StringBuilder(); - append(sb, name); + OpRef.append(sb, name); if (type != null) { - append(sb, Types.name(type)); + OpRef.append(sb, Types.name(type)); } return sb.toString(); } + @Override public boolean typesMatch(final Type opType) { return typesMatch(opType, new HashMap<>()); } @@ -143,10 +149,13 @@ public boolean typesMatch(final Type opType) { * Determines whether the specified type satisfies the op's required types * using {@link Types#isApplicable(Type[], Type[])}. */ - public boolean typesMatch(final Type opType, final Map, Type> typeVarAssigns) { + @Override + public boolean typesMatch(final Type opType, + final Map, Type> typeVarAssigns) + { if (type == null) return true; if (type instanceof ParameterizedType) { - if (!MatchingUtils.checkGenericAssignability(opType, + if (!GenericAssignability.checkGenericAssignability(opType, (ParameterizedType) type, typeVarAssigns, true)) { return false; @@ -164,60 +173,17 @@ public boolean typesMatch(final Type opType, final Map, Type> ty @Override public String toString() { - String n = name == null ? "" : "Name: \"" + name + "\", Types: "; - n += type + "\n"; - n += "Input Types: \n"; - for (Type arg : args) { - n += "\t\t* "; - n += arg == null ? "" : arg.getTypeName(); - n += "\n"; - } - n += "Output Type: \n"; - n += "\t\t* "; - n += outType == null ? "" : outType.getTypeName(); - n += "\n"; - return n.substring(0, n.length() - 1); + return refString(); } @Override public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final OpRef other = (OpRef) obj; - if (!Objects.equals(name, other.name)) - return false; - if (!Objects.equals(type, other.type)) - return false; - if (!Objects.equals(outType, other.outType)) - return false; - if (!Arrays.equals(args, other.args)) - return false; - return true; + return refEquals(obj); } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {name, type, outType, args}); + return refHashCode(); } - // -- Utility methods -- - - public static Type[] filterNulls(final Type... types) { - Type[] ts = Arrays.stream(types).filter(t -> t != null).toArray(Type[]::new); - return ts == null ? null : ts; - } - - // -- Helper methods -- - - private void append(final StringBuilder sb, final String s) { - if (s == null) - return; - if (sb.length() > 0) - sb.append("/"); - sb.append(s); - } } diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/MatchingUtils.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/MatchingUtils.java new file mode 100644 index 000000000..dd3e33c72 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/MatchingUtils.java @@ -0,0 +1,223 @@ +/* + * #%L + * SciJava Common shared library for SciJava software. + * %% + * Copyright (C) 2009 - 2017 Board of Regents of the University of + * Wisconsin-Madison, Broad Institute of MIT and Harvard, Max Planck + * Institute of Molecular Cell Biology and Genetics, University of + * Konstanz, and KNIME GmbH. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +package org.scijava.ops.engine.matcher.impl; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + +import org.scijava.types.Any; +import org.scijava.types.Nil; +import org.scijava.types.Types; +import org.scijava.types.Types.TypeVarFromParameterizedTypeInfo; +import org.scijava.types.Types.TypeVarInfo; + +public final class MatchingUtils { + + private MatchingUtils() { + // prevent instantiation of utility class + } + + /** + * Checks for raw assignability. TODO This method is not yet fully + * implemented. The correct behavior should be as follows. Suppose we have a + * generic typed method like: + * + *
+	 *public static <N> List<N> foo(N in) {
+	 *	...
+	 *}
+	 * 
+ * + * This method should discern if the following assignments would be legal, + * possibly using predetermined {@link TypeVariable} assignments: + * + *
+	 *List<Integer> listOfInts = foo(new Integer(0)) //legal
+	 *List<Number> listOfNumbers = foo(new Integer(0)) //legal
+	 *List<? extends Number> listOfBoundedWildcards = foo(new Integer(0)) //legal
+	 * 
+ * + * The corresponding calls to this method would be: + * + *
+	 * Nil<List<N>> nilN = new Nil<List<N>>(){}
+	 * Nil<List<Integer>> nilInteger = new Nil<List<Integer>>(){}
+	 * Nil<List<Number>> nilNumber = new Nil<List<Number>>(){}
+	 * Nil<List<? extends Number>> nilWildcardNumber = new Nil<List<? extends Number>>(){}
+	 *
+	 * checkGenericOutputsAssignability(nilN.getType(), nilInteger.getType, ...)
+	 * checkGenericOutputsAssignability(nilN.getType(), nilNumber.getType, ...)
+	 * checkGenericOutputsAssignability(nilN.getType(), nilWildcardNumber.getType, ...)
+	 * 
+ * + * Using a map where N was already bound to Integer (N -> Integer.class). This + * method is useful for the following scenario: During ops matching, we first + * check if the arguments (inputs) of the requested op are applicable to the + * arguments of an op candidate. During this process, possible type variables + * may be inferred. The can then be used with this method to find out if the + * outputs of the op candidate would be assignable to the output of the + * requested op. + * + * @param froms + * @param tos + * @param typeBounds + * @return the index {@code i} such that {@code from[i]} cannot be assigned to + * {@code to[i]}, or {@code -1} iff {@code from[i]} can be assigned to + * {@code to[i]} for all {@code 0 <= i < from.length}. + */ + static int checkGenericOutputsAssignability(Type[] froms, Type[] tos, + HashMap, TypeVarInfo> typeBounds) { + for (int i = 0; i < froms.length; i++) { + Type from = froms[i]; + Type to = tos[i]; + + if (to instanceof Any) continue; + + if (from instanceof TypeVariable) { + TypeVarInfo typeVarInfo = typeBounds.get(from); + // HACK: we CAN assign, for example, a Function, O> to a + // Function, Double>, + // because in this situation O is not bounded to any other types. However + // isAssignable will fail, + // since we cannot just cast Double to O without that required knowledge that O + // can be fixed to Double. + // We get around this by recording in typeBounds that our previously unbounded + // TypeVariable (from) \ + // is now fixed to (to), then simply assigning (from) to (to), since from only + // has one bound, being to. + if (typeVarInfo == null) { + TypeVariable fromTypeVar = (TypeVariable) from; + TypeVarFromParameterizedTypeInfo fromInfo = new TypeVarFromParameterizedTypeInfo(fromTypeVar); + fromInfo.fixBounds(to, true); + typeBounds.put(fromTypeVar, fromInfo); + from = to; + } + // similar to the above, if we know that O is already bound to a Type, and that + // Type is to, then we can assign this without any issues. + else { + if(typeVarInfo.allowType(to, true)) from = to; + } + } + + if (!Types.isAssignable(Types.raw(from), Types.raw(to))) + return i; + } + return -1; + } + + /** + * Map type vars in specified type list to types using the specified map. In + * doing so, type vars mapping to other type vars will not be followed but + * just replaced. + * + * @param typesToMap + * @param typeAssigns + * @return a copy of {@code typesToMap} in which the {@link TypeVariable}s + * (that are present in {@code typeAssigns}) are mapped to the + * associated values within the {@code Map}. + */ + public static Type[] mapVarToTypes(Type[] typesToMap, Map, Type> typeAssigns) { + return Arrays.stream(typesToMap).map(type -> Types.unrollVariables(typeAssigns, type, false)) + .toArray(Type[]::new); + } + + /** + * Gets the "useful" class information carries on the given object, which + * depends on the actual type of the object. + */ + public static Class getClass(final Object obj) { + if (obj == null) + return null; + if (obj instanceof Nil) + return getClass(((Nil) obj).getType()); + if (obj instanceof Class) + return (Class) obj; + if (obj instanceof ParameterizedType) + return (Class) ((ParameterizedType) obj).getRawType(); + return obj.getClass(); + } + + /** + * Finds the levels of casting between origin and + * dest. Returns 0 if dest and origin are the same. Returns -1 if + * dest is not assignable from origin. + */ + public static int findCastLevels(final Class dest, final Class origin) { + if (dest.equals(origin)) + return 0; + + int level = 1; + Class currType = origin; + // BFS if dest is an interface + if (dest.isInterface()) { + final HashSet seen = new HashSet<>(); + final ArrayList currIfaces = new ArrayList<>(Arrays.asList(currType.getGenericInterfaces())); + do { + final ArrayList nextIfaces = new ArrayList<>(); + for (final Type iface : currIfaces) { + if (seen.contains(iface.getTypeName())) + continue; + + final Class cls = getClass(iface); + if (cls.equals(dest)) + return level; + seen.add(iface.getTypeName()); + nextIfaces.addAll(Arrays.asList(cls.getGenericInterfaces())); + } + currIfaces.clear(); + currIfaces.addAll(nextIfaces); + if (currType.getSuperclass() != null) { + currType = currType.getSuperclass(); + currIfaces.addAll(Arrays.asList(currType.getGenericInterfaces())); + } + level++; + } while (!currIfaces.isEmpty() || currType.getSuperclass() != null); + } + // otherwise dest is a class, so search the list of ancestors + else { + while (currType.getSuperclass() != null) { + currType = currType.getSuperclass(); + if (currType.equals(dest)) + return level; + level++; + } + } + return -1; + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpAdaptationInfo.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpAdaptationInfo.java similarity index 59% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpAdaptationInfo.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpAdaptationInfo.java index d46dd9882..e403d3531 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpAdaptationInfo.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpAdaptationInfo.java @@ -1,24 +1,30 @@ -package org.scijava.ops.matcher; + +package org.scijava.ops.engine.matcher.impl; + +import com.google.common.collect.Streams; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Type; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.function.Function; -import java.util.stream.Collectors; - -import org.scijava.ops.OpDependencyMember; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.OpHints; -import org.scijava.ops.hints.impl.ImmutableHints; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; + +import org.scijava.ValidityProblem; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpDependencyMember; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.engine.BaseOpHints.Adaptation; +import org.scijava.ops.engine.hint.ImmutableHints; +import org.scijava.ops.engine.struct.FunctionalParameters; +import org.scijava.ops.engine.struct.OpRetypingMemberParser; +import org.scijava.ops.engine.struct.RetypingRequest; +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.ItemIO; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; +import org.scijava.struct.Structs; +import org.scijava.struct.ValidityException; /** * {@link OpInfo} for ops that have been adapted to some other Op type. @@ -36,38 +42,45 @@ public class OpAdaptationInfo implements OpInfo { private Struct struct; private ValidityException validityException; - public OpAdaptationInfo(OpInfo srcInfo, Type type, Function adaptor) { + public OpAdaptationInfo(OpInfo srcInfo, Type type, + Function adaptor) + { this.srcInfo = srcInfo; this.type = type; this.adaptor = adaptor; - // NOTE: since the source Op has already been shown to be valid, there is not + // NOTE: since the source Op has already been shown to be valid, there is + // not // much for us to do here. + List problems = new ArrayList<>(); + List fmts = FunctionalParameters.findFunctionalMethodTypes(type); + + RetypingRequest r = new RetypingRequest(srcInfo.struct(), fmts); + struct = Structs.from(r, problems, new OpRetypingMemberParser()); try { - struct = ParameterStructs.structOf(srcInfo, type); OpUtils.checkHasSingleOutput(struct); - } catch (ValidityException e) { - validityException = e; } + catch (ValidityException exc) { + problems.addAll(exc.problems()); + } + if (!problems.isEmpty()) validityException = new ValidityException( + problems); - List hintList = new ArrayList<>(srcInfo.declaredHints().getHints().values()); + List hintList = new ArrayList<>(srcInfo.declaredHints().getHints() + .values()); hintList.remove(Adaptation.ALLOWED); hintList.add(Adaptation.FORBIDDEN); this.hints = new ImmutableHints(hintList.toArray(String[]::new)); } @Override - public Hints formHints(OpHints h) { - // NB we don't use Arrays.toList() here because we cannot add to that list! - List hintList = Arrays.stream(h.hints()).collect(Collectors.toList()); - hintList.remove(Adaptation.ALLOWED); - hintList.add(Adaptation.FORBIDDEN); - return new ImmutableHints(hintList.toArray(String[]::new)); + public List> dependencies() { + return srcInfo.dependencies(); } @Override - public List> dependencies() { - return srcInfo.dependencies(); + public List names() { + return srcInfo.names(); } @Override @@ -93,8 +106,7 @@ public double priority() { @Override public String implementationName() { - return srcInfo.implementationName() + " adapted to " + type - .toString(); + return srcInfo.implementationName() + " adapted to " + type.toString(); } /** diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpClassInfo.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpClassInfo.java similarity index 81% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpClassInfo.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpClassInfo.java index 7a8a4173a..bfd80f2cc 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpClassInfo.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpClassInfo.java @@ -27,25 +27,31 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.scijava.Priority; -import org.scijava.ops.OpDependencyMember; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.OpHints; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; +import org.scijava.ValidityProblem; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpDependencyMember; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.hint.ImmutableHints; +import org.scijava.ops.engine.struct.ClassOpDependencyMemberParser; +import org.scijava.ops.engine.struct.ClassParameterMemberParser; import org.scijava.plugin.Plugin; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; +import org.scijava.struct.Structs; +import org.scijava.struct.ValidityException; import org.scijava.types.Types; /** @@ -56,20 +62,23 @@ */ public class OpClassInfo implements OpInfo { + private final List names; private final Class opClass; private Struct struct; private ValidityException validityException; private final double priority; private final Hints hints; - public OpClassInfo(final Class opClass) { - this(opClass, priorityFromAnnotation(opClass)); + public OpClassInfo(final Class opClass, final String... names) { + this(opClass, priorityFromAnnotation(opClass), names); } - public OpClassInfo(final Class opClass, final double priority) { + public OpClassInfo(final Class opClass, final double priority, final String... names) { this.opClass = opClass; + this.names = Arrays.asList(names); + List problems = new ArrayList<>(); try { - struct = ParameterStructs.structOf(opClass); + struct = Structs.from(opClass, problems, new ClassParameterMemberParser(), new ClassOpDependencyMemberParser()); OpUtils.checkHasSingleOutput(struct); } catch (ValidityException e) { validityException = e; @@ -81,6 +90,11 @@ public OpClassInfo(final Class opClass, final double priority) { // -- OpInfo methods -- + @Override + public List names() { + return names; + } + @Override public Type opType() { // TODO: Check whether this is correct! @@ -190,4 +204,9 @@ private static double priorityFromAnnotation(Class annotationBearer) { return opAnnotation == null ? Priority.NORMAL : opAnnotation.priority(); } + private Hints formHints(OpHints h) { + if (h == null) return new ImmutableHints(new String[0]); + return new ImmutableHints(h.hints()); + } + } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpFieldInfo.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpFieldInfo.java similarity index 83% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpFieldInfo.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpFieldInfo.java index f75ed601e..c827a915d 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpFieldInfo.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpFieldInfo.java @@ -27,26 +27,29 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.scijava.Priority; -import org.scijava.ops.OpField; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.OpHints; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; -import org.scijava.param.ValidityProblem; +import org.scijava.ValidityProblem; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.hint.ImmutableHints; +import org.scijava.ops.engine.struct.FieldParameterMemberParser; +import org.scijava.ops.spi.OpField; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; +import org.scijava.struct.Structs; +import org.scijava.struct.ValidityException; /** * Metadata about an op implementation defined as a field. @@ -57,15 +60,17 @@ public class OpFieldInfo implements OpInfo { private final Object instance; private final Field field; + private final List names; private Struct struct; private ValidityException validityException; private final Hints hints; - public OpFieldInfo(final Object instance, final Field field) { + public OpFieldInfo(final Object instance, final Field field, final String... names) { this.instance = instance; this.field = field; + this.names = Arrays.asList(names); if (Modifier.isStatic(field.getModifiers())) { // Field is static; instance must be null. @@ -89,7 +94,8 @@ public OpFieldInfo(final Object instance, final Field field) { // NB: Subclassing a collection and inheriting its fields is NOT // ALLOWED! try { - struct = ParameterStructs.structOf(field); + struct = Structs.from(field, problems, new FieldParameterMemberParser()); +// struct = ParameterStructs.structOf(field); OpUtils.checkHasSingleOutput(struct); // NB: Contextual parameters not supported for now. } catch (ValidityException e) { @@ -104,6 +110,11 @@ public OpFieldInfo(final Object instance, final Field field) { // -- OpInfo methods -- + @Override + public List names() { + return names; + } + @Override public Type opType() { return field.getGenericType(); @@ -186,4 +197,11 @@ public String toString() { return OpUtils.opString(this); } + // -- Helper methods -- // + + private Hints formHints(OpHints h) { + if (h == null) return new ImmutableHints(new String[0]); + return new ImmutableHints(h.hints()); + } + } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMethodInfo.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpMethodInfo.java similarity index 83% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMethodInfo.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpMethodInfo.java index f58dafd4d..5452d5aa1 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpMethodInfo.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpMethodInfo.java @@ -28,7 +28,7 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -38,26 +38,32 @@ import java.lang.reflect.Parameter; import java.lang.reflect.Type; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import org.scijava.Priority; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpDependencyMember; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpMethod; -import org.scijava.ops.OpUtils; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.OpHints; -import org.scijava.ops.util.Adapt; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; -import org.scijava.param.ValidityProblem; +import org.scijava.ValidityProblem; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpDependencyMember; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.hint.ImmutableHints; +import org.scijava.ops.engine.struct.MethodOpDependencyMemberParser; +import org.scijava.ops.engine.struct.MethodParameterMemberParser; +import org.scijava.ops.engine.util.Adapt; +import org.scijava.ops.engine.util.internal.OpMethodUtils; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpMethod; import org.scijava.struct.Member; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; +import org.scijava.struct.Structs; +import org.scijava.struct.ValidityException; import org.scijava.types.Types; +import org.scijava.types.inference.InterfaceInference; import javassist.CannotCompileException; import javassist.ClassPool; @@ -75,13 +81,14 @@ public class OpMethodInfo implements OpInfo { private final Method method; + private final List names; private Type opType; private Struct struct; private final ValidityException validityException; private final Hints hints; - public OpMethodInfo(final Method method) { + public OpMethodInfo(final Method method, final String... names) { final List problems = new ArrayList<>(); // Reject all non public methods if (!Modifier.isPublic(method.getModifiers())) { @@ -96,20 +103,18 @@ public OpMethodInfo(final Method method) { " must be static.")); } this.method = method; + this.names = Arrays.asList(names); this.hints = formHints(method.getAnnotation(OpHints.class)); + // determine the functional interface this Op should implement + final OpMethod methodAnnotation = method.getAnnotation(OpMethod.class); try { - struct = ParameterStructs.structOf(method.getDeclaringClass(), method); - final OpMethod methodAnnotation = method.getAnnotation(OpMethod.class); - try { - opType = ParameterStructs.getOpMethodType(methodAnnotation.type(), - method); - } - catch (IllegalArgumentException e) { - opType = Types.parameterizeRaw(methodAnnotation.type()); - } + opType = OpMethodUtils.getOpMethodType(methodAnnotation.type(), + method); + struct = Structs.from(method, problems, new MethodParameterMemberParser(), new MethodOpDependencyMemberParser()); +// struct = ParameterStructs.structOf(method.getDeclaringClass(), method); } - catch (final ValidityException e) { - problems.addAll(e.problems()); + catch (IllegalArgumentException e) { + problems.add(new ValidityProblem(e)); } validityException = problems.isEmpty() ? null : new ValidityException( problems); @@ -117,6 +122,11 @@ public OpMethodInfo(final Method method) { // -- OpInfo methods -- + @Override + public List names() { + return names; + } + @Override public Type opType() { return opType; @@ -278,7 +288,7 @@ private String createFunctionalMethod(Method m) { StringBuilder sb = new StringBuilder(); // determine the name of the functional method - String methodName = ParameterStructs.singularAbstractMethod(Types.raw( + String methodName = InterfaceInference.singularAbstractMethod(Types.raw( opType)).getName(); // method modifiers @@ -360,4 +370,11 @@ public AnnotatedElement getAnnotationBearer() { return method; } + // -- Helper methods -- // + + private Hints formHints(OpHints h) { + if (h == null) return new ImmutableHints(new String[0]); + return new ImmutableHints(h.hints()); + } + } \ No newline at end of file diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpWrappers.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.java similarity index 99% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpWrappers.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.java index 8b7e5ea82..990e4ca5c 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/OpWrappers.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.java @@ -3,7 +3,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.reflect.Type; import java.util.UUID; @@ -15,12 +15,12 @@ import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.OpInfo; -import org.scijava.ops.hints.BaseOpHints.DependencyMatching; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.provenance.OpExecutionSummary; -import org.scijava.ops.provenance.OpHistory; -import org.scijava.ops.util.OpWrapper; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpExecutionSummary; +import org.scijava.ops.api.OpHistory; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpWrapper; +import org.scijava.ops.engine.BaseOpHints.DependencyMatching; import org.scijava.plugin.Plugin; import org.scijava.types.GenericTyped; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Add.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Add.java similarity index 95% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/Add.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Add.java index c0ab872ac..9eec60338 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Add.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Add.java @@ -1,4 +1,4 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; import com.google.common.collect.Streams; @@ -11,8 +11,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/MathOpCollection.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/MathOpCollection.java similarity index 87% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/MathOpCollection.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/MathOpCollection.java index 75d5f4326..1d0ff8f95 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/MathOpCollection.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/MathOpCollection.java @@ -1,14 +1,12 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; import java.util.function.BiFunction; import java.util.function.BinaryOperator; import org.scijava.Priority; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class MathOpCollection { diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/MathOps.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/MathOps.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/MathOps.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/MathOps.java index 557d1bda7..918e546e6 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/MathOps.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/MathOps.java @@ -1,4 +1,4 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; public class MathOps { public final static String ADD = "math.add"; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Normalize.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Normalize.java similarity index 79% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/Normalize.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Normalize.java index 2e160b60f..79d755b75 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Normalize.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Normalize.java @@ -1,25 +1,26 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; import java.util.Arrays; import org.scijava.function.Functions; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; public class Normalize { public static final String NAMES = "math.minmax"; @Plugin(type = Op.class, name = NAMES) - @Parameter(key = "numbers") - @Parameter(key = "newMin") - @Parameter(key = "newMax") - @Parameter(key = "normalized") public static class MathMinMaxNormalizeFunction implements Functions.Arity3 { - @Override + /** + * TODO + * + * @param numbers + * @param newMin + * @param newMax + */ + @Override public double[] apply(double[] t, Double newMin, Double newMax) { if (newMax == null) { newMax = 1.0; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Power.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Power.java similarity index 65% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/Power.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Power.java index f0e31ef3e..c6b4b9698 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Power.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Power.java @@ -1,10 +1,10 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; import java.util.function.BiFunction; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) @@ -12,6 +12,13 @@ public class Power { public static final String NAMES = MathOps.POW; + /** + * Computes the value of a number raised to the given power. + * + * @input number The number to exponentiate. + * @input exponent The power to which to raise the number. + * @output result The number raised to the exponent. + */ @OpField(names = NAMES, params = "number, exponent, result") public static final BiFunction MathPowerDoubleFunction = (base, exp) -> Math.pow(base, exp); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Sqrt.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Sqrt.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/Sqrt.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Sqrt.java index 64f0806ce..333840e76 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Sqrt.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Sqrt.java @@ -1,11 +1,11 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; import java.util.function.Function; import org.scijava.function.Computers; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Zero.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Zero.java similarity index 73% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/math/Zero.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Zero.java index 51e20c071..43291c1ae 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/math/Zero.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/math/Zero.java @@ -1,11 +1,10 @@ -package org.scijava.ops.math; +package org.scijava.ops.engine.math; import java.util.stream.IntStream; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) @@ -16,7 +15,6 @@ public class Zero { // --------- Computers --------- @OpField(names = NAMES) - @Parameter(key = "resultArray") public static final Computers.Arity0 MathParallelPointwiseZeroDoubleArrayComputer = out -> { IntStream.range(0, out.length).parallel().forEach(i -> { out[i] = 0.0; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/monitor/DefaultOpMonitor.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/monitor/DefaultOpMonitor.java similarity index 91% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/monitor/DefaultOpMonitor.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/monitor/DefaultOpMonitor.java index 78e90084f..89e5aa563 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/monitor/DefaultOpMonitor.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/monitor/DefaultOpMonitor.java @@ -1,6 +1,6 @@ -package org.scijava.ops.monitor; +package org.scijava.ops.engine.monitor; -import org.scijava.ops.log.Logger; +import org.scijava.ops.engine.log.Logger; /** * Default implementation of {@link OpMonitor} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/monitor/OpMonitor.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/monitor/OpMonitor.java similarity index 97% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/monitor/OpMonitor.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/monitor/OpMonitor.java index 78f6f70bd..358db6242 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/monitor/OpMonitor.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/monitor/OpMonitor.java @@ -26,11 +26,11 @@ * POSSIBILITY OF SUCH DAMAGE. * #L% */ -package org.scijava.ops.monitor; +package org.scijava.ops.engine.monitor; import java.util.concurrent.CancellationException; -import org.scijava.ops.log.Logger; +import org.scijava.ops.engine.log.Logger; /** * Used as a bridge between the {@link Op} and the user. Allows the user to diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/package-info.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/package-info.java new file mode 100644 index 000000000..73ae30d27 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/package-info.java @@ -0,0 +1,12 @@ +/** + * This package is intended to contain general-purpose classes that do + * not belong within SciJava Ops API. Usually, this implies that it is an + * implementation detail. + *

+ * This package is {@code export}ed; if a class is not intended to be used + * outside of SciJava Ops Engine, do not place it in this package. + * + * @author Gabriel Selzer + */ + +package org.scijava.ops.engine; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/ChainCluster.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/ChainCluster.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/ChainCluster.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/ChainCluster.java index 193513209..622d6b019 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/ChainCluster.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/ChainCluster.java @@ -1,12 +1,12 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; -import org.scijava.ops.OpInfo; +import org.scijava.ops.api.OpInfo; public class ChainCluster { diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/Identity.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/Identity.java new file mode 100644 index 000000000..012483c4a --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/Identity.java @@ -0,0 +1,26 @@ + +package org.scijava.ops.engine.simplify; + +import java.util.function.Function; + +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.spi.Op; +import org.scijava.plugin.Plugin; + +@OpHints(hints = { Simplification.FORBIDDEN }) +@Plugin(type = Op.class, name = "simplify, focus") +public class Identity implements Function { + + public Identity() {} + + /** + * @param t the object to be simplified + * @return the simplified object (since we are doing an identity + * simplification, this is just a reference to the input object). + */ + @Override + public T apply(T t) { + return t; + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/InfoSimplificationGenerator.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/InfoSimplificationGenerator.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/InfoSimplificationGenerator.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/InfoSimplificationGenerator.java index 2d22f1e24..4ee07a435 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/InfoSimplificationGenerator.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/InfoSimplificationGenerator.java @@ -1,4 +1,4 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import com.google.common.collect.Streams; @@ -9,12 +9,11 @@ import java.util.Map; import java.util.Optional; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.matcher.OpMatchingException; -import org.scijava.ops.matcher.OpRef; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.api.OpUtils; import org.scijava.types.Types; @@ -48,13 +47,13 @@ public OpInfo srcInfo() { return info; } - public OpInfo generateSuitableInfo(OpEnvironment env, OpRef originalRef, Hints hints) throws OpMatchingException { + public OpInfo generateSuitableInfo(OpEnvironment env, OpRef originalRef, Hints hints) { SimplifiedOpRef simpleRef = SimplifiedOpRef.simplificationOf(env, originalRef, hints); return generateSuitableInfo(simpleRef); } public OpInfo generateSuitableInfo(SimplifiedOpRef ref) { - if(!Types.isAssignable(Types.raw(info.opType()), Types.raw(ref.getType()))) + if(!Types.isAssignable(Types.raw(info.opType()), ref.rawType())) throw new IllegalArgumentException("OpInfo and OpRef do not share an Op type"); TypePair[] argPairings = generatePairings(ref); TypePair outPairing = generateOutPairing(ref); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/MutatorChain.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/MutatorChain.java similarity index 93% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/MutatorChain.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/MutatorChain.java index 70b33f9d8..66e3b9a8f 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/MutatorChain.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/MutatorChain.java @@ -1,8 +1,8 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.Type; -import org.scijava.ops.OpInfo; +import org.scijava.ops.api.OpInfo; import org.scijava.util.Types; public class MutatorChain implements Comparable{ diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveArraySimplifiers.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveArraySimplifiers.java similarity index 90% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveArraySimplifiers.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveArraySimplifiers.java index 8d9ad13de..dbd101afe 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveArraySimplifiers.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveArraySimplifiers.java @@ -1,12 +1,12 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.util.function.Function; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.OpHints; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.util.ObjectArray; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveListSimplifier.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveListSimplifier.java similarity index 69% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveListSimplifier.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveListSimplifier.java index b32fff173..a9595f265 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveListSimplifier.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveListSimplifier.java @@ -1,12 +1,10 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.util.List; import java.util.function.Function; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Simplifies {@link List}s of types extending {@link Number}. @@ -14,11 +12,13 @@ * @author Gabriel Selzer */ @Plugin(type = Op.class, name = "simplify") -@Parameter(key = "inList") -@Parameter(key = "simpleList") public class PrimitiveListSimplifier implements Function, List>{ @Override + /* + * @param t the input List + * @return a List whose elements have been simplified + */ public List apply(List t) { @SuppressWarnings({ "unchecked", "rawtypes" }) List numberList = (List) t; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveSimplifiers.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveSimplifiers.java similarity index 91% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveSimplifiers.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveSimplifiers.java index 9c279ed91..f48cf87ae 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/PrimitiveSimplifiers.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/PrimitiveSimplifiers.java @@ -1,12 +1,12 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.util.function.Function; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.OpHints; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplificationMetadata.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplificationMetadata.java similarity index 94% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplificationMetadata.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplificationMetadata.java index 0df3715d3..344a70daa 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplificationMetadata.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplificationMetadata.java @@ -1,5 +1,5 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.Type; import java.util.ArrayList; @@ -11,9 +11,9 @@ import java.util.stream.Collectors; import org.scijava.function.Computers; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; import org.scijava.struct.Member; import org.scijava.util.Types; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplificationUtils.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplificationUtils.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplificationUtils.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplificationUtils.java index 4609a6508..86fbfb990 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplificationUtils.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplificationUtils.java @@ -1,4 +1,4 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import com.google.common.collect.Streams; @@ -21,14 +21,15 @@ import org.scijava.function.Computers; import org.scijava.function.Container; import org.scijava.function.Mutable; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.matcher.MatchingUtils; -import org.scijava.ops.matcher.OpRef; -import org.scijava.ops.util.AnnotationUtils; -import org.scijava.param.ParameterStructs; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.engine.util.internal.AnnotationUtils; import org.scijava.types.Nil; import org.scijava.types.Types; +import org.scijava.types.inference.GenericAssignability; +import org.scijava.types.inference.InterfaceInference; import javassist.CannotCompileException; import javassist.ClassPool; @@ -66,18 +67,18 @@ public static ParameterizedType retypeOpType(Type originalOpType, Type[] newArgs if (!(originalOpType instanceof ParameterizedType)) throw new IllegalStateException("We hadn't thought about this yet."); Class opType = Types.raw(originalOpType); - Method fMethod = findFMethod(opType); + Method fMethod = OpUtils.findFunctionalMethod(opType); Map, Type> typeVarAssigns = new HashMap<>(); // solve input types Type[] genericParameterTypes = paramTypesFromOpType(opType, fMethod); - MatchingUtils.inferTypeVariables(genericParameterTypes, newArgs, typeVarAssigns); + GenericAssignability.inferTypeVariables(genericParameterTypes, newArgs, typeVarAssigns); // solve output type Type genericReturnType = returnTypeFromOpType(opType, fMethod); if (genericReturnType != void.class) { - MatchingUtils.inferTypeVariables(new Type[] {genericReturnType}, new Type[] {newOutType}, typeVarAssigns); + GenericAssignability.inferTypeVariables(new Type[] {genericReturnType}, new Type[] {newOutType}, typeVarAssigns); } // build new (read: simplified) Op type @@ -109,17 +110,11 @@ private static Type[] typesFromOpType(Class opType, Method fMethod, Type... t Type genericDeclaringClass = Types.parameterizeRaw(declaringClass); Type genericClass = Types.parameterizeRaw(opType); Type superGenericClass = Types.getExactSuperType(genericClass, declaringClass); - MatchingUtils.inferTypeVariables(new Type[] {genericDeclaringClass}, new Type[] {superGenericClass}, map); + GenericAssignability.inferTypeVariables(new Type[] {genericDeclaringClass}, new Type[] {superGenericClass}, map); return Types.mapVarToTypes(types, map); } - public static Method findFMethod(Class c) { - Class fIface = ParameterStructs.findFunctionalInterface(c); - if(fIface == null) throw new IllegalArgumentException("Class " + c +" does not implement a functional interface!"); - return ParameterStructs.singularAbstractMethod(fIface); - } - /** * Finds the {@link Mutable} or {@link Container} argument of a * {@link FunctionalInterface}'s singular abstract method. If there is no @@ -132,7 +127,7 @@ public static Method findFMethod(Class c) { * @return the index of the mutable argument (or -1 iff the output is returned). */ public static int findMutableArgIndex(Class c) { - Method fMethod = findFMethod(c); + Method fMethod = OpUtils.findFunctionalMethod(c); for (int i = 0; i < fMethod.getParameterCount(); i++) { if (AnnotationUtils.getMethodParameterAnnotation(fMethod, i, Mutable.class) != null) return i; @@ -162,7 +157,7 @@ public static int findMutableArgIndex(Class c) { public static Type resolveMutatorTypeArgs(Type inferFrom, Type mutatorInferFrom, Type unresolvedType) { if(!Types.containsTypeVars(unresolvedType)) return unresolvedType; Map, Type> map = new HashMap<>(); - MatchingUtils.inferTypeVariables(new Type[] {mutatorInferFrom}, new Type[] {inferFrom}, map); + GenericAssignability.inferTypeVariables(new Type[] {mutatorInferFrom}, new Type[] {inferFrom}, map); return Types.mapVarToTypes(unresolvedType, map); } @@ -476,7 +471,7 @@ private static String createFunctionalMethod(SimplificationMetadata metadata) { StringBuilder sb = new StringBuilder(); // determine the name of the functional method - Method m = ParameterStructs.singularAbstractMethod(metadata.opType()); + Method m = InterfaceInference.singularAbstractMethod(metadata.opType()); // determine the name of the output: String opOutput = ""; int ioIndex = metadata.ioArgIndex(); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedMember.java similarity index 76% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedMember.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedMember.java index bf3cd515c..418f38f36 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedMember.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedMember.java @@ -1,4 +1,4 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.Type; @@ -20,6 +20,11 @@ public String getKey() { return original.getKey(); } + @Override + public String getDescription() { + return original.getDescription(); + } + @Override public Type getType() { return newType; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedOpInfo.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedOpInfo.java similarity index 78% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedOpInfo.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedOpInfo.java index 6c6745c59..4a7bf1259 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedOpInfo.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedOpInfo.java @@ -1,30 +1,31 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Type; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Objects; -import java.util.stream.Collectors; import org.scijava.Priority; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpUtils; -import org.scijava.ops.conversionLoss.LossReporter; -import org.scijava.ops.core.Op; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.OpHints; -import org.scijava.ops.hints.impl.ImmutableHints; -import org.scijava.ops.matcher.OpMatchingException; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; +import org.scijava.ValidityProblem; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.conversionLoss.LossReporter; +import org.scijava.ops.engine.hint.ImmutableHints; +import org.scijava.ops.engine.matcher.OpMatchingException; +import org.scijava.ops.engine.struct.OpRetypingMemberParser; +import org.scijava.ops.engine.struct.RetypingRequest; +import org.scijava.ops.spi.Op; +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.ItemIO; import org.scijava.struct.Member; import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; +import org.scijava.struct.Structs; +import org.scijava.struct.ValidityException; import org.scijava.types.Nil; import org.scijava.types.Types; import org.scijava.util.MiscUtils; @@ -42,38 +43,47 @@ public class SimplifiedOpInfo implements OpInfo { private ValidityException validityException; public SimplifiedOpInfo(OpInfo info, OpEnvironment env, SimplificationMetadata metadata) { + List problems = new ArrayList<>(); this.srcInfo = info; this.metadata = metadata; - Type[] inputs = metadata.originalInputs(); - Type output = metadata.focusedOutput(); - this.opType = SimplificationUtils.retypeOpType(info.opType(), inputs, output); - try { - this.struct = ParameterStructs.structOf(info, opType); - } - catch (ValidityException exc) { - validityException = exc; + // generate new input fmts + Type[] inputTypes = metadata.originalInputs(); + Type outputType = metadata.focusedOutput(); + List> ioMembers = info.struct().members(); + ioMembers.removeIf(m -> m.getIOType() == ItemIO.NONE); + int index = 0; + List fmts = new ArrayList<>(); + for (Member m : ioMembers) { + Type newType = m.isInput() ? inputTypes[index++] : m.isOutput() + ? outputType : null; + fmts.add(new FunctionalMethodType(newType, m.getIOType())); } + // generate new output fmt + this.opType = SimplificationUtils.retypeOpType(info.opType(), inputTypes, + outputType); + RetypingRequest r = new RetypingRequest(info.struct(), fmts); + this.struct = Structs.from(r, problems, new OpRetypingMemberParser()); this.priority = calculatePriority(info, metadata, env); List hintList = new ArrayList<>(srcInfo.declaredHints().getHints().values()); hintList.remove(Simplification.ALLOWED); hintList.add(Simplification.FORBIDDEN); this.hints = new ImmutableHints(hintList.toArray(String[]::new)); - } - @Override - public Hints formHints(OpHints h) { - // NB we don't use Arrays.toList() here because we cannot add to that list! - List hintList = Arrays.stream(h.hints()).collect(Collectors.toList()); - hintList.remove(Adaptation.ALLOWED); - hintList.add(Adaptation.FORBIDDEN); - return new ImmutableHints(hintList.toArray(String[]::new)); + if(!problems.isEmpty()) { + validityException = new ValidityException(problems); + } } public OpInfo srcInfo() { return srcInfo; } + @Override + public List names() { + return srcInfo().names(); + } + @Override public Type opType() { return opType; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedOpRef.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedOpRef.java similarity index 60% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedOpRef.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedOpRef.java index fcb1a8c82..daf3da58a 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/SimplifiedOpRef.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/SimplifiedOpRef.java @@ -1,55 +1,59 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Optional; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.impl.DefaultHints; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.matcher.OpMatchingException; import org.scijava.function.Computers; import org.scijava.function.Computers.Arity1; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.OpInfo; -import org.scijava.ops.matcher.OpRef; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpRef; +import org.scijava.ops.engine.BaseOpHints.Adaptation; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.hint.DefaultHints; +import org.scijava.ops.engine.matcher.OpMatchingException; import org.scijava.types.Nil; import org.scijava.types.Types; -public class SimplifiedOpRef extends OpRef { +public class SimplifiedOpRef implements OpRef { + + /** Name of the op, or null for any name. */ + private final String name; + + /** Raw type of the request */ + private final Class rawType; private final OpRef srcRef; private final List> simplifierSets; private final List outputFocusers; private final Optional> copyOp; - private SimplifiedOpRef(String name, Type type, Type outType, - Type[] args) - { - super(name, type, outType, args); - throw new UnsupportedOperationException("Simplified OpRef requires original OpRef!"); - } - private SimplifiedOpRef(OpRef ref, OpEnvironment env) { // TODO: this is probably incorrect - super(ref.getName(), ref.getType(), ref.getOutType(), ref.getArgs()); + this.name = ref.getName(); + this.rawType = Types.raw(ref.getType()); this.srcRef = ref; this.simplifierSets = SimplificationUtils.simplifyArgs(env, ref.getArgs()); - this.outputFocusers = SimplificationUtils.getFocusers(env, ref.getOutType()); + this.outputFocusers = SimplificationUtils.getFocusers(env, ref + .getOutType()); this.copyOp = Optional.empty(); } - private SimplifiedOpRef(OpRef ref, OpEnvironment env, Computers.Arity1 copyOp) { - // TODO: this is probably incorrect - super(ref.getName(), ref.getType(), ref.getOutType(), ref.getArgs()); + private SimplifiedOpRef(OpRef ref, OpEnvironment env, + Computers.Arity1 copyOp) + { + this.name = ref.getName(); + this.rawType = Types.raw(ref.getType()); this.srcRef = ref; this.simplifierSets = SimplificationUtils.simplifyArgs(env, ref.getArgs()); - this.outputFocusers = SimplificationUtils.getFocusers(env, ref.getOutType()); + this.outputFocusers = SimplificationUtils.getFocusers(env, ref + .getOutType()); this.copyOp = Optional.of(copyOp); } @@ -57,6 +61,10 @@ public OpRef srcRef() { return srcRef; } + public Class rawType() { + return rawType; + } + public List> simplifierSets() { return simplifierSets; } @@ -69,7 +77,9 @@ public List outputFocusers() { return copyOp; } - public static SimplifiedOpRef simplificationOf(OpEnvironment env, OpRef ref, Hints hints) throws OpMatchingException { + public static SimplifiedOpRef simplificationOf(OpEnvironment env, OpRef ref, + Hints hints) + { Class opType = Types.raw(ref.getType()); int mutableIndex = SimplificationUtils.findMutableArgIndex(opType); if (mutableIndex == -1) return new SimplifiedOpRef(ref, env); @@ -115,4 +125,45 @@ public static SimplifiedOpRef simplificationOf(OpEnvironment env, OpRef ref, Hin return (Arity1) env.op("copy", Nil.of(copierType), new Nil[] {copyNil, copyNil}, copyNil, hintsCopy); } + @Override + public String getName() { + return name; + } + + @Override + public Type getType() { + throw new UnsupportedOperationException( + "The type of a SimplifiedOpRef is indeterminate; it must be matched with a OpInfo to form a concrete Type"); + } + + @Override + public Type getOutType() { + throw new UnsupportedOperationException( + "The output type of a SimplifiedOpRef is indeterminate; it must be matched with a OpInfo to form a concrete Type"); + } + + @Override + public Type[] getArgs() { + throw new UnsupportedOperationException( + "The output type of a SimplifiedOpRef is indeterminate; it must be matched with a OpInfo to form a concrete Type"); + } + + @Override + public String getLabel() { + return "Simplification of " + srcRef.getLabel(); + } + + @Override + public boolean typesMatch(Type opType) { + return typesMatch(opType, new HashMap<>()); + } + + @Override + public boolean typesMatch(Type opType, + Map, Type> typeVarAssigns) + { + throw new UnsupportedOperationException( + "The type of a SimplifiedOpRef is indeterminate; it must be matched with an OpInfo to form a concrete Type!"); + } + } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/Simplifier.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/Simplifier.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/Simplifier.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/Simplifier.java index ca3250d2d..a7c8a00d3 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/Simplifier.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/Simplifier.java @@ -1,5 +1,5 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.Type; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/TypePair.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/TypePair.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/TypePair.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/TypePair.java index 0682db38b..ad08862b3 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/TypePair.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/simplify/TypePair.java @@ -1,4 +1,4 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import java.lang.reflect.Type; import java.util.Arrays; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/stats/Mean.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/stats/Mean.java similarity index 69% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/stats/Mean.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/stats/Mean.java index bc51cb40a..a6a304e96 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/stats/Mean.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/stats/Mean.java @@ -1,19 +1,15 @@ -package org.scijava.ops.stats; +package org.scijava.ops.engine.stats; import java.util.function.BiFunction; import java.util.function.Function; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpDependency; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; public class Mean { @Plugin(type = Op.class, name = "stats.mean") - @Parameter(key = "iterable") - @Parameter(key = "mean") public static class MeanFunction implements Function, O>{ @OpDependency(name = "math.add") @@ -25,7 +21,16 @@ public static class MeanFunction implements Function, O>{ @OpDependency(name = "math.div") BiFunction divFunc; - @Override + /** + * @param iterable the set of data to operate on + * @return the mean of the data + */ + /** + * TODO + * + * @param iterable + */ + @Override public O apply(Iterable iterable) { return divFunc.apply(sumFunc.apply(iterable), sizeFunc.apply(iterable)); } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/stats/Size.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/stats/Size.java similarity index 65% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/stats/Size.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/stats/Size.java index eab5d7d92..0f3aaac02 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/stats/Size.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/stats/Size.java @@ -1,32 +1,43 @@ -package org.scijava.ops.stats; + +package org.scijava.ops.engine.stats; import java.util.function.Function; import java.util.stream.StreamSupport; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; public class Size { @Plugin(type = Op.class, name = "stats.size") - @Parameter(key = "iterable") - @Parameter(key = "size") public static class StatsSizeFunction implements Function, Long>{ - @Override + /** + * @param iterable the data to operate over + * @return the size of the dataset + */ + /** + * TODO + * + * @param iterable + * @param size + */ + @Override public Long apply(Iterable iterable) { return StreamSupport.stream(iterable.spliterator(), false).count(); } } - + @Plugin(type = Op.class, name = "stats.size") - @Parameter(key = "iterable") - @Parameter(key = "size") public static class StatsSizeFunctionDouble implements Function, Double>{ - @Override + /** + * TODO + * + * @param iterable + * @param size + */ + @Override public Double apply(Iterable iterable) { return (double) StreamSupport.stream(iterable.spliterator(), false).count(); } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/AnnotatedOpDependencyMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/AnnotatedOpDependencyMember.java similarity index 90% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/AnnotatedOpDependencyMember.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/AnnotatedOpDependencyMember.java index b7946dd2c..887b7cf26 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/AnnotatedOpDependencyMember.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/AnnotatedOpDependencyMember.java @@ -28,10 +28,13 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.struct; import java.lang.reflect.Type; +import org.scijava.ops.api.OpDependencyMember; +import org.scijava.ops.spi.OpDependency; + /** * @author Marcel Wiedenmann */ @@ -61,7 +64,7 @@ public OpDependency getAnnotation() { public String getDependencyName() { return annotation.name(); } - + @Override public boolean isAdaptable() { return annotation.adaptable(); @@ -74,6 +77,12 @@ public String getKey() { return key; } + @Override + public String getDescription() { + // TODO: consider more implementation here + return ""; + } + @Override public Type getType() { return type; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ClassOpDependencyMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ClassOpDependencyMemberParser.java new file mode 100644 index 000000000..e08f82a56 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ClassOpDependencyMemberParser.java @@ -0,0 +1,62 @@ + +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.List; + +import org.scijava.ValidityProblem; +import org.scijava.ops.spi.OpDependency; +import org.scijava.struct.MemberParser; +import org.scijava.struct.ValidityException; +import org.scijava.util.ClassUtils; + +public class ClassOpDependencyMemberParser implements + MemberParser, FieldOpDependencyMember> +{ + + @Override + public List> parse(Class source) + throws ValidityException + { + if (source == null) return null; + + final ArrayList> items = new ArrayList<>(); + final ArrayList problems = new ArrayList<>(); + + // NB: Reject abstract classes. + org.scijava.struct.Structs.checkModifiers(source.getName() + ": ", problems, source.getModifiers(), true, Modifier.ABSTRACT); + + // Parse field level @OpDependency annotations. + parseFieldOpDependencies(items, problems, source); + + // Fail if there were any problems. + if (!problems.isEmpty()) throw new ValidityException(problems); + + return items; + } + + private static void parseFieldOpDependencies(final List> items, + final List problems, Class annotatedClass) + { + final List fields = ClassUtils.getAnnotatedFields(annotatedClass, + OpDependency.class); + for (final Field f : fields) { + f.setAccessible(true); + final boolean isFinal = Modifier.isFinal(f.getModifiers()); + if (isFinal) { + final String name = f.getName(); + // Final fields are bad because they cannot be modified. + final String error = "Invalid final Op dependency field: " + name; + problems.add(new ValidityProblem(error)); + // Skip invalid Op dependencies. + continue; + } + final FieldOpDependencyMember item = new FieldOpDependencyMember<>(f, + annotatedClass); + items.add(item); + } + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ClassParameterMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ClassParameterMemberParser.java new file mode 100644 index 000000000..e8d70261f --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ClassParameterMemberParser.java @@ -0,0 +1,47 @@ + +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.scijava.ValidityProblem; +import org.scijava.struct.MemberParser; +import org.scijava.struct.ValidityException; + +public class ClassParameterMemberParser implements + MemberParser, SynthesizedParameterMember> +{ + + @Override + public List> parse(Class source) + throws ValidityException + { + if (source == null) return null; + + final ArrayList> items = new ArrayList<>(); + final ArrayList problems = new ArrayList<>(); + final Set names = new HashSet<>(); + + // NB: Reject abstract classes. + org.scijava.struct.Structs.checkModifiers(source.getName() + ": ", problems, source.getModifiers(), true, Modifier.ABSTRACT); + + // obtain a parameterData (preferably one that scrapes the javadoc) + ParameterData paramData; + try { + paramData = new JavadocParameterData(source); + } catch(NullPointerException | IllegalArgumentException e) { + paramData = new SynthesizedParameterData(); + } + + FunctionalParameters.parseFunctionalParameters(items, names, problems, source, paramData); + + // Fail if there were any problems. + if (!problems.isEmpty()) throw new ValidityException(problems); + + return items; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ConvertedParameterMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ConvertedParameterMember.java new file mode 100644 index 000000000..29c492a9f --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ConvertedParameterMember.java @@ -0,0 +1,52 @@ +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Type; + +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.ItemIO; +import org.scijava.struct.Member; + +/** + * {@link Member} whose {@link Type} has been converted into another {@link Type} + * + * @author Gabriel Selzer + * + * @param + */ +public class ConvertedParameterMember implements Member{ + + final Member original; + final Type newType; + final ItemIO ioType; + + public ConvertedParameterMember(Member original, FunctionalMethodType newType) { + this.original = original; + this.newType = newType.type(); + this.ioType = newType.itemIO(); + } + + public static ConvertedParameterMember from(Member original, FunctionalMethodType newType) { + return new ConvertedParameterMember<>(original, newType); + } + + @Override + public String getKey() { + return original.getKey(); + } + + @Override + public String getDescription() { + return original.getDescription(); + } + + @Override + public Type getType() { + return newType; + } + + @Override + public ItemIO getIOType() { + return ioType; + } + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/FieldOpDependencyMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FieldOpDependencyMember.java similarity index 97% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/FieldOpDependencyMember.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FieldOpDependencyMember.java index 75a6fb905..2868da597 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/FieldOpDependencyMember.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FieldOpDependencyMember.java @@ -28,10 +28,11 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.struct; import java.lang.reflect.Field; +import org.scijava.ops.spi.OpDependency; import org.scijava.struct.MemberInstance; import org.scijava.struct.ValueAccessible; import org.scijava.struct.ValueAccessibleMemberInstance; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FieldParameterMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FieldParameterMemberParser.java new file mode 100644 index 000000000..9a49538fa --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FieldParameterMemberParser.java @@ -0,0 +1,53 @@ + +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.scijava.ValidityProblem; +import org.scijava.struct.MemberParser; +import org.scijava.struct.ValidityException; +import org.scijava.types.Types; + +public class FieldParameterMemberParser implements + MemberParser> +{ + + @Override + public List> parse(Field source) + throws ValidityException + { + if (source == null) return null; + Class c = source.getDeclaringClass(); + // obtain a parameterData (preferably one that scrapes the javadoc) + ParameterData paramData; + try { + paramData = new JavadocParameterData(source); + } + catch (IllegalArgumentException e) { + paramData = new SynthesizedParameterData(); + } + source.setAccessible(true); + + final ArrayList> items = new ArrayList<>(); + final ArrayList problems = new ArrayList<>(); + final Set names = new HashSet<>(); + final Type fieldType = Types.fieldType(source, c); + + org.scijava.struct.Structs.checkModifiers(source.toString() + ": ", problems, source + .getModifiers(), false, Modifier.FINAL); + FunctionalParameters.parseFunctionalParameters(items, names, problems, fieldType, + paramData); + // Fail if there were any problems. + if (!problems.isEmpty()) { + throw new ValidityException(problems); + } + return items; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FunctionalParameterMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FunctionalParameterMemberParser.java new file mode 100644 index 000000000..c45836134 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FunctionalParameterMemberParser.java @@ -0,0 +1,107 @@ +package org.scijava.ops.engine.struct; +// +//package org.scijava.ops.struct; +// +//import java.lang.reflect.AnnotatedElement; +//import java.lang.reflect.Method; +//import java.lang.reflect.Type; +//import java.util.ArrayList; +//import java.util.List; +// +//import org.scijava.function.Container; +//import org.scijava.function.Mutable; +//import org.scijava.ops.util.AnnotationUtils; +//import org.scijava.param.FunctionalMethodType; +//import org.scijava.param.SynthesizedParameterMember; +//import org.scijava.param.ValidityProblem; +//import org.scijava.struct.ItemIO; +//import org.scijava.struct.Member; +//import org.scijava.types.Types; +// +//public class FunctionalParameterMemberParser implements +// MemberParser> +//{ +// +// @Override +// public List> parse(AnnotatedElement source) { +// // Search for the functional method of 'type' and map its signature to +// // ItemIO +// List fmts; +// try { +// fmts = findFunctionalMethodTypes(type); +// } +// catch (IllegalArgumentException e) { +// problems.add(new ValidityProblem("Could not find functional method of " + +// type.getTypeName())); +// return; +// } +// +// // Synthesize members +// List> fmtMembers = data.synthesizeMembers(fmts); +// +// for (Member m : fmtMembers) { +// String key = m.getKey(); +// final Type itemType = m.getType(); +// +// final boolean valid = checkValidity(m, key, Types.raw(itemType), false, +// names, problems); +// if (!valid) continue; +// items.add(m); +// names.add(m.getKey()); +// } +// } +// +// /** +// * Returns a list of {@link FunctionalMethodType}s describing the input and +// * output types of the functional method of the specified functional type. In +// * doing so, the return type of the method will me marked as +// * {@link ItemIO#OUTPUT} and the all method parameters as +// * {@link ItemIO#OUTPUT}, except for parameters annotated with +// * {@link Container} or {@link Mutable} which will be marked as +// * {@link ItemIO#CONTAINER} or {@link ItemIO#MUTABLE} respectively. If the +// * specified type does not have a functional method in its hierarchy, +// * {@code null} will be returned.
+// * The order will be the following: method parameters from left to right, then +// * return type. +// * +// * @param functionalType +// * @return +// */ +// public static List findFunctionalMethodTypes( +// Type functionalType) +// { +// Method functionalMethod = findFunctionalMethod(Types.raw(functionalType)); +// if (functionalMethod == null) throw new IllegalArgumentException("Type " + +// functionalType + +// " is not a functional type, thus its functional method types cannot be determined"); +// +// Type paramfunctionalType = functionalType; +// if (functionalType instanceof Class) { +// paramfunctionalType = Types.parameterizeRaw((Class) functionalType); +// } +// +// List out = new ArrayList<>(); +// int i = 0; +// for (Type t : Types.getExactParameterTypes(functionalMethod, +// paramfunctionalType)) +// { +// final ItemIO ioType; +// if (AnnotationUtils.getMethodParameterAnnotation(functionalMethod, i, +// Container.class) != null) ioType = ItemIO.CONTAINER; +// else if (AnnotationUtils.getMethodParameterAnnotation(functionalMethod, i, +// Mutable.class) != null) ioType = ItemIO.MUTABLE; +// else ioType = ItemIO.INPUT; +// out.add(new FunctionalMethodType(t, ioType)); +// i++; +// } +// +// Type returnType = Types.getExactReturnType(functionalMethod, +// paramfunctionalType); +// if (!returnType.equals(void.class)) { +// out.add(new FunctionalMethodType(returnType, ItemIO.OUTPUT)); +// } +// +// return out; +// } +// +//} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FunctionalParameters.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FunctionalParameters.java new file mode 100644 index 000000000..f1d283340 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/FunctionalParameters.java @@ -0,0 +1,104 @@ +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.scijava.ValidityProblem; +import org.scijava.function.Container; +import org.scijava.function.Mutable; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.engine.util.internal.AnnotationUtils; +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.ItemIO; +import org.scijava.types.Types; + +public class FunctionalParameters { + + public static void parseFunctionalParameters( + final ArrayList> items, final Set names, + final ArrayList problems, Type type, ParameterData data) + { + // Search for the functional method of 'type' and map its signature to + // ItemIO + List fmts; + try { + fmts = FunctionalParameters.findFunctionalMethodTypes(type); + } + catch (IllegalArgumentException e) { + problems.add(new ValidityProblem("Could not find functional method of " + + type.getTypeName())); + return; + } + + // Synthesize members + List> fmtMembers = data.synthesizeMembers(fmts); + + for (SynthesizedParameterMember m : fmtMembers) { + String key = m.getKey(); + final Type itemType = m.getType(); + + final boolean valid = org.scijava.struct.Structs.checkValidity(m, key, Types.raw(itemType), false, + names, problems); + if (!valid) continue; + items.add(m); + names.add(m.getKey()); + } + } + + /** + * Returns a list of {@link FunctionalMethodType}s describing the input and + * output types of the functional method of the specified functional type. In + * doing so, the return type of the method will me marked as + * {@link ItemIO#OUTPUT} and the all method parameters as + * {@link ItemIO#OUTPUT}, except for parameters annotated with + * {@link Container} or {@link Mutable} which will be marked as + * {@link ItemIO#CONTAINER} or {@link ItemIO#MUTABLE} respectively. If the + * specified type does not have a functional method in its hierarchy, + * {@code null} will be returned.
+ * The order will be the following: method parameters from left to right, then + * return type. + * + * @param functionalType + * @return + */ + public static List findFunctionalMethodTypes( + Type functionalType) + { + Method functionalMethod = OpUtils.findFunctionalMethod(Types.raw(functionalType)); + if (functionalMethod == null) throw new IllegalArgumentException("Type " + + functionalType + + " is not a functional type, thus its functional method types cannot be determined"); + + Type paramfunctionalType = functionalType; + if (functionalType instanceof Class) { + paramfunctionalType = Types.parameterizeRaw((Class) functionalType); + } + + List out = new ArrayList<>(); + int i = 0; + for (Type t : Types.getExactParameterTypes(functionalMethod, + paramfunctionalType)) + { + final ItemIO ioType; + if (AnnotationUtils.getMethodParameterAnnotation(functionalMethod, i, + Container.class) != null) ioType = ItemIO.CONTAINER; + else if (AnnotationUtils.getMethodParameterAnnotation(functionalMethod, i, + Mutable.class) != null) ioType = ItemIO.MUTABLE; + else ioType = ItemIO.INPUT; + out.add(new FunctionalMethodType(t, ioType)); + i++; + } + + Type returnType = Types.getExactReturnType(functionalMethod, + paramfunctionalType); + if (!returnType.equals(void.class)) { + out.add(new FunctionalMethodType(returnType, ItemIO.OUTPUT)); + } + + return out; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/JavadocParameterData.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/JavadocParameterData.java new file mode 100644 index 000000000..73f556ca7 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/JavadocParameterData.java @@ -0,0 +1,343 @@ + +package org.scijava.ops.engine.struct; + +import com.github.therapi.runtimejavadoc.Comment; +import com.github.therapi.runtimejavadoc.FieldJavadoc; +import com.github.therapi.runtimejavadoc.MethodJavadoc; +import com.github.therapi.runtimejavadoc.OtherJavadoc; +import com.github.therapi.runtimejavadoc.ParamJavadoc; +import com.github.therapi.runtimejavadoc.RuntimeJavadoc; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.spi.OpDependency; +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.Member; +import org.scijava.types.Types; +import org.scijava.types.inference.InterfaceInference; + +/** + * Class able to scrape Op parameter metadata off the Op's Javadoc. + * + * @author Gabriel Selzer + */ +public class JavadocParameterData implements ParameterData { + + List paramNames; + List paramDescriptions; + String returnDescription; + + public JavadocParameterData(Method m) { + parseMethod(m); + } + + public JavadocParameterData(Class c) { + try { + parseMethod(getOpMethod(c)); + } + catch (NoSuchMethodException e) { + throw new IllegalArgumentException("Op class " + c + + " does not declare a functional method!"); + } + } + + /** + * Parses a {@link Field} for {@code @param}, {@code @return} tags. HACK: + * since {@code Field}s shouldn't normally have these tags, we have to parse + * these manually. + * + * @param f the field + */ + public JavadocParameterData(Field f) { + Method sam = InterfaceInference.singularAbstractMethod(f.getType()); + FieldJavadoc doc = RuntimeJavadoc.getJavadoc(f); + long numIns = sam.getParameterCount(); + long numOuts = 1; // There is always one output + if (hasCustomJavadoc(doc.getOther(), numIns, numOuts)) + populateViaCustomTaglets(doc.getOther()); + else throw new IllegalArgumentException("Field " + f + + " does not have enough taglets to generate OpInfo documentation!"); + } + + public JavadocParameterData(OpInfo info, Type newType) { + paramNames = new ArrayList<>(); + paramDescriptions = new ArrayList<>(); + List> inputs = new ArrayList<>(info.inputs()); + Member output = info.output(); + + // this method is called when the op is adapted/simplified. In the case of + // adaptation, the op's output might shift from a pure output to an input, + // or might shift from a container to a pure output. We + Method sam = InterfaceInference.singularAbstractMethod(Types.raw(newType)); + if (sam.getParameterCount() > inputs.size()) { + inputs.add(output); + } + else if (sam.getParameterCount() < inputs.size()) { + // one of the inputs is an I/O and should be a pure output. We need to + // remove it from the inputs. + Optional> ioMember = inputs.parallelStream().filter(m -> m + .isOutput()).findFirst(); + if (ioMember == null) throw new IllegalArgumentException( + "Cannot transform Op of type " + info.opType() + " into type " + + newType + "; at least one input must also be an output!"); + + inputs.remove(ioMember.get()); + } + for (Member m : inputs) { + paramNames.add(m.getKey()); + paramDescriptions.add(m.getDescription()); + } + returnDescription = output.getDescription(); + } + + public List paramNames() { + return paramNames; + } + + public List paramDescriptions() { + return paramDescriptions; + } + + public String returnDescription() { + return returnDescription; + } + + // -- Helper methods -- // + + /** + * Finds the abstract {@link FunctionalInterface} method implemented by the Op + * {@code c} + * + * @param c the Op {@link Class} + * @return the {@link Method} of the {@link FunctionalInterface} implemented + * by {@code c} + * @throws NoSuchMethodException when {@code c} does not implement its + * functional method + */ + private Method getOpMethod(Class c) throws NoSuchMethodException { + // NB this is the functional method w.r.t. the interface, not w.r.t. the Op + Method fMethod = OpUtils.findFunctionalMethod(c); + Type[] paramTypes = Types.getExactParameterTypes(fMethod, c); + Class[] rawParamTypes = Arrays.stream(paramTypes).map(t -> Types.raw(t)) + .toArray(Class[]::new); + return c.getMethod(fMethod.getName(), rawParamTypes); + } + + /** + * Parses the {@code @param} and {@code @return} annotations of {@link Method} + * {@code m}. + * + * @param m the method whose javadoc has tags we want to parse + */ + private void parseMethod(Method m) { + // determine the Op inputs/outputs + MethodJavadoc doc = RuntimeJavadoc.getJavadoc(m); + long numOpParams = getOpParams(m); + long numReturns = m.getReturnType() == void.class ? 0 : 1; + // ensure the method declares a complete set of tags + if (!hasVanillaJavadoc(doc, numOpParams, numReturns)) + throw new IllegalArgumentException("Method " + m + + " has no suitable tag(lets) to scrape documentation from"); + // scrape the conventional javadoc tags + populateViaParamAndReturn(doc.getParams(), doc.getReturns()); + } + + private long getOpParams(Method m) { + return Arrays // + .stream(m.getParameters()) // + .filter(param -> param.getAnnotation(OpDependency.class) == null).count(); + } + + /** + * Determines whether {@code doc} has enough {@code @param} tags to satisfy + * the number of inputs to the Op ({@code numParams}), as well as enough + * {@code @return} taglets to satisfy the number of Op outputs + * ({@code numReturns}). + * + * @param doc the {@link OtherJavadoc}s found by the javadoc parser. + * @param numParams the desired number of inputs + * @param numReturns the desired number of outputs + * @return true iff there are {@code numParams} inputs and {@code numReturns} + * outputs + */ + private boolean hasVanillaJavadoc(MethodJavadoc doc, long numParams, + long numReturns) + { + // We require a @param tag for each of the method parameters + boolean sufficientParams = doc.getParams().size() == numParams; + // We require a @return tag for the method return iff not null + boolean javadocReturn = !doc.getReturns().toString().isEmpty(); + boolean methodReturn = numReturns == 1; + boolean sufficientReturn = javadocReturn == methodReturn; + return sufficientParams && sufficientReturn; + } + + /** + * Determines whether {@code doc} has enough + * {@code @input/@container/@mutable} tags to satisfy the number of inputs to + * the Op ({@code numIns}), as well as enough + * {@code @container/@mutable/@output} taglets to satisfy the number of Op + * outputs ({@code numOuts}). + * + * @param doc the {@link OtherJavadoc}s found by the javadoc parser. + * @param numIns the desired number of inputs + * @param numOuts the desired number of outputs + * @return true iff there are {@code numIns} inputs and {@code numOuts} + * outputs + */ + private boolean hasCustomJavadoc(List doc, long numIns, + long numOuts) + { + int ins = 0, outs = 0; + for (OtherJavadoc other : doc) { + switch (other.getName()) { + case "input": + ins++; + break; + case "container": + case "mutable": + ins++; + outs++; + break; + case "output": + outs++; + break; + } + } + // We require as many input/container/mutable taglets as there are + // parameters + boolean sufficientIns = ins == numIns; + // We require one container/mutable/output taglet + boolean sufficientOuts = outs == numOuts; + return sufficientIns && sufficientOuts; + } + + /** + * Populates {@link JavadocParameterData#paramNames} and + * {@link JavadocParameterData#paramDescriptions} using {@code params}, and + * {@link JavadocParameterData#returnDescription} using {@code returnDoc}. + * + * @param params the {@code @param} tags on the method of interest + * @param returnDoc the string following {@code @return} + */ + private void populateViaParamAndReturn(List params, + Comment returnDoc) + { + paramNames = params.stream().map(param -> param.getName()).collect( + Collectors.toList()); + paramDescriptions = params.stream().map(param -> param.getComment() + .toString()).collect(Collectors.toList()); + returnDescription = returnDoc.toString(); + } + + /** + * Populates {@link JavadocParameterData#paramNames}, + * {@link JavadocParameterData#paramDescriptions}, and, and + * {@link JavadocParameterData#returnDescription} using + * {@code @input/@output/@container/@mutable} taglets. + * + * @param doc the {@link List} of {@link OtherJavadoc}s containing all of the + * taglets we need to parse + */ + private void populateViaCustomTaglets(List doc) { + paramNames = new ArrayList<>(); + paramDescriptions = new ArrayList<>(); + for (OtherJavadoc other : doc) { + String name = other.getName(); + if (!validParameterTag(name)) continue; + // add to params if not a pure output + if (!name.equals("output")) { + String param = other.getComment().toString(); + int space = param.indexOf(" "); + if (space != -1) { + paramNames.add(param.substring(0, param.indexOf(" "))); + paramDescriptions.add(param.substring(param.indexOf(" ") + 1)); + } + else { + paramNames.add(param); + paramDescriptions.add(""); + } + } + // add return description if an I/O + if (!name.equals("input")) { + if (returnDescription != null) throw new IllegalArgumentException( + "Op cannot have multiple returns!"); + returnDescription = other.getComment().toString(); + } + } + } + + /** + * Determines if {@code tagType} is one of the tags that we are interested in + * scraping. + * + * @param tagType the tag we might need to scrape + * @return true iff it is interesting to us + */ + private boolean validParameterTag(String tagType) { + if (tagType.equals("input")) return true; + if (tagType.equals("mutable")) return true; + if (tagType.equals("container")) return true; + if (tagType.equals("output")) return true; + return false; + } + + /** + * Synthesizes a set of {@link Member}s using the data present in the + * javadoc, as well as {@code fmts}. + * + * @param fmts the list of inputs, outputs, and other types required by the Op + */ + @Override + public List> synthesizeMembers(List fmts) { + List> params = new ArrayList<>(); + int ins = 0; + int outs = 0; + + for (FunctionalMethodType fmt : fmts) { + String key; + String description; + switch (fmt.itemIO()) { + case INPUT: + key = paramNames.get(ins); + description = paramDescriptions.get(ins); + ins++; + break; + case OUTPUT: + // NB the @return tag does not provide a name, only a comment + key = "output" + (outs == 0 ? "" : outs); + description = returnDescription; + outs++; + break; + case CONTAINER: + key = paramNames.get(ins); + description = paramDescriptions.get(ins); + ins++; + outs++; + break; + case MUTABLE: + key = paramNames.get(ins); + description = paramDescriptions.get(ins); + ins++; + outs++; + break; + default: + throw new RuntimeException("Unexpected ItemIO type encountered!"); + } + + params.add(new SynthesizedParameterMember<>(fmt.type(), key, description, + fmt.itemIO())); + } + return params; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodOpDependencyMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodOpDependencyMemberParser.java new file mode 100644 index 000000000..d9b79ecf8 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodOpDependencyMemberParser.java @@ -0,0 +1,64 @@ + +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.scijava.ValidityProblem; +import org.scijava.ops.spi.OpDependency; +import org.scijava.struct.MemberParser; +import org.scijava.struct.ValidityException; + +public class MethodOpDependencyMemberParser implements + MemberParser> +{ + + @Override + public List> parse(Method source) + throws ValidityException + { + if (source == null) return null; + + source.setAccessible(true); + + final ArrayList> items = new ArrayList<>(); + final ArrayList problems = new ArrayList<>(); + + // Parse method level @OpDependency annotations. + parseMethodOpDependencies(items, source); + + // Fail if there were any problems. + if (!problems.isEmpty()) throw new ValidityException(problems); + + return items; + } + + private static void parseMethodOpDependencies(final List> items, + final Method annotatedMethod) + { + final java.lang.reflect.Parameter[] methodParams = annotatedMethod + .getParameters(); + final java.lang.reflect.Parameter[] opDependencyParams = getOpDependencies(methodParams); + + for (java.lang.reflect.Parameter param : opDependencyParams) { + final OpDependency dependency = param.getAnnotation(OpDependency.class); + final Type methodParamType = param.getParameterizedType(); + final MethodParameterOpDependencyMember item = new MethodParameterOpDependencyMember<>( + param, methodParamType, dependency); + items.add(item); + } + } + + private static java.lang.reflect.Parameter[] getOpDependencies( + java.lang.reflect.Parameter[] methodParams) + { + return Arrays // + .stream(methodParams) // + .filter(param -> param.getAnnotation(OpDependency.class) != null) // + .toArray(java.lang.reflect.Parameter[]::new); + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodParameterMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodParameterMemberParser.java new file mode 100644 index 000000000..87cf2f47a --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodParameterMemberParser.java @@ -0,0 +1,66 @@ + +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.scijava.ValidityProblem; +import org.scijava.ops.engine.util.internal.OpMethodUtils; +import org.scijava.ops.spi.OpMethod; +import org.scijava.struct.MemberParser; +import org.scijava.struct.ValidityException; +import org.scijava.types.Types; + +public class MethodParameterMemberParser implements + MemberParser> +{ + + @Override + public List> parse(Method source) + throws ValidityException + { + if (source == null) return null; + + source.setAccessible(true); + + // obtain a parameterData (preferably one that scrapes the javadoc) + ParameterData paramData; + try { + paramData = new JavadocParameterData(source); + } + catch (IllegalArgumentException e) { + paramData = new SynthesizedParameterData(); + } + + final ArrayList> items = new ArrayList<>(); + final ArrayList problems = new ArrayList<>(); + final Set names = new HashSet<>(); + final OpMethod methodAnnotation = source.getAnnotation(OpMethod.class); + + // Determine functional type + Type functionalType; + try { + functionalType = OpMethodUtils.getOpMethodType(methodAnnotation.type(), source); + } + catch (IllegalArgumentException e) { + problems.add(new ValidityProblem(e.getMessage())); + functionalType = Types.parameterizeRaw(methodAnnotation.type()); + } + + // Parse method level @Parameter annotations. + FunctionalParameters.parseFunctionalParameters(items, names, problems, functionalType, + paramData); + + // Fail if there were any problems. + if (!problems.isEmpty()) throw new ValidityException(problems); + + return items; + } + + + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/MethodParameterOpDependencyMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodParameterOpDependencyMember.java similarity index 94% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/MethodParameterOpDependencyMember.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodParameterOpDependencyMember.java index 9cc75f5c0..1195e9d0a 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/MethodParameterOpDependencyMember.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/MethodParameterOpDependencyMember.java @@ -28,11 +28,13 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.struct; import java.lang.reflect.Parameter; import java.lang.reflect.Type; +import org.scijava.ops.spi.OpDependency; + /** * @author Marcel Wiedenmann */ diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/OpRetypingMemberParser.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/OpRetypingMemberParser.java new file mode 100644 index 000000000..00a053778 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/OpRetypingMemberParser.java @@ -0,0 +1,67 @@ + +package org.scijava.ops.engine.struct; + +import java.util.ArrayList; +import java.util.List; + +import org.scijava.ops.engine.simplify.SimplifiedOpInfo; +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.ItemIO; +import org.scijava.struct.Member; +import org.scijava.struct.MemberParser; +import org.scijava.struct.Struct; +import org.scijava.struct.ValidityException; + +public class OpRetypingMemberParser implements + MemberParser> +{ + + /** + * Generates a new {@link List} with retyped {@link Member}s. Using + * {@code originalStruct} as a template, this method retypes the inputs of + * {@code originalStruct} using {@code inputs}, and the output using + * {@code output}. + *

+ * This method makes a couple of assumptions: + *

    + *
  1. That {@code srcStruct} is valid + *
  2. That there are {@code inputs.length} input {@link Member}s in + * {@code srcStruct} + *
  3. That there is one output {@link Member} in {@code srcStruct} + *
+ * We should consider adding the evalutation of these assumptions + * + * @param source the {@link RetypingRequest} from which we create the new + * {@link List} of {@link Member}s + * @return a new {@link Struct} reflecting the simplified arguments / focused + * output of this {@link SimplifiedOpInfo} + */ + @Override + public List> parse(RetypingRequest source) + throws ValidityException + { + List newFmts = source.newFmts(); + FunctionalMethodType outputFmt = newFmts.stream().filter(fmt -> fmt + .itemIO() == ItemIO.OUTPUT || fmt.itemIO() == ItemIO.MUTABLE || fmt + .itemIO() == ItemIO.CONTAINER).findFirst().get(); + List> newMembers = new ArrayList<>(); + int inputIndex = 0; + for (Member m : source.struct().members()) { + if (m.isInput()) { + m = ConvertedParameterMember.from(m, newFmts.get(inputIndex++)); + } + else if (m.isOutput()) { + m = ConvertedParameterMember.from(m, outputFmt); + } + newMembers.add(m); + } + return newMembers; + } + + public List> parse(Struct s, List newFmts) + throws ValidityException + { + return parse(new RetypingRequest(s, newFmts)); + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ParameterData.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ParameterData.java new file mode 100644 index 000000000..0395f6091 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ParameterData.java @@ -0,0 +1,11 @@ +package org.scijava.ops.engine.struct; + +import java.util.List; + +import org.scijava.struct.FunctionalMethodType; + +public interface ParameterData { + + public List> synthesizeMembers(List fmts); + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/ParameterMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ParameterMember.java similarity index 97% rename from scijava/scijava-ops/src/main/java/org/scijava/param/ParameterMember.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ParameterMember.java index a5d506360..8b3766759 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/ParameterMember.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/ParameterMember.java @@ -1,8 +1,9 @@ -package org.scijava.param; +package org.scijava.ops.engine.struct; import java.util.Arrays; import java.util.List; +import org.scijava.ItemVisibility; import org.scijava.struct.Member; /** @@ -144,11 +145,6 @@ default String getLabel() { return getKey(); } - /** Gets a string describing the object. */ - default String getDescription() { - return null; - } - /** Returns true iff the given key is defined. */ default boolean has(@SuppressWarnings("unused") String key) { return false; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/RetypingRequest.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/RetypingRequest.java new file mode 100644 index 000000000..7fa4c30a9 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/RetypingRequest.java @@ -0,0 +1,29 @@ + +package org.scijava.ops.engine.struct; + +import java.util.List; + +import org.scijava.struct.FunctionalMethodType; +import org.scijava.struct.Struct; + +public class RetypingRequest { + + private final Struct originalStruct; + private final List newFmts; + + public RetypingRequest(Struct originalStruct, + List newFmts) + { + this.originalStruct = originalStruct; + this.newFmts = newFmts; + } + + public Struct struct() { + return originalStruct; + } + + public List newFmts() { + return newFmts; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/SynthesizedParameterData.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/SynthesizedParameterData.java new file mode 100644 index 000000000..106d3f44d --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/SynthesizedParameterData.java @@ -0,0 +1,42 @@ + +package org.scijava.ops.engine.struct; + +import java.util.ArrayList; +import java.util.List; + +import org.scijava.struct.FunctionalMethodType; + +public class SynthesizedParameterData implements ParameterData { + + @Override + public List> synthesizeMembers(List fmts) { + List> params = new ArrayList<>(); + + int ins, outs, containers, mutables; + ins = outs = containers = mutables = 1; + for (FunctionalMethodType fmt : fmts) { + String key; + switch (fmt.itemIO()) { + case INPUT: + key = "input" + ins++; + break; + case OUTPUT: + key = "output" + outs++; + break; + case CONTAINER: + key = "container" + containers++; + break; + case MUTABLE: + key = "mutable" + mutables++; + break; + default: + throw new RuntimeException("Unexpected ItemIO type encountered!"); + } + params.add(new SynthesizedParameterMember<>(fmt.type(), key, "", fmt + .itemIO())); + } + + return params; + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/SynthesizedParameterMember.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/SynthesizedParameterMember.java new file mode 100644 index 000000000..3aeedf578 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/struct/SynthesizedParameterMember.java @@ -0,0 +1,64 @@ + +package org.scijava.ops.engine.struct; + +import java.lang.reflect.Type; + +import org.scijava.struct.ItemIO; +import org.scijava.struct.Member; + +/** + * {@link Member} synthesized using constructor arguments + * + * @author Gabriel Selzer + * @param + */ +public class SynthesizedParameterMember implements Member { + + /** Type, or a subtype thereof, which houses the field. */ + private final Type itemType; + + /** Name of the parameter */ + private final String name; + + /** Description of the parameter */ + private final String description; + + /** IO status of the parameter */ + private final ItemIO itemIO; + + public SynthesizedParameterMember(final Type itemType, + final String name, final String description, final ItemIO ioType) + { + this.itemType = itemType; + this.name = name; + this.description = description; + this.itemIO = ioType; + } + + // -- Member methods -- + + @Override + public String getKey() { + return name; + } + + @Override + public String getDescription() { + return description; + } + + @Override + public Type getType() { + return itemType; + } + + @Override + public ItemIO getIOType() { + return itemIO; + } + + @Override + public boolean isStruct() { + return false; + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/Adapt.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Adapt.java similarity index 93% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/util/Adapt.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Adapt.java index b4feb8242..84a1a0d6c 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/Adapt.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Adapt.java @@ -1,4 +1,4 @@ -package org.scijava.ops.util; +package org.scijava.ops.engine.util; import java.lang.invoke.LambdaMetafactory; import java.lang.invoke.MethodHandle; @@ -14,8 +14,7 @@ import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.core.OneToOneCommand; -import org.scijava.ops.core.Op; +import org.scijava.ops.spi.Op; /** * Utility providing adaptation between {@link Op} types. @@ -137,18 +136,6 @@ public static Functions.Arity3 asFunction3(Comput }; } - public static OneToOneCommand asCommand(final Computers.Arity1 computer, I input, O output) { - OneToOneCommand command = new OneToOneCommand() { - @Override - public void run() { - computer.compute(input, output); - } - }; - // Populate the input and output member of the computer command - Inject.Commands.all(command, input, output); - return command; - } - public static Computers.Arity1 asComputer(final Computers.Arity2 computer, I2 in2) { return (in1, out) -> { computer.compute(in1, in2, out); diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/ExceptionUtils.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/ExceptionUtils.java similarity index 86% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/core/ExceptionUtils.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/ExceptionUtils.java index f19da7477..1ab4f1106 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/ExceptionUtils.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/ExceptionUtils.java @@ -1,4 +1,6 @@ -package org.scijava.ops.core; +package org.scijava.ops.engine.util; + +import org.scijava.ops.engine.OpExecutionException; public class ExceptionUtils { // For void methods diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/FunctionUtils.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/FunctionUtils.java new file mode 100644 index 000000000..ca7b93635 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/FunctionUtils.java @@ -0,0 +1,103 @@ +/* + * This is autogenerated source code -- DO NOT EDIT. Instead, edit the + * corresponding template in templates/ and rerun bin/generate.groovy. + */ + +package org.scijava.ops.engine.util; + +import java.lang.reflect.Type; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.Function; + +import org.scijava.function.Functions; +import org.scijava.function.Producer; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.Hints; +import org.scijava.types.Nil; +import org.scijava.types.Types; + +/** + * Utility class designed to match {@code Function}s of various arities. + * + * @author Curtis Rueden + * @author Gabriel Selzer + */ +public final class FunctionUtils { + + private FunctionUtils() { + // NB: Prevent instantiation of utility class. + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.ArityN matchN(final OpEnvironment env, + final String opName, final Nil outType, final Nil... inTypes) + { + Map.Entry> c = Functions.ALL_FUNCTIONS // + .entrySet().stream() // + .filter(e -> e.getKey() == inTypes.length) // + .findAny().get(); + Object op = matchHelper(env, opName, c.getValue(), outType, inTypes); + if (op instanceof Producer) { + return Functions.nary((Producer) op); + } + else if (op instanceof Function) { + return Functions.nary((Function) op); + } + else if (op instanceof BiFunction) { + return Functions.nary((BiFunction) op); + } + else if (op instanceof Functions.Arity3) { + return Functions.nary((Functions.Arity3) op); + } + else if (op instanceof Functions.Arity4) { + return Functions.nary((Functions.Arity4) op); + } + else if (op instanceof Functions.Arity5) { + return Functions.nary((Functions.Arity5) op); + } + else if (op instanceof Functions.Arity6) { + return Functions.nary((Functions.Arity6) op); + } + else if (op instanceof Functions.Arity7) { + return Functions.nary((Functions.Arity7) op); + } + else if (op instanceof Functions.Arity8) { + return Functions.nary((Functions.Arity8) op); + } + else if (op instanceof Functions.Arity9) { + return Functions.nary((Functions.Arity9) op); + } + else if (op instanceof Functions.Arity10) { + return Functions.nary((Functions.Arity10) op); + } + else if (op instanceof Functions.Arity11) { + return Functions.nary((Functions.Arity11) op); + } + else if (op instanceof Functions.Arity12) { + return Functions.nary((Functions.Arity12) op); + } + else if (op instanceof Functions.Arity13) { + return Functions.nary((Functions.Arity13) op); + } + else if (op instanceof Functions.Arity14) { + return Functions.nary((Functions.Arity14) op); + } + else if (op instanceof Functions.Arity15) { + return Functions.nary((Functions.Arity15) op); + } + return Functions.nary((Functions.Arity16) op); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchHelper(final OpEnvironment env, final String opName, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType); + } +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/Inject.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Inject.java similarity index 76% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/util/Inject.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Inject.java index e359ca0d2..b99420124 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/Inject.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Inject.java @@ -1,15 +1,17 @@ -package org.scijava.ops.util; +package org.scijava.ops.engine.util; +import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; import org.scijava.command.Command; -import org.scijava.ops.OpDependencyMember; -import org.scijava.param.ParameterStructs; -import org.scijava.param.ValidityException; +import org.scijava.ops.api.OpDependencyMember; +import org.scijava.ops.engine.struct.ClassOpDependencyMemberParser; +import org.scijava.ops.engine.struct.ClassParameterMemberParser; import org.scijava.struct.ItemIO; +import org.scijava.struct.Struct; import org.scijava.struct.StructInstance; import org.scijava.struct.ValueAccessibleMemberInstance; @@ -80,28 +82,4 @@ private static List> filterAccessibles( } } - public static class Commands { - private Commands() { - } - - public static void inputs(Command command, Object... objs) { - Structs.inputs(commandToStructInstance(command), objs); - } - - public static void outputs(Command command, Object... objs) { - Structs.outputs(commandToStructInstance(command), objs); - } - - public static void all(Command command, Object... objs) { - Structs.all(commandToStructInstance(command), objs); - } - - public static StructInstance commandToStructInstance(Command command) { - try { - return ParameterStructs.create(command); - } catch (ValidityException e) { - throw new IllegalArgumentException("Can't inject command", e); - } - } - } } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/Maps.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Maps.java similarity index 97% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/util/Maps.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Maps.java index ca54d0371..8d8d0237a 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/Maps.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/Maps.java @@ -1,4 +1,4 @@ -package org.scijava.ops.util; +package org.scijava.ops.engine.util; import com.google.common.collect.Streams; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/AnnotationUtils.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/AnnotationUtils.java similarity index 80% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/util/AnnotationUtils.java rename to scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/AnnotationUtils.java index b105c4bee..f028d78aa 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/AnnotationUtils.java +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/AnnotationUtils.java @@ -33,16 +33,13 @@ // File path shortening code adapted from: // from: http://www.rgagnon.com/javadetails/java-0661.html -package org.scijava.ops.util; +package org.scijava.ops.engine.util.internal; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.AnnotatedType; import java.lang.reflect.Method; -import org.scijava.param.Parameter; -import org.scijava.param.Parameters; - /** * Useful methods for working with annotation instances. * @@ -54,22 +51,6 @@ private AnnotationUtils() { // prevent instantiation of utility class } - /** - * Gets a list of {@link Parameter} from the specified annotated element. - * If the element is not annotated, an empty array is returned. - * - * @param element the annotated element - * @return array of {@link Parameter} annotations - */ - public static Parameter[] parameters(final AnnotatedElement element) { - final Parameters params = element.getAnnotation(Parameters.class); - if (params != null) { - return params.value(); - } - final Parameter p = element.getAnnotation(Parameter.class); - return p == null ? new Parameter[0] : new Parameter[] { p }; - } - /** * Attempt to retrieve the specified annotation from the i'th parameter * of the specified method. This method will only find annotations with: diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/OpMethodUtils.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/OpMethodUtils.java new file mode 100644 index 000000000..0e9d4dae9 --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/OpMethodUtils.java @@ -0,0 +1,66 @@ +package org.scijava.ops.engine.util.internal; + +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +import org.scijava.ops.spi.OpDependency; +import org.scijava.types.Types; +import org.scijava.types.inference.GenericAssignability; +import org.scijava.types.inference.InterfaceInference; + +public class OpMethodUtils { + + public static Type getOpMethodType(Class opClass, Method opMethod) { + // since type is a functional interface, it has (exactly) one abstract + // declared method (the method that our OpMethod is emulating). + Method abstractMethod = InterfaceInference.singularAbstractMethod(opClass); + Type[] typeMethodParams = abstractMethod.getGenericParameterTypes(); + java.lang.reflect.Parameter[] opMethodParams = getOpParams(opMethod + .getParameters()); + + if (typeMethodParams.length != opMethodParams.length) { + throw new IllegalArgumentException("Number of parameters in OpMethod" + + opMethod + + " does not match the required number of parameters for functional method of FunctionalInterface " + + opClass); + } + Map, Type> typeVarAssigns = new HashMap<>(); + + // map params of OpMethod to type variables of abstract method of functional + // interface (along with return type if applicable) + // TODO: not sure how this handles when there are type variables. + GenericAssignability.inferTypeVariables(typeMethodParams, getOpParamTypes( + opMethodParams), typeVarAssigns); + if (abstractMethod.getReturnType() != void.class) { + GenericAssignability.inferTypeVariables(new Type[] { abstractMethod + .getGenericReturnType() }, new Type[] { opMethod + .getGenericReturnType() }, typeVarAssigns); + } + + // parameterize opClass + return Types.parameterize(opClass, typeVarAssigns); + } + + public static java.lang.reflect.Parameter[] getOpParams( + java.lang.reflect.Parameter[] methodParams) + { + return Arrays // + .stream(methodParams) // + .filter(param -> param.getAnnotation(OpDependency.class) == null) // + .toArray(java.lang.reflect.Parameter[]::new); + } + + public static Type[] getOpParamTypes( + java.lang.reflect.Parameter[] methodParams) + { + return Arrays // + .stream(methodParams) // + .filter(param -> param.getAnnotation(OpDependency.class) == null) // + .map(param -> param.getParameterizedType()).toArray(Type[]::new); + } + +} diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/package-info.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/package-info.java new file mode 100644 index 000000000..9597c6a0f --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/internal/package-info.java @@ -0,0 +1,12 @@ +/** + * This package is designed to house utility methods intended for use only + * within SciJava Ops. + *

+ * Utilities intended for use outside of this library sould be housed within + * {@link org.scijava.ops.engine.util} + * + * @author Gabriel Selzer + * @see org.scijava.ops.engine.util + */ + +package org.scijava.ops.engine.util.internal; diff --git a/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/package-info.java b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/package-info.java new file mode 100644 index 000000000..b2b36ee5c --- /dev/null +++ b/scijava/scijava-ops-engine/src/main/java/org/scijava/ops/engine/util/package-info.java @@ -0,0 +1,11 @@ +/** + * This package is intended to house utility methods useful to Op + * implementations. This package is exported; any utilities designed to + * be used only within SciJava Ops should instead be placed within + * {@link org.scijava.ops.engine.util.internal} + * + * @author Gabriel Selzer + * @see org.scijava.ops.engine.util.internal + */ + +package org.scijava.ops.engine.util; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/AbstractTestEnvironment.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/AbstractTestEnvironment.java similarity index 91% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/AbstractTestEnvironment.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/AbstractTestEnvironment.java index 346df1e01..1ab0a5864 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/AbstractTestEnvironment.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/AbstractTestEnvironment.java @@ -1,4 +1,4 @@ -package org.scijava.ops; +package org.scijava.ops.engine; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -11,7 +11,8 @@ import org.junit.BeforeClass; import org.scijava.Context; import org.scijava.cache.CacheService; -import org.scijava.ops.provenance.OpHistoryService; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.engine.impl.DefaultOpService; import org.scijava.plugin.PluginService; import org.scijava.thread.ThreadService; import org.scijava.types.TypeService; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/AutoTransformTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/AutoTransformTest.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/AutoTransformTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/AutoTransformTest.java index f8785a351..050e1cc3f 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/AutoTransformTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/AutoTransformTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import com.google.common.collect.Streams; @@ -38,7 +38,6 @@ import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.core.builder.OpBuilder; import org.scijava.types.Nil; //TODO: think about removing this class diff --git a/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/JavadocParameterTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/JavadocParameterTest.java new file mode 100644 index 000000000..bb1918954 --- /dev/null +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/JavadocParameterTest.java @@ -0,0 +1,448 @@ + +package org.scijava.ops.engine; + +import com.google.common.collect.Streams; + +import java.util.Iterator; +import java.util.List; +import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.junit.Assert; +import org.junit.Test; +import org.scijava.function.Computers; +import org.scijava.function.Inplaces; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpUtils; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpMethod; +import org.scijava.plugin.Plugin; + +/** + * Tests the ability of a Javadoc parser to scrape an Op's parameters out of its + * Javadoc + * + * @author G + */ +@Plugin(type = OpCollection.class) +public class JavadocParameterTest extends AbstractTestEnvironment { + + /** + * Tests javadoc scraping with param (P) and return (R) + * + * @param foo the first input + * @param bar the second input + * @return foo + bar + */ + @OpMethod(names = "test.javadoc.methodPR", type = BiFunction.class) + public static List OpMethodPR(List foo, List bar) { + BiFunction func = (s1, s2) -> Long.parseLong(s1) + + Long.parseLong(s2); + return Streams.zip(foo.stream(), bar.stream(), func).collect(Collectors + .toList()); + } + + /** + * Tests javadoc scraping with input (I) and output (O) + * + * @input foo the first input + * @input bar the second input + * @output foo + bar + */ + @OpMethod(names = "test.javadoc.methodIO", type = BiFunction.class) + public static List OpMethodIO(List foo, List bar) { + BiFunction func = (s1, s2) -> Long.parseLong(s1) + + Long.parseLong(s2); + return Streams.zip(foo.stream(), bar.stream(), func).collect(Collectors + .toList()); + } + + /** + * Tests javadoc scraping with input (I) and return (R) + * + * @input foo the first input + * @input bar the second input + * @return foo + bar + */ + @OpMethod(names = "test.javadoc.methodIR", type = BiFunction.class) + public static List OpMethodIR(List foo, List bar) { + BiFunction func = (s1, s2) -> Long.parseLong(s1) + + Long.parseLong(s2); + return Streams.zip(foo.stream(), bar.stream(), func).collect(Collectors + .toList()); + } + + /** + * Tests javadoc scraping with input (I) ONLY + * + * @input foo the first input + * @input bar the second input + */ + @OpMethod(names = "test.javadoc.methodI", type = BiFunction.class) + public static List OpMethodI(List foo, List bar) { + BiFunction func = (s1, s2) -> Long.parseLong(s1) + + Long.parseLong(s2); + return Streams.zip(foo.stream(), bar.stream(), func).collect(Collectors + .toList()); + } + + @Test + public void testJavadocMethodPR() { + Iterator infos = ops.env().infos("test.javadoc.methodPR").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.method\""); + } + isSuitableScrapedOpMethodInfo(info); + } + + @Test + public void testJavadocMethodIO() { + Iterator infos = ops.env().infos("test.javadoc.methodIO").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.method\""); + } + isSuitableGenericOpMethodInfo(info); + } + + @Test + public void testJavadocMethodIR() { + Iterator infos = ops.env().infos("test.javadoc.methodIR").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.method\""); + } + isSuitableGenericOpMethodInfo(info); + } + + @Test + public void testJavadocMethodI() { + Iterator infos = ops.env().infos("test.javadoc.methodI").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.method\""); + } + isSuitableGenericOpMethodInfo(info); + } + + /** + * Tests javadoc scraping of mutable taglet + * + * @param foo the i/o argument + */ + @OpMethod(names = "test.javadoc.methodInplaceI", type = Inplaces.Arity1.class) + public static void OpMethodInplaceI(List foo) { + for (int i = 0; i < foo.size(); i++) { + foo.set(i, foo.get(i) + " foo"); + } + } + + /** + * Tests javadoc scraping of mutable taglet + * + * @dependency inplace the Op being wrapped + * @param foo the i/o argument + */ + @OpMethod(names = "test.javadoc.methodDependency", type = Inplaces.Arity1.class) + public static void OpMethodInplaceI(@OpDependency( + name = "test.javadoc.methodInplaceI") Inplaces.Arity1> inplace, + List foo) + { + inplace.mutate(foo); + } + + @Test + public void testJavadocMethodInplaceI() { + Iterator infos = ops.env().infos("test.javadoc.methodInplaceI").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.method\""); + } + + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(inputNames, new String[] { "foo" }); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m + .getDescription()).toArray(String[]::new); + Assert.assertArrayEquals(inputDescriptions, new String[] { + "the i/o argument"}); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("foo", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("the i/o argument", outputDescription); + } + + @Test + public void testJavadocMethodInplaceWithDepedency() { + Iterator infos = ops.env().infos("test.javadoc.methodDependency").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.methodDependency\""); + } + + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(inputNames, new String[] { "foo" }); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m + .getDescription()).toArray(String[]::new); + Assert.assertArrayEquals(inputDescriptions, new String[] { + "the i/o argument"}); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("foo", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("the i/o argument", outputDescription); + } + + /** + * Asserts that the {@link OpInfo} has as inputs: + *

    + *
  • foo - the first input + *
  • bar - the second input + *
+ * and as output: + *
    + *
  • output - foo + bar + *
+ */ + private void isSuitableScrapedOpMethodInfo(OpInfo info) { + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(inputNames, new String[] { "foo", "bar" }); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m.getDescription()).toArray( + String[]::new); + Assert.assertArrayEquals(inputDescriptions, new String[] { "the first input", "the second input" }); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("output", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("foo + bar", outputDescription); + } + + /** + * Asserts that the {@link OpInfo} has as inputs: + *
    + *
  • input1 + *
  • input2 + *
+ * and as output: + *
    + *
  • output1 + *
+ */ + private void isSuitableGenericOpMethodInfo(OpInfo info) { + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(inputNames, new String[] { "input1", "input2" }); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m.getDescription()).toArray( + String[]::new); + Assert.assertArrayEquals(inputDescriptions, new String[] { "", "" }); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("output1", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("", outputDescription); + } + + /** + * @input in the input + * @output the output + */ + @OpField(names = "test.javadoc.fieldF") + public final Function javadocFieldOp = (in) -> in + 1; + + /** + * @input inList the input + * @container outList the preallocated output + */ + @OpField(names = "test.javadoc.fieldC") + public final Computers.Arity1, List> javadocFieldOpComputer = (in, out) -> { + out.clear(); + for(Double d :in) { + out.add(d + 1); + } + }; + + @Test + public void testJavadocFieldF() { + Iterator infos = ops.env().infos("test.javadoc.fieldF").iterator(); + + if (!infos.hasNext()) { + Assert.fail("No OpInfos with name \"test.javadoc.fieldF\""); + } + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.fieldF\""); + } + + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(new String[] { "in" }, inputNames); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m.getDescription()).toArray( + String[]::new); + Assert.assertArrayEquals(new String[] { "the input" }, inputDescriptions); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("output", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("the output", outputDescription); + } + + @Test + public void testJavadocFieldC() { + Iterator infos = ops.env().infos("test.javadoc.fieldC").iterator(); + + if (!infos.hasNext()) { + Assert.fail("No OpInfos with name \"test.javadoc.fieldC\""); + } + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.fieldC\""); + } + + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(new String[] { "inList", "outList" }, inputNames); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m.getDescription()).toArray( + String[]::new); + Assert.assertArrayEquals(new String[] { "the input", "the preallocated output" }, inputDescriptions); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("outList", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("the preallocated output", outputDescription); + } + + @Test + public void testJavadocClass() { + Iterator infos = ops.env().infos("test.javadoc.class").iterator(); + + if (!infos.hasNext()) { + Assert.fail("No OpInfos with name \"test.javadoc.class\""); + } + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.class\""); + } + + // assert input names + String[] inputNames = info.inputs().stream().map(m -> m.getKey()).toArray( + String[]::new); + Assert.assertArrayEquals(new String[] { "t" }, inputNames); + + // assert input descriptions + String[] inputDescriptions = info.inputs().stream().map(m -> m.getDescription()).toArray( + String[]::new); + Assert.assertArrayEquals(new String[] { "the input" }, inputDescriptions); + + // assert output name + String outputName = info.output().getKey(); + Assert.assertEquals("output", outputName); + + // assert output description + String outputDescription = info.output().getDescription(); + Assert.assertEquals("the output", outputDescription); + } + + @Test + public void opStringRegressionTest() { + Iterator infos = ops.env().infos("test.javadoc.methodPR").iterator(); + + OpInfo info = infos.next(); + if (infos.hasNext()) { + Assert.fail("Multiple OpInfos with name \"test.javadoc.method\""); + } + + // test standard op string + String expected = + "public static java.util.List org.scijava.ops.engine.JavadocParameterTest." + + "OpMethodPR(java.util.List,java.util.List)(\n" + + " Inputs:\n" + + " java.util.List foo -> the first input\n" + + " java.util.List bar -> the second input\n" + + " Outputs:\n" + + " java.util.List output -> foo + bar\n" + ")\n"; + String actual = info.toString(); + Assert.assertEquals(expected, actual); + + // test special op string + expected = + "public static java.util.List org.scijava.ops.engine.JavadocParameterTest." + + "OpMethodPR(java.util.List,java.util.List)(\n" + + " Inputs:\n" + + " java.util.List foo -> the first input\n" + + "==> java.util.List bar -> the second input\n" + + " Outputs:\n" + + " java.util.List output -> foo + bar\n" + ")\n"; + actual = OpUtils.opString(info, info.inputs().get(1)); + Assert.assertEquals(expected, actual); + } + +} + +/** + * Test Op used to see if we can't scrape the javadoc. + * + * @author Gabriel Selzer + */ +@Plugin(type = Op.class, name = "test.javadoc.class") +class JavadocOp implements Function { + + /** + * @param t the input + * @return the output + */ + @Override + public Double apply(Double t) { + return t + 1; + } + +} diff --git a/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/ModuleTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/ModuleTest.java new file mode 100644 index 000000000..9b1293151 --- /dev/null +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/ModuleTest.java @@ -0,0 +1,77 @@ + +package org.scijava.ops.engine; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.junit.Test; + +public class ModuleTest extends AbstractTestEnvironment { + + String moduleBaseDirectory = "src/main/java/org/scijava"; + + /** + * Recursively finds the name of each package within the module + * org.scijava.ops + * + * @param set the set that will be populated with the module names + * @param dirName the starting directory + */ + private void findPackageNames(Set set, String dirName) { + File directory = new File(dirName); + // get all the files from a directory + File[] fList = directory.listFiles(); + for (File file : fList) { + if (file.isFile()) { + String path = file.getPath(); + String packName = path.substring(path.indexOf("org"), path.lastIndexOf(File.separator)); + set.add(packName.replace(File.separator, ".")); + } + else if (file.isDirectory()) { + findPackageNames(set, file.getAbsolutePath()); + } + } + } + + private Set getPackagesExported(String path) { + try { + Stream stream = Files.lines(Paths.get(path)); + // remove outside whitespace + Set exportedPackages = stream.map(str -> str.trim()) + // consider only opens + .filter(str -> str.startsWith("opens")) + // consider only opens to therapi + .filter(str -> str.contains("therapi.runtime.javadoc")) + // get the package from the opens + .map(str -> str.split(" ")[1]).collect(Collectors.toSet()); + return exportedPackages; + } + catch (IOException e) { + throw new RuntimeException(); + } + } + + @Test + public void testTherapiExports() { + Set packages = new HashSet<>(); + findPackageNames(packages, moduleBaseDirectory); + + Set exportedPackages = getPackagesExported( + "src/main/java/module-info.java"); + + assertTrue( + "module-info.java does not export all packages to therapi.runtime.javadoc," + + " use bin/generate-groovy.sh to update the list!", packages.equals( + exportedPackages)); + } + +} diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderNoOutputTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderNoOutputTest.java similarity index 77% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderNoOutputTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderNoOutputTest.java index 12c6070d5..5358be042 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderNoOutputTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderNoOutputTest.java @@ -1,5 +1,5 @@ -package org.scijava.ops.core.builder; +package org.scijava.ops.engine; import java.lang.reflect.Type; import java.util.ArrayList; @@ -7,10 +7,9 @@ import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.struct.ItemIO; import org.scijava.types.Nil; @@ -33,9 +32,11 @@ public class OpBuilderNoOutputTest extends // private wrapper class private static class WrappedList extends ArrayList {} + /** + * @input in + * @output out + */ @OpField(names = opName) - @Parameter(key = "in", itemIO = ItemIO.INPUT) - @Parameter(key = "out", itemIO = ItemIO.OUTPUT) public final Function> func = in -> { WrappedList out = new WrappedList<>(); diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderTest.java similarity index 99% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderTest.java index b51f6da8f..025b8c32d 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.core.builder; +package org.scijava.ops.engine; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -41,7 +41,8 @@ import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; /** * Tests {@link OpBuilder}. For each arity, we test the following matches and diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderTestOps.java similarity index 99% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderTestOps.java index 17bc33297..be46a099a 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpBuilderTestOps.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.core.builder; +package org.scijava.ops.engine; import java.util.function.BiFunction; import java.util.function.Function; @@ -36,8 +36,10 @@ import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpCollectionTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpCollectionTest.java similarity index 97% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpCollectionTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpCollectionTest.java index 34226f5ef..a04ba10da 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpCollectionTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpCollectionTest.java @@ -27,13 +27,13 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.function.BiFunction; import org.junit.Test; +import org.scijava.struct.ValidityException; import org.scijava.types.Nil; -import org.scijava.param.ValidityException; public class OpCollectionTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpEnvironmentTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpEnvironmentTest.java similarity index 87% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpEnvironmentTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpEnvironmentTest.java index ba07051b9..cc748a452 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpEnvironmentTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpEnvironmentTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops; +package org.scijava.ops.engine; import java.lang.reflect.Type; import java.util.function.Function; @@ -7,9 +7,10 @@ import org.junit.Test; import org.scijava.Priority; import org.scijava.function.Producer; -import org.scijava.ops.matcher.OpClassInfo; -import org.scijava.param.Parameter; -import org.scijava.struct.ItemIO; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.engine.matcher.impl.OpClassInfo; import org.scijava.types.GenericTyped; import org.scijava.types.Nil; @@ -59,8 +60,8 @@ public void testClassOpificationWithPriority() { @Test public void testRegister() { String opName = "test.opifyOp"; - OpInfo opifyOpInfo = ops.env().opify(OpifyOp.class, Priority.HIGH); - ops.env().register(opifyOpInfo, opName); + OpInfo opifyOpInfo = ops.env().opify(OpifyOp.class, Priority.HIGH, opName); + ops.env().register(opifyOpInfo); String actual = ops.op(opName).input().outType(String.class).create(); @@ -77,7 +78,6 @@ public void testRegister() { * * @author Gabriel Selzer */ -@Parameter(key = "output") class OpifyOp implements Producer { @Override diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodDependencyPositionTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodDependencyPositionTest.java similarity index 90% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodDependencyPositionTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodDependencyPositionTest.java index 666cd7f77..1cf77b459 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodDependencyPositionTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodDependencyPositionTest.java @@ -1,5 +1,5 @@ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.ArrayList; import java.util.Arrays; @@ -8,7 +8,10 @@ import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpMethod; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodTest.java similarity index 99% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodTest.java index 8ce2e3195..0eb380626 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -42,10 +42,9 @@ import org.scijava.function.Computers; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; import org.scijava.types.Nil; /** @@ -88,17 +87,12 @@ public class OpMethodTest extends AbstractTestEnvironment { // @OpMethod(names = "test.parseInteger", type = Function.class) // // Refers to the input parameter of the function that's returned by this // // factory method. -// @Parameter(key = "numericString") // // Refers to the output parameter of the function. -// @Parameter(key = "parsedInteger") // public static Integer createParseIntegerOp(String in) { // return Integer.parseInt(in); // } // // @OpMethod(names = "test.multiplyNumericStrings", type = BiFunction.class) -// @Parameter(key = "numericString1") -// @Parameter(key = "numericString2") -// @Parameter(key = "multipliedNumericStrings") // public static Integer createMultiplyNumericStringsOp(final String in1, // final String in2, @OpDependency( // name = "test.parseInteger") Function parseIntegerOp) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodTestOps.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodTestOps.java similarity index 99% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodTestOps.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodTestOps.java index 9a034b6ea..967875a10 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpMethodTestOps.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpMethodTestOps.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.List; import java.util.function.BiFunction; @@ -37,17 +37,17 @@ import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpMethod; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class OpMethodTestOps { // -- Functions -- // @OpMethod(names = "test.multiplyNumericStrings", type = Producer.class) - @Parameter(key = "multipliedNumericStrings") public static Integer multiplyNumericStringsProducer() { return Integer.valueOf(1); } diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpPriorityTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpPriorityTest.java similarity index 92% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpPriorityTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpPriorityTest.java index 095227f5b..178075d03 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpPriorityTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpPriorityTest.java @@ -27,22 +27,19 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import static org.junit.Assert.assertTrue; import org.junit.Test; import org.scijava.Priority; import org.scijava.function.Producer; -import org.scijava.ops.core.Op; -import org.scijava.types.Nil; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; +import org.scijava.types.Nil; public class OpPriorityTest extends AbstractTestEnvironment { @Plugin(type = Op.class, name = "test.priority", priority = Priority.HIGH) - @Parameter(key = "result") private static final class testDouble implements Producer{ @Override public Number create() { @@ -51,7 +48,6 @@ public Number create() { } @Plugin(type = Op.class, name = "test.priority", priority = Priority.LOW) - @Parameter(key = "result") private static final class testFloat implements Producer{ @Override public Number create() { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpsTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpsTest.java similarity index 99% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpsTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpsTest.java index 98b852e7d..34702f4aa 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpsTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/OpsTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.function.BiFunction; import java.util.function.Function; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/TestOps.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/TestOps.java similarity index 82% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/TestOps.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/TestOps.java index 5e6b189ae..8a5433a52 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/TestOps.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/TestOps.java @@ -1,14 +1,12 @@ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Computers; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * This class contains various ops used in various tests used to check framework @@ -26,8 +24,6 @@ public class TestOps { // AutoTransformTest @Plugin(type = Op.class, name = "test.liftSqrt") - @Parameter(key = "in") - @Parameter(key = "out") public static class LiftSqrt implements Computers.Arity1 { @Override @@ -41,9 +37,6 @@ public void compute(double[] in, double[] out) { // AdaptersTest @Plugin(type = Op.class, name = "test.adaptersC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "out") public static class testAddTwoArraysComputer implements Computers.Arity2 { @Override public void compute(double[] arr1, double[] arr2, double[] out) { @@ -53,9 +46,6 @@ public void compute(double[] arr1, double[] arr2, double[] out) { } @Plugin(type = Op.class, name = "test.adaptersF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "out") public static class testAddTwoArraysFunction implements BiFunction { @Override public double[] apply(double[] arr1, double[] arr2) { @@ -69,8 +59,6 @@ public double[] apply(double[] arr1, double[] arr2) { // LiftTest @Plugin(type = Op.class, name = "test.liftFunction") - @Parameter(key = "in") - @Parameter(key = "out") public static class liftFunction implements Function { @Override public Double apply(Double in) { @@ -79,8 +67,6 @@ public Double apply(Double in) { } @Plugin(type = Op.class, name = "test.liftComputer") - @Parameter(key = "in") - @Parameter(key = "out") public static class liftComputer implements Computers.Arity1 { @Override public void compute(double[] in, double[] out) { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/TestUtils.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/TestUtils.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/TestUtils.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/TestUtils.java index 0a40a90f8..c48f55ac7 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/TestUtils.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/TestUtils.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.Arrays; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/OpAdaptationPriorityTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/OpAdaptationPriorityTest.java similarity index 84% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/OpAdaptationPriorityTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/OpAdaptationPriorityTest.java index bbf10080a..773d9e69b 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/OpAdaptationPriorityTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/OpAdaptationPriorityTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.adapt; +package org.scijava.ops.engine.adapt; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; @@ -37,15 +37,13 @@ import org.junit.Test; import org.scijava.function.Computers; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.adapt.functional.ComputersToFunctionsViaFunction; -import org.scijava.ops.adapt.functional.ComputersToFunctionsViaSource; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.adapt.functional.ComputersToFunctionsViaFunction; +import org.scijava.ops.engine.adapt.functional.ComputersToFunctionsViaSource; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; /** * Ensures that higher-priority adapt Ops are used over lower-priority adapt @@ -75,21 +73,16 @@ public double getPriority() { } @OpField(names = "test.priorityOp") - @Parameter(key = "input") - @Parameter(key = "output") public static final Computers.Arity1 priorityOp = (in, out) -> { out.increasePriority(in); }; @OpField(names = "create") - @Parameter(key = "output") public static final Producer priorityThingProducer = () -> new PriorityThing(10000); @OpField(names = "create") - @Parameter(key = "input") - @Parameter(key = "output") public static final Function priorityThingFunction = ( in) -> new PriorityThing(in); diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.java index cff69061f..acf48cc48 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.java @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import static org.junit.Assert.assertArrayEquals; @@ -41,8 +41,8 @@ import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.java index b4d70ac2c..e9a4f4f4b 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.java @@ -32,15 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; public class FunctionToComputerIterablesTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.java similarity index 97% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.java index 0a0498d0f..3ce692010 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.java @@ -32,13 +32,13 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; public class ComputerToFunctionAdaptTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.java similarity index 70% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.java index 084579320..a8e4c881e 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.java @@ -32,20 +32,19 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) public class ComputerToFunctionAdaptTestOps { @OpField(names = "test.CtF") - @Parameter(key = "in") - @Parameter(key = "out") public static final Computers.Arity1 toFunc1 = (in, out) -> { for(int i = 0; i < in.length; i++) { out[i] = 0.0; @@ -54,9 +53,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "out") public static final Computers.Arity2 toFunc2 = (in1, in2, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -66,10 +62,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "out") public static final Computers.Arity3 toFunc3 = (in1, in2, in3, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -80,11 +72,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "out") public static final Computers.Arity4 toFunc4 = (in1, in2, in3, in4, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -96,12 +83,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "out") public static final Computers.Arity5 toFunc5 = (in1, in2, in3, in4, in5, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -114,13 +95,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "out") public static final Computers.Arity6 toFunc6 = (in1, in2, in3, in4, in5, in6, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -134,14 +108,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "out") public static final Computers.Arity7 toFunc7 = (in1, in2, in3, in4, in5, in6, in7, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -156,15 +122,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "out") public static final Computers.Arity8 toFunc8 = (in1, in2, in3, in4, in5, in6, in7, in8, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -180,16 +137,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "out") public static final Computers.Arity9 toFunc9 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -206,17 +153,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "out") public static final Computers.Arity10 toFunc10 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -234,18 +170,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "out") public static final Computers.Arity11 toFunc11 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -264,19 +188,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "out") public static final Computers.Arity12 toFunc12 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -296,20 +207,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "out") public static final Computers.Arity13 toFunc13 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -330,21 +227,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "in14") - @Parameter(key = "out") public static final Computers.Arity14 toFunc14 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -366,22 +248,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "in14") - @Parameter(key = "in15") - @Parameter(key = "out") public static final Computers.Arity15 toFunc15 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; @@ -404,23 +270,6 @@ public class ComputerToFunctionAdaptTestOps { }; @OpField(names = "test.CtF") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "in14") - @Parameter(key = "in15") - @Parameter(key = "in16") - @Parameter(key = "out") public static final Computers.Arity16 toFunc16 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out) -> { for(int i = 0; i < in1.length; i++) { out[i] = 0.0; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.java similarity index 97% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.java index 5c0656393..345fc6599 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.java @@ -32,12 +32,12 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; public class FunctionToComputerAdaptTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.java similarity index 71% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.java index 5601a67e4..9cccb6951 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.java @@ -32,23 +32,22 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) public class FunctionToComputerAdaptTestOps { @OpField(names = "test.FtC") - @Parameter(key = "in") - @Parameter(key = "out") public static final Function toComp1 = (in) -> { double[] out = new double[in.length]; for(int i = 0; i < in.length; i++) { @@ -58,9 +57,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "out") public static final BiFunction toComp2 = (in1, in2) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -71,10 +67,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "out") public static final Functions.Arity3 toComp3 = (in1, in2, in3) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -86,11 +78,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "out") public static final Functions.Arity4 toComp4 = (in1, in2, in3, in4) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -103,12 +90,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "out") public static final Functions.Arity5 toComp5 = (in1, in2, in3, in4, in5) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -122,13 +103,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "out") public static final Functions.Arity6 toComp6 = (in1, in2, in3, in4, in5, in6) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -143,14 +117,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "out") public static final Functions.Arity7 toComp7 = (in1, in2, in3, in4, in5, in6, in7) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -166,15 +132,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "out") public static final Functions.Arity8 toComp8 = (in1, in2, in3, in4, in5, in6, in7, in8) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -191,16 +148,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "out") public static final Functions.Arity9 toComp9 = (in1, in2, in3, in4, in5, in6, in7, in8, in9) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -218,17 +165,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "out") public static final Functions.Arity10 toComp10 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -247,18 +183,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "out") public static final Functions.Arity11 toComp11 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -278,19 +202,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "out") public static final Functions.Arity12 toComp12 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -311,20 +222,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "out") public static final Functions.Arity13 toComp13 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -346,21 +243,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "in14") - @Parameter(key = "out") public static final Functions.Arity14 toComp14 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -383,22 +265,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "in14") - @Parameter(key = "in15") - @Parameter(key = "out") public static final Functions.Arity15 toComp15 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { @@ -422,23 +288,6 @@ public class FunctionToComputerAdaptTestOps { }; @OpField(names = "test.FtC") - @Parameter(key = "in1") - @Parameter(key = "in2") - @Parameter(key = "in3") - @Parameter(key = "in4") - @Parameter(key = "in5") - @Parameter(key = "in6") - @Parameter(key = "in7") - @Parameter(key = "in8") - @Parameter(key = "in9") - @Parameter(key = "in10") - @Parameter(key = "in11") - @Parameter(key = "in12") - @Parameter(key = "in13") - @Parameter(key = "in14") - @Parameter(key = "in15") - @Parameter(key = "in16") - @Parameter(key = "out") public static final Functions.Arity16 toComp16 = (in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16) -> { double[] out = new double[in1.length]; for(int i = 0; i < in1.length; i++) { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.java similarity index 99% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.java index 5946ac834..8c905ae14 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.java @@ -32,15 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import static org.junit.Assert.assertTrue; import java.util.Arrays; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class InplaceToFunctionAdaptTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.java similarity index 93% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.java index e97b12d0c..c3eb1438f 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.java @@ -32,14 +32,14 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.Assert; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; import org.scijava.plugin.Plugin; /** @@ -85,7 +85,7 @@ public void testComputer0ToArrays() { ops.env().op("test.liftArrayC").input().output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(0 * i, output[i].getNumber()); + Assert.assertEquals(0 * i, output[i].getNumber()); } } @@ -99,7 +99,7 @@ public void testComputer1ToArrays() { ops.env().op("test.liftArrayC").input(input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(1 * i, output[i].getNumber()); + Assert.assertEquals(1 * i, output[i].getNumber()); } } @@ -113,7 +113,7 @@ public void testComputer2ToArrays() { ops.env().op("test.liftArrayC").input(input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(2 * i, output[i].getNumber()); + Assert.assertEquals(2 * i, output[i].getNumber()); } } @@ -127,7 +127,7 @@ public void testComputer3ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(3 * i, output[i].getNumber()); + Assert.assertEquals(3 * i, output[i].getNumber()); } } @@ -141,7 +141,7 @@ public void testComputer4ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(4 * i, output[i].getNumber()); + Assert.assertEquals(4 * i, output[i].getNumber()); } } @@ -155,7 +155,7 @@ public void testComputer5ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(5 * i, output[i].getNumber()); + Assert.assertEquals(5 * i, output[i].getNumber()); } } @@ -169,7 +169,7 @@ public void testComputer6ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(6 * i, output[i].getNumber()); + Assert.assertEquals(6 * i, output[i].getNumber()); } } @@ -183,7 +183,7 @@ public void testComputer7ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(7 * i, output[i].getNumber()); + Assert.assertEquals(7 * i, output[i].getNumber()); } } @@ -197,7 +197,7 @@ public void testComputer8ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(8 * i, output[i].getNumber()); + Assert.assertEquals(8 * i, output[i].getNumber()); } } @@ -211,7 +211,7 @@ public void testComputer9ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(9 * i, output[i].getNumber()); + Assert.assertEquals(9 * i, output[i].getNumber()); } } @@ -225,7 +225,7 @@ public void testComputer10ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(10 * i, output[i].getNumber()); + Assert.assertEquals(10 * i, output[i].getNumber()); } } @@ -239,7 +239,7 @@ public void testComputer11ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(11 * i, output[i].getNumber()); + Assert.assertEquals(11 * i, output[i].getNumber()); } } @@ -253,7 +253,7 @@ public void testComputer12ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(12 * i, output[i].getNumber()); + Assert.assertEquals(12 * i, output[i].getNumber()); } } @@ -267,7 +267,7 @@ public void testComputer13ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(13 * i, output[i].getNumber()); + Assert.assertEquals(13 * i, output[i].getNumber()); } } @@ -281,7 +281,7 @@ public void testComputer14ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(14 * i, output[i].getNumber()); + Assert.assertEquals(14 * i, output[i].getNumber()); } } @@ -295,7 +295,7 @@ public void testComputer15ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(15 * i, output[i].getNumber()); + Assert.assertEquals(15 * i, output[i].getNumber()); } } @@ -309,7 +309,7 @@ public void testComputer16ToArrays() { ops.env().op("test.liftArrayC").input(input, input, input, input, input, input, input, input, input, input, input, input, input, input, input, input).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals(16 * i, output[i].getNumber()); + Assert.assertEquals(16 * i, output[i].getNumber()); } } diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.java index 9da2f3b43..339d5767f 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.java @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import static org.junit.Assert.assertArrayEquals; @@ -41,8 +41,8 @@ import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; /** * Tests the adaptation of {@link Computers} running on a type into diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.java similarity index 93% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.java index cfe47e3a9..00d340ad0 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.java @@ -32,17 +32,19 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.function.BiFunction; import java.util.function.Function; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.Assert; import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; import org.scijava.types.Nil; @@ -86,7 +88,7 @@ public void testFunction1ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(1 * i, output[i].getNumber()); + Assert.assertEquals(1 * i, output[i].getNumber()); } } @@ -105,7 +107,7 @@ public void testFunction2ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(2 * i, output[i].getNumber()); + Assert.assertEquals(2 * i, output[i].getNumber()); } } @@ -124,7 +126,7 @@ public void testFunction3ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(3 * i, output[i].getNumber()); + Assert.assertEquals(3 * i, output[i].getNumber()); } } @@ -143,7 +145,7 @@ public void testFunction4ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(4 * i, output[i].getNumber()); + Assert.assertEquals(4 * i, output[i].getNumber()); } } @@ -162,7 +164,7 @@ public void testFunction5ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(5 * i, output[i].getNumber()); + Assert.assertEquals(5 * i, output[i].getNumber()); } } @@ -181,7 +183,7 @@ public void testFunction6ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(6 * i, output[i].getNumber()); + Assert.assertEquals(6 * i, output[i].getNumber()); } } @@ -200,7 +202,7 @@ public void testFunction7ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(7 * i, output[i].getNumber()); + Assert.assertEquals(7 * i, output[i].getNumber()); } } @@ -219,7 +221,7 @@ public void testFunction8ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(8 * i, output[i].getNumber()); + Assert.assertEquals(8 * i, output[i].getNumber()); } } @@ -238,7 +240,7 @@ public void testFunction9ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(9 * i, output[i].getNumber()); + Assert.assertEquals(9 * i, output[i].getNumber()); } } @@ -257,7 +259,7 @@ public void testFunction10ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(10 * i, output[i].getNumber()); + Assert.assertEquals(10 * i, output[i].getNumber()); } } @@ -276,7 +278,7 @@ public void testFunction11ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(11 * i, output[i].getNumber()); + Assert.assertEquals(11 * i, output[i].getNumber()); } } @@ -295,7 +297,7 @@ public void testFunction12ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(12 * i, output[i].getNumber()); + Assert.assertEquals(12 * i, output[i].getNumber()); } } @@ -314,7 +316,7 @@ public void testFunction13ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(13 * i, output[i].getNumber()); + Assert.assertEquals(13 * i, output[i].getNumber()); } } @@ -333,7 +335,7 @@ public void testFunction14ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(14 * i, output[i].getNumber()); + Assert.assertEquals(14 * i, output[i].getNumber()); } } @@ -352,7 +354,7 @@ public void testFunction15ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(15 * i, output[i].getNumber()); + Assert.assertEquals(15 * i, output[i].getNumber()); } } @@ -371,7 +373,7 @@ public void testFunction16ToArrays() { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals(16 * i, output[i].getNumber()); + Assert.assertEquals(16 * i, output[i].getNumber()); } } diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.java index df63676ce..2b948f8d9 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.java @@ -32,15 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.Arrays; import java.util.List; import org.junit.Test; import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.java similarity index 95% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.java index 1992f51e2..ee3a15e6a 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.java @@ -32,14 +32,14 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.Assert; import org.scijava.function.Inplaces; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -89,7 +89,7 @@ public void testInplace1ToArrays() { .mutate(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(1 * i, io[i].getNumber()); + Assert.assertEquals(1 * i, io[i].getNumber()); } } @@ -111,7 +111,7 @@ public void testInplace2_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(2 * i, io[i].getNumber()); + Assert.assertEquals(2 * i, io[i].getNumber()); } } @@ -133,7 +133,7 @@ public void testInplace2_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(2 * i, io[i].getNumber()); + Assert.assertEquals(2 * i, io[i].getNumber()); } } @@ -156,7 +156,7 @@ public void testInplace3_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(3 * i, io[i].getNumber()); + Assert.assertEquals(3 * i, io[i].getNumber()); } } @@ -179,7 +179,7 @@ public void testInplace3_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(3 * i, io[i].getNumber()); + Assert.assertEquals(3 * i, io[i].getNumber()); } } @@ -202,7 +202,7 @@ public void testInplace3_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(3 * i, io[i].getNumber()); + Assert.assertEquals(3 * i, io[i].getNumber()); } } @@ -226,7 +226,7 @@ public void testInplace4_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(4 * i, io[i].getNumber()); + Assert.assertEquals(4 * i, io[i].getNumber()); } } @@ -250,7 +250,7 @@ public void testInplace4_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(4 * i, io[i].getNumber()); + Assert.assertEquals(4 * i, io[i].getNumber()); } } @@ -274,7 +274,7 @@ public void testInplace4_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(4 * i, io[i].getNumber()); + Assert.assertEquals(4 * i, io[i].getNumber()); } } @@ -298,7 +298,7 @@ public void testInplace4_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(4 * i, io[i].getNumber()); + Assert.assertEquals(4 * i, io[i].getNumber()); } } @@ -323,7 +323,7 @@ public void testInplace5_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(5 * i, io[i].getNumber()); + Assert.assertEquals(5 * i, io[i].getNumber()); } } @@ -348,7 +348,7 @@ public void testInplace5_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(5 * i, io[i].getNumber()); + Assert.assertEquals(5 * i, io[i].getNumber()); } } @@ -373,7 +373,7 @@ public void testInplace5_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(5 * i, io[i].getNumber()); + Assert.assertEquals(5 * i, io[i].getNumber()); } } @@ -398,7 +398,7 @@ public void testInplace5_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(5 * i, io[i].getNumber()); + Assert.assertEquals(5 * i, io[i].getNumber()); } } @@ -423,7 +423,7 @@ public void testInplace5_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(5 * i, io[i].getNumber()); + Assert.assertEquals(5 * i, io[i].getNumber()); } } @@ -449,7 +449,7 @@ public void testInplace6_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(6 * i, io[i].getNumber()); + Assert.assertEquals(6 * i, io[i].getNumber()); } } @@ -475,7 +475,7 @@ public void testInplace6_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(6 * i, io[i].getNumber()); + Assert.assertEquals(6 * i, io[i].getNumber()); } } @@ -501,7 +501,7 @@ public void testInplace6_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(6 * i, io[i].getNumber()); + Assert.assertEquals(6 * i, io[i].getNumber()); } } @@ -527,7 +527,7 @@ public void testInplace6_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(6 * i, io[i].getNumber()); + Assert.assertEquals(6 * i, io[i].getNumber()); } } @@ -553,7 +553,7 @@ public void testInplace6_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(6 * i, io[i].getNumber()); + Assert.assertEquals(6 * i, io[i].getNumber()); } } @@ -579,7 +579,7 @@ public void testInplace6_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(6 * i, io[i].getNumber()); + Assert.assertEquals(6 * i, io[i].getNumber()); } } @@ -606,7 +606,7 @@ public void testInplace7_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -633,7 +633,7 @@ public void testInplace7_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -660,7 +660,7 @@ public void testInplace7_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -687,7 +687,7 @@ public void testInplace7_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -714,7 +714,7 @@ public void testInplace7_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -741,7 +741,7 @@ public void testInplace7_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -768,7 +768,7 @@ public void testInplace7_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(7 * i, io[i].getNumber()); + Assert.assertEquals(7 * i, io[i].getNumber()); } } @@ -796,7 +796,7 @@ public void testInplace8_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -824,7 +824,7 @@ public void testInplace8_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -852,7 +852,7 @@ public void testInplace8_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -880,7 +880,7 @@ public void testInplace8_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -908,7 +908,7 @@ public void testInplace8_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -936,7 +936,7 @@ public void testInplace8_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -964,7 +964,7 @@ public void testInplace8_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -992,7 +992,7 @@ public void testInplace8_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(8 * i, io[i].getNumber()); + Assert.assertEquals(8 * i, io[i].getNumber()); } } @@ -1021,7 +1021,7 @@ public void testInplace9_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1050,7 +1050,7 @@ public void testInplace9_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1079,7 +1079,7 @@ public void testInplace9_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1108,7 +1108,7 @@ public void testInplace9_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1137,7 +1137,7 @@ public void testInplace9_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1166,7 +1166,7 @@ public void testInplace9_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1195,7 +1195,7 @@ public void testInplace9_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1224,7 +1224,7 @@ public void testInplace9_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1253,7 +1253,7 @@ public void testInplace9_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(9 * i, io[i].getNumber()); + Assert.assertEquals(9 * i, io[i].getNumber()); } } @@ -1283,7 +1283,7 @@ public void testInplace10_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1313,7 +1313,7 @@ public void testInplace10_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1343,7 +1343,7 @@ public void testInplace10_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1373,7 +1373,7 @@ public void testInplace10_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1403,7 +1403,7 @@ public void testInplace10_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1433,7 +1433,7 @@ public void testInplace10_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1463,7 +1463,7 @@ public void testInplace10_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1493,7 +1493,7 @@ public void testInplace10_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1523,7 +1523,7 @@ public void testInplace10_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1553,7 +1553,7 @@ public void testInplace10_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(10 * i, io[i].getNumber()); + Assert.assertEquals(10 * i, io[i].getNumber()); } } @@ -1584,7 +1584,7 @@ public void testInplace11_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1615,7 +1615,7 @@ public void testInplace11_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1646,7 +1646,7 @@ public void testInplace11_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1677,7 +1677,7 @@ public void testInplace11_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1708,7 +1708,7 @@ public void testInplace11_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1739,7 +1739,7 @@ public void testInplace11_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1770,7 +1770,7 @@ public void testInplace11_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1801,7 +1801,7 @@ public void testInplace11_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1832,7 +1832,7 @@ public void testInplace11_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1863,7 +1863,7 @@ public void testInplace11_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1894,7 +1894,7 @@ public void testInplace11_11ToArrays() { .mutate11(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(11 * i, io[i].getNumber()); + Assert.assertEquals(11 * i, io[i].getNumber()); } } @@ -1926,7 +1926,7 @@ public void testInplace12_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -1958,7 +1958,7 @@ public void testInplace12_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -1990,7 +1990,7 @@ public void testInplace12_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2022,7 +2022,7 @@ public void testInplace12_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2054,7 +2054,7 @@ public void testInplace12_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2086,7 +2086,7 @@ public void testInplace12_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2118,7 +2118,7 @@ public void testInplace12_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2150,7 +2150,7 @@ public void testInplace12_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2182,7 +2182,7 @@ public void testInplace12_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2214,7 +2214,7 @@ public void testInplace12_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2246,7 +2246,7 @@ public void testInplace12_11ToArrays() { .mutate11(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2278,7 +2278,7 @@ public void testInplace12_12ToArrays() { .mutate12(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(12 * i, io[i].getNumber()); + Assert.assertEquals(12 * i, io[i].getNumber()); } } @@ -2311,7 +2311,7 @@ public void testInplace13_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2344,7 +2344,7 @@ public void testInplace13_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2377,7 +2377,7 @@ public void testInplace13_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2410,7 +2410,7 @@ public void testInplace13_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2443,7 +2443,7 @@ public void testInplace13_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2476,7 +2476,7 @@ public void testInplace13_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2509,7 +2509,7 @@ public void testInplace13_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2542,7 +2542,7 @@ public void testInplace13_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2575,7 +2575,7 @@ public void testInplace13_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2608,7 +2608,7 @@ public void testInplace13_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2641,7 +2641,7 @@ public void testInplace13_11ToArrays() { .mutate11(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2674,7 +2674,7 @@ public void testInplace13_12ToArrays() { .mutate12(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2707,7 +2707,7 @@ public void testInplace13_13ToArrays() { .mutate13(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(13 * i, io[i].getNumber()); + Assert.assertEquals(13 * i, io[i].getNumber()); } } @@ -2741,7 +2741,7 @@ public void testInplace14_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2775,7 +2775,7 @@ public void testInplace14_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2809,7 +2809,7 @@ public void testInplace14_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2843,7 +2843,7 @@ public void testInplace14_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2877,7 +2877,7 @@ public void testInplace14_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2911,7 +2911,7 @@ public void testInplace14_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2945,7 +2945,7 @@ public void testInplace14_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -2979,7 +2979,7 @@ public void testInplace14_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3013,7 +3013,7 @@ public void testInplace14_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3047,7 +3047,7 @@ public void testInplace14_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3081,7 +3081,7 @@ public void testInplace14_11ToArrays() { .mutate11(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3115,7 +3115,7 @@ public void testInplace14_12ToArrays() { .mutate12(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3149,7 +3149,7 @@ public void testInplace14_13ToArrays() { .mutate13(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3183,7 +3183,7 @@ public void testInplace14_14ToArrays() { .mutate14(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(14 * i, io[i].getNumber()); + Assert.assertEquals(14 * i, io[i].getNumber()); } } @@ -3218,7 +3218,7 @@ public void testInplace15_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3253,7 +3253,7 @@ public void testInplace15_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3288,7 +3288,7 @@ public void testInplace15_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3323,7 +3323,7 @@ public void testInplace15_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3358,7 +3358,7 @@ public void testInplace15_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3393,7 +3393,7 @@ public void testInplace15_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3428,7 +3428,7 @@ public void testInplace15_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3463,7 +3463,7 @@ public void testInplace15_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3498,7 +3498,7 @@ public void testInplace15_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3533,7 +3533,7 @@ public void testInplace15_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3568,7 +3568,7 @@ public void testInplace15_11ToArrays() { .mutate11(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3603,7 +3603,7 @@ public void testInplace15_12ToArrays() { .mutate12(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3638,7 +3638,7 @@ public void testInplace15_13ToArrays() { .mutate13(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3673,7 +3673,7 @@ public void testInplace15_14ToArrays() { .mutate14(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3708,7 +3708,7 @@ public void testInplace15_15ToArrays() { .mutate15(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(15 * i, io[i].getNumber()); + Assert.assertEquals(15 * i, io[i].getNumber()); } } @@ -3744,7 +3744,7 @@ public void testInplace16_1ToArrays() { .mutate1(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3780,7 +3780,7 @@ public void testInplace16_2ToArrays() { .mutate2(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3816,7 +3816,7 @@ public void testInplace16_3ToArrays() { .mutate3(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3852,7 +3852,7 @@ public void testInplace16_4ToArrays() { .mutate4(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3888,7 +3888,7 @@ public void testInplace16_5ToArrays() { .mutate5(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3924,7 +3924,7 @@ public void testInplace16_6ToArrays() { .mutate6(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3960,7 +3960,7 @@ public void testInplace16_7ToArrays() { .mutate7(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -3996,7 +3996,7 @@ public void testInplace16_8ToArrays() { .mutate8(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4032,7 +4032,7 @@ public void testInplace16_9ToArrays() { .mutate9(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4068,7 +4068,7 @@ public void testInplace16_10ToArrays() { .mutate10(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4104,7 +4104,7 @@ public void testInplace16_11ToArrays() { .mutate11(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4140,7 +4140,7 @@ public void testInplace16_12ToArrays() { .mutate12(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4176,7 +4176,7 @@ public void testInplace16_13ToArrays() { .mutate13(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4212,7 +4212,7 @@ public void testInplace16_14ToArrays() { .mutate14(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4248,7 +4248,7 @@ public void testInplace16_15ToArrays() { .mutate15(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } @@ -4284,7 +4284,7 @@ public void testInplace16_16ToArrays() { .mutate16(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals(16 * i, io[i].getNumber()); + Assert.assertEquals(16 * i, io[i].getNumber()); } } diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/hints/AdaptationHintTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/hints/AdaptationHintTest.java similarity index 88% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/hints/AdaptationHintTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/hints/AdaptationHintTest.java index 08f282423..c6d9724b8 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/hints/AdaptationHintTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/hints/AdaptationHintTest.java @@ -1,17 +1,19 @@ -package org.scijava.ops.hints; +package org.scijava.ops.engine.hints; import static org.junit.Assert.assertTrue; import java.util.function.Function; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.api.Hints; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Adaptation; +import org.scijava.ops.engine.hint.DefaultHints; +import org.scijava.ops.engine.matcher.OpMatchingException; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.function.Computers; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.impl.DefaultHints; -import org.scijava.ops.matcher.OpMatchingException; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/hints/SimplificationHintTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/hints/SimplificationHintTest.java similarity index 88% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/hints/SimplificationHintTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/hints/SimplificationHintTest.java index c9bf4b1b3..47ed8d0dd 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/hints/SimplificationHintTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/hints/SimplificationHintTest.java @@ -1,18 +1,19 @@ -package org.scijava.ops.hints; +package org.scijava.ops.engine.hints; import static org.junit.Assert.assertTrue; import java.util.function.Function; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.BaseOpHints.Adaptation; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.impl.DefaultHints; -import org.scijava.ops.matcher.OpMatchingException; +import org.scijava.ops.api.Hints; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.hint.DefaultHints; +import org.scijava.ops.engine.matcher.OpMatchingException; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpCachingTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/impl/OpCachingTest.java similarity index 78% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/OpCachingTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/impl/OpCachingTest.java index 516ae644b..23d628795 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/OpCachingTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/impl/OpCachingTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.impl; import static org.junit.Assert.fail; @@ -35,17 +35,20 @@ import java.util.Map; import java.util.Optional; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.junit.jupiter.api.Assertions; import org.scijava.Context; import org.scijava.function.Producer; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.impl.DefaultOpEnvironment; -import org.scijava.ops.impl.MatchingConditions; -import org.scijava.ops.provenance.OpHistoryService; -import org.scijava.param.Parameter; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.OpInstance; +import org.scijava.ops.engine.OpService; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.plugin.PluginService; import org.scijava.types.TypeService; @@ -103,9 +106,9 @@ public void cacheOp() throws SecurityException, IllegalArgumentException, // assert there is exactly one Op in the cache OpInstance cachedInstance = opCache.values().iterator().next(); - Assertions.assertEquals(opCache.size(), 1, 0); - Assertions.assertEquals(basicOp, cachedInstance.op(), - "Object in cache was not the same Object that was returned!"); + Assert.assertEquals(opCache.size(), 1, 0); + Assert.assertEquals( + "Object in cache was not the same Object that was returned!", basicOp, cachedInstance.op()); // assert that the same call to the matcher returns our Object MatchingConditions cachedConditions = opCache.keySet().iterator().next(); @@ -117,9 +120,9 @@ public void cacheOp() throws SecurityException, IllegalArgumentException, Producer invadedOp = defOpEnv.op("test.basicOp").input().outType( String.class).producer(); - Assertions.assertEquals(newProducer.create(), invadedOp.create(), - "Op returned did not match the Op inserted into the cache!"); - + Assert.assertEquals( + "Op returned did not match the Op inserted into the cache!", invadedOp.create(), + newProducer.create()); } @Test @@ -134,29 +137,31 @@ public void cacheOpAndDependencies() throws NoSuchFieldException, Map opCache = getOpCache(defOpEnv); // assert there are exactly two Ops in the cache - Assertions.assertEquals(opCache.size(), 2, 0); + Assert.assertEquals(opCache.size(), 2, 0); // assert that complicatedOp is in the cache ( Optional complicatedOptional = opCache.keySet().stream().filter( condition -> condition.ref().getName().equals("test.complicatedOp")).findFirst(); - Assertions.assertFalse(complicatedOptional.isEmpty(), - "test.complicatedOp not in cache!"); - Assertions.assertTrue(opCache.get(complicatedOptional.get()).op() instanceof ComplicatedOp, - "Object in cache was not an instance of ComplicatedOp!"); + Assert.assertFalse( + "test.complicatedOp not in cache!", complicatedOptional.isEmpty()); + Assert.assertTrue("Object in cache was not an instance of ComplicatedOp!", + opCache.get(complicatedOptional.get()).op() instanceof ComplicatedOp); // assert that basic Op is also in the cache - Optional basicOptional = opCache.keySet().stream().filter(condition -> condition - .ref().getName().equals("test.basicOp")).findFirst(); - Assertions.assertFalse(basicOptional.isEmpty(), - "test.basicOp not in cache despite being an OpDependency of test.complicatedOp"); - Assertions.assertEquals(opCache.get(basicOptional.get()).op(), basicOp, - "Object in cache was not the same Object that was returned!"); + Optional basicOptional = opCache.keySet().stream() + .filter(condition -> condition.ref().getName().equals("test.basicOp")) + .findFirst(); + Assert.assertFalse( + "test.basicOp not in cache despite being an OpDependency of test.complicatedOp", + basicOptional.isEmpty()); + Assert.assertEquals( + "Object in cache was not the same Object that was returned!", opCache.get( + basicOptional.get()).op(), basicOp); } } @Plugin(type = Op.class, name = "test.complicatedOp") -@Parameter(key = "output") class ComplicatedOp implements Producer { @OpDependency(name = "test.basicOp") diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/provenance/ProvenanceTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/impl/ProvenanceTest.java similarity index 89% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/provenance/ProvenanceTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/impl/ProvenanceTest.java index 54e79c9ee..4c7a71317 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/provenance/ProvenanceTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/impl/ProvenanceTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.provenance; +package org.scijava.ops.engine.impl; import com.google.common.graph.Graph; @@ -12,14 +12,16 @@ import org.junit.Test; import org.scijava.Priority; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpField; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpMethod; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.hints.impl.DefaultHints; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpExecutionSummary; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.engine.OpHistoryService; +import org.scijava.ops.engine.hint.DefaultHints; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpMethod; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/DefaultMatchingErrorTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/DefaultMatchingErrorTest.java similarity index 82% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/DefaultMatchingErrorTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/DefaultMatchingErrorTest.java index f1b9b9bb8..3e8b1d9b5 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/DefaultMatchingErrorTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/DefaultMatchingErrorTest.java @@ -1,19 +1,17 @@ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import java.util.function.Function; import org.junit.Assert; import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpField; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class DefaultMatchingErrorTest extends AbstractTestEnvironment { @@ -37,7 +35,7 @@ public void duplicateErrorRegressionTest() { } catch (IllegalArgumentException e) { Assert.assertTrue(e.getMessage().startsWith( - "org.scijava.ops.matcher.OpMatchingException: " + + "org.scijava.ops.engine.matcher.OpMatchingException: " + "Multiple 'test.duplicateOp/java.util.function.Function' " + "ops of priority 0.0:")); } @@ -104,13 +102,15 @@ public void missingDependencyViaAdaptationTest() { } @Plugin(type = Op.class, name = "test.furtherOutsideOp") -@Parameter(key = "in") -@Parameter(key = "out", itemIO = ItemIO.OUTPUT) class FurtherDependentOp implements Function { @OpDependency(name = "test.outsideOp") private Function op; + /** + * @param t the input + * @return the output + */ @Override public Double apply(Double t) { return op.apply(t); @@ -119,13 +119,15 @@ public Double apply(Double t) { } @Plugin(type = Op.class, name = "test.outsideOp") -@Parameter(key = "in") -@Parameter(key = "out", itemIO = ItemIO.OUTPUT) class DependentOp implements Function { @OpDependency(name = "test.missingDependencyOp") private Function op; + /** + * @param t the input + * @return the output + */ @Override public Double apply(Double t) { return op.apply(t); @@ -134,13 +136,15 @@ public Double apply(Double t) { } @Plugin(type = Op.class, name = "test.missingDependencyOp") -@Parameter(key = "in") -@Parameter(key = "out", itemIO = ItemIO.OUTPUT) class MissingDependencyOp implements Function { @OpDependency(name = "test.nonexistingOp") private Function op; + /** + * @param t the input + * @return the output + */ @Override public Double apply(Double t) { return op.apply(t); @@ -149,26 +153,30 @@ public Double apply(Double t) { } @Plugin(type = Op.class, name = "test.adaptMissingDep") -@Parameter(key = "in") -@Parameter(key = "out", itemIO = ItemIO.OUTPUT) class MissingDependencyOpArr1 implements Computers.Arity1 { @OpDependency(name = "test.nonexistingOp") private Function op; + /** + * @param t the input + * @param out the output + */ @Override public void compute(Double[] t, Double[] out) {} } @Plugin(type = Op.class, name = "test.adaptMissingDep") -@Parameter(key = "in") -@Parameter(key = "out", itemIO = ItemIO.OUTPUT) class MissingDependencyOpArr2 implements Function { @OpDependency(name = "test.nonexistingOp") private Function op; + /** + * @param t the input + * @return the output + */ @Override public Double apply(Double t) { return op.apply(t); diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingUtilsTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingUtilsTest.java similarity index 95% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingUtilsTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingUtilsTest.java index 84c753df2..c0ba5dbfe 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingUtilsTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingUtilsTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import static org.junit.Assert.assertTrue; @@ -43,9 +43,10 @@ import org.junit.Assert; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.scijava.ops.engine.matcher.impl.MatchingUtils; import org.scijava.types.Nil; import org.scijava.types.Types; +import org.scijava.types.inference.GenericAssignability; public class MatchingUtilsTest { @@ -58,7 +59,7 @@ private void assertAll(Class from, boolean condition, Nil... tos) { private void assertAll(Class from, boolean condition, Type... tos) { for (Type to : tos) { if (to instanceof ParameterizedType) { - assertTrue(MatchingUtils.checkGenericAssignability(from, (ParameterizedType) to, false) == condition); + assertTrue(GenericAssignability.checkGenericAssignability(from, (ParameterizedType) to, false) == condition); } else { assertTrue(Types.isAssignable(from, to, new HashMap, Type>()) == condition); } @@ -508,7 +509,7 @@ public void testSuperWildcardToSuperWildcard() { // unfortunately we cannot use assertAll since it is impossible to create a // Class implementing List - boolean success = MatchingUtils.checkGenericAssignability(listT.getType(), + boolean success = GenericAssignability.checkGenericAssignability(listT.getType(), (ParameterizedType) listWildcard.getType(), false); Assert.assertTrue(success); } @@ -519,22 +520,22 @@ public void testNonReifiableFunction() { final Nil> doubleFunc = new Nil<>() {}; final Nil> integerFunc = new Nil<>() {}; - boolean successDouble = MatchingUtils.checkGenericAssignability(fooFunc + boolean successDouble = GenericAssignability.checkGenericAssignability(fooFunc .getClass(), (ParameterizedType) doubleFunc.getType(), false); Assert.assertTrue(successDouble); - boolean successInteger = MatchingUtils.checkGenericAssignability(fooFunc + boolean successInteger = GenericAssignability.checkGenericAssignability(fooFunc .getClass(), (ParameterizedType) integerFunc.getType(), false); Assert.assertTrue(successInteger); } @Test(expected = NullPointerException.class) public void testIsAssignableNullToNull() { - MatchingUtils.checkGenericAssignability(null, null, false); + GenericAssignability.checkGenericAssignability(null, null, false); } @Test(expected = NullPointerException.class) public void testIsAssignableClassToNull() { - MatchingUtils.checkGenericAssignability(Object.class, null, false); + GenericAssignability.checkGenericAssignability(Object.class, null, false); } @Test @@ -554,9 +555,9 @@ public void testIsAssignableOutputToObject() { final Type fooSource = new Nil>>() {}.getType(); final Type fooFunc = new Nil>() {}.getType(); - Assertions.assertFalse(MatchingUtils.checkGenericAssignability(fooSource, + Assert.assertFalse(GenericAssignability.checkGenericAssignability(fooSource, (ParameterizedType) fooFunc, false)); - Assertions.assertTrue(MatchingUtils.checkGenericAssignability(fooSource, + Assert.assertTrue(GenericAssignability.checkGenericAssignability(fooSource, (ParameterizedType) fooFunc, true)); } diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingWithAnyTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingWithAnyTest.java similarity index 89% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingWithAnyTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingWithAnyTest.java index b3f6bd972..b9c0831c1 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingWithAnyTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingWithAnyTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import static org.junit.Assert.assertEquals; @@ -10,9 +10,8 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; import org.scijava.types.Any; import org.scijava.types.TypeExtractor; @@ -85,9 +84,6 @@ public void testRunAnyFunction1FromComputer2() { } @Plugin(type = Op.class, name = "test.functionAndLongToLong") -@Parameter(key = "input") -@Parameter(key = "op") -@Parameter(key = "output") class FunctionAndLongToLong implements BiFunction, Long, Long> { @Override @@ -98,9 +94,6 @@ public Long apply(Function t, Long u) { } @Plugin(type = Op.class, name = "test.integerAndLongAndNotAnyComputer") -@Parameter(key = "input1") -@Parameter(key = "input2") -@Parameter(key = "output") class IntegerAndLongAndNotAnyComputer implements Computers.Arity2 { @Override @@ -123,7 +116,6 @@ public void setValue(String value) { } @Plugin(type = Op.class, name = "create, create.stringContainer") -@Parameter(key = "stringContainer") class StringContainerCreator implements Producer { @Override @@ -164,8 +156,6 @@ public double create(V u) { } @Plugin(type = Op.class, name = "test.any") -@Parameter(key = "thing") -@Parameter(key = "output") class ThingFunction implements Function, Double> { @Override @@ -176,8 +166,6 @@ public Double apply(Thing t) { } @Plugin(type = Op.class, name = "test.exceptionalAny") -@Parameter(key = "thing") -@Parameter(key = "output") class ExceptionalThingFunction implements Function, Double> { @Override @@ -189,8 +177,6 @@ public Double apply(ExceptionalThing t) { } @Plugin(type = Op.class, name = "test.nestedAny") -@Parameter(key = "nestedThing") -@Parameter(key = "output") class NestedThingFunction implements Function>, Double> { @Override diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingWithGCSTTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingWithGCSTTest.java similarity index 83% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingWithGCSTTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingWithGCSTTest.java index d5c737ad4..5d5e8d47d 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/MatchingWithGCSTTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/MatchingWithGCSTTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import static org.junit.Assert.assertEquals; @@ -7,11 +7,10 @@ import java.util.function.Function; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; import org.scijava.types.Nil; import org.scijava.types.Types; @@ -53,8 +52,6 @@ static class YThing implements Thing { } @OpField(names = "test.listTypeReification") - @Parameter(key = "input") - @Parameter(key = "output") public static final Function, List> fooOP = (in) -> { List returnList = new ArrayList<>(); returnList.add(0.); diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/OpWrappersTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.java similarity index 67% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/OpWrappersTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.java index 7721049ee..bbfc18269 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/OpWrappersTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.java @@ -3,7 +3,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import static org.junit.Assert.assertTrue; @@ -15,10 +15,8 @@ import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.util.ComputerUtils; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.ops.util.InplaceUtils; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.GenericTyped; import org.scijava.types.Nil; @@ -33,7 +31,7 @@ public class OpWrappersTest extends AbstractTestEnvironment { @Test public void testWrapProducer() { Nil nilDouble = Nil.of(Double.class); - Producer op = FunctionUtils.match(ops.env(), "test.addDoubles", nilDouble); + Producer op = OpBuilder.matchFunction(ops.env(), "test.addDoubles", nilDouble); assertTrue(op instanceof GenericTyped); } @@ -41,7 +39,7 @@ public void testWrapProducer() { public void testWrapFunction1() { Nil nilDouble = Nil.of(Double.class); Function op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -50,7 +48,7 @@ public void testWrapFunction1() { public void testWrapFunction2() { Nil nilDouble = Nil.of(Double.class); BiFunction op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -59,7 +57,7 @@ public void testWrapFunction2() { public void testWrapFunction3() { Nil nilDouble = Nil.of(Double.class); Functions.Arity3 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -68,7 +66,7 @@ public void testWrapFunction3() { public void testWrapFunction4() { Nil nilDouble = Nil.of(Double.class); Functions.Arity4 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -77,7 +75,7 @@ public void testWrapFunction4() { public void testWrapFunction5() { Nil nilDouble = Nil.of(Double.class); Functions.Arity5 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -86,7 +84,7 @@ public void testWrapFunction5() { public void testWrapFunction6() { Nil nilDouble = Nil.of(Double.class); Functions.Arity6 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -95,7 +93,7 @@ public void testWrapFunction6() { public void testWrapFunction7() { Nil nilDouble = Nil.of(Double.class); Functions.Arity7 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -104,7 +102,7 @@ public void testWrapFunction7() { public void testWrapFunction8() { Nil nilDouble = Nil.of(Double.class); Functions.Arity8 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -113,7 +111,7 @@ public void testWrapFunction8() { public void testWrapFunction9() { Nil nilDouble = Nil.of(Double.class); Functions.Arity9 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -122,7 +120,7 @@ public void testWrapFunction9() { public void testWrapFunction10() { Nil nilDouble = Nil.of(Double.class); Functions.Arity10 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -131,7 +129,7 @@ public void testWrapFunction10() { public void testWrapFunction11() { Nil nilDouble = Nil.of(Double.class); Functions.Arity11 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -140,7 +138,7 @@ public void testWrapFunction11() { public void testWrapFunction12() { Nil nilDouble = Nil.of(Double.class); Functions.Arity12 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -149,7 +147,7 @@ public void testWrapFunction12() { public void testWrapFunction13() { Nil nilDouble = Nil.of(Double.class); Functions.Arity13 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -158,7 +156,7 @@ public void testWrapFunction13() { public void testWrapFunction14() { Nil nilDouble = Nil.of(Double.class); Functions.Arity14 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -167,7 +165,7 @@ public void testWrapFunction14() { public void testWrapFunction15() { Nil nilDouble = Nil.of(Double.class); Functions.Arity15 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -176,7 +174,7 @@ public void testWrapFunction15() { public void testWrapFunction16() { Nil nilDouble = Nil.of(Double.class); Functions.Arity16 op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -185,7 +183,7 @@ public void testWrapFunction16() { public void testWrapComputer1() { Nil nilDouble = Nil.of(double[].class); Computers.Arity1 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -193,7 +191,7 @@ public void testWrapComputer1() { public void testWrapComputer2() { Nil nilDouble = Nil.of(double[].class); Computers.Arity2 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -201,7 +199,7 @@ public void testWrapComputer2() { public void testWrapComputer3() { Nil nilDouble = Nil.of(double[].class); Computers.Arity3 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -209,7 +207,7 @@ public void testWrapComputer3() { public void testWrapComputer4() { Nil nilDouble = Nil.of(double[].class); Computers.Arity4 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -217,7 +215,7 @@ public void testWrapComputer4() { public void testWrapComputer5() { Nil nilDouble = Nil.of(double[].class); Computers.Arity5 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -225,7 +223,7 @@ public void testWrapComputer5() { public void testWrapComputer6() { Nil nilDouble = Nil.of(double[].class); Computers.Arity6 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -233,7 +231,7 @@ public void testWrapComputer6() { public void testWrapComputer7() { Nil nilDouble = Nil.of(double[].class); Computers.Arity7 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -241,7 +239,7 @@ public void testWrapComputer7() { public void testWrapComputer8() { Nil nilDouble = Nil.of(double[].class); Computers.Arity8 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -249,7 +247,7 @@ public void testWrapComputer8() { public void testWrapComputer9() { Nil nilDouble = Nil.of(double[].class); Computers.Arity9 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -257,7 +255,7 @@ public void testWrapComputer9() { public void testWrapComputer10() { Nil nilDouble = Nil.of(double[].class); Computers.Arity10 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -265,7 +263,7 @@ public void testWrapComputer10() { public void testWrapComputer11() { Nil nilDouble = Nil.of(double[].class); Computers.Arity11 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -273,7 +271,7 @@ public void testWrapComputer11() { public void testWrapComputer12() { Nil nilDouble = Nil.of(double[].class); Computers.Arity12 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -281,7 +279,7 @@ public void testWrapComputer12() { public void testWrapComputer13() { Nil nilDouble = Nil.of(double[].class); Computers.Arity13 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -289,7 +287,7 @@ public void testWrapComputer13() { public void testWrapComputer14() { Nil nilDouble = Nil.of(double[].class); Computers.Arity14 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -297,7 +295,7 @@ public void testWrapComputer14() { public void testWrapComputer15() { Nil nilDouble = Nil.of(double[].class); Computers.Arity15 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -305,7 +303,7 @@ public void testWrapComputer15() { public void testWrapComputer16() { Nil nilDouble = Nil.of(double[].class); Computers.Arity16 op = // - ComputerUtils.match(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchComputer(ops.env(), "test.addArrays", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -313,7 +311,7 @@ public void testWrapComputer16() { public void testWrapInplace1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity1 op = // - InplaceUtils.match(ops.env(), "test.mulArrays1_1", nilDouble); + OpBuilder.matchInplace(ops.env(), "test.mulArrays1_1", nilDouble); assertTrue(op instanceof GenericTyped); } @@ -321,7 +319,7 @@ public void testWrapInplace1() { public void testWrapInplace2_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity2_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays2_1", nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays2_1", nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -329,7 +327,7 @@ public void testWrapInplace2_1() { public void testWrapInplace2_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity2_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays2_2", nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays2_2", nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -337,7 +335,7 @@ public void testWrapInplace2_2() { public void testWrapInplace3_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity3_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays3_1", nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays3_1", nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -345,7 +343,7 @@ public void testWrapInplace3_1() { public void testWrapInplace3_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity3_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays3_2", nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays3_2", nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -353,7 +351,7 @@ public void testWrapInplace3_2() { public void testWrapInplace3_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity3_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays3_3", nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays3_3", nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -361,7 +359,7 @@ public void testWrapInplace3_3() { public void testWrapInplace4_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity4_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays4_1", nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays4_1", nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -369,7 +367,7 @@ public void testWrapInplace4_1() { public void testWrapInplace4_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity4_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays4_2", nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays4_2", nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -377,7 +375,7 @@ public void testWrapInplace4_2() { public void testWrapInplace4_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity4_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays4_3", nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays4_3", nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -385,7 +383,7 @@ public void testWrapInplace4_3() { public void testWrapInplace4_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity4_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays4_4", nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays4_4", nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -393,7 +391,7 @@ public void testWrapInplace4_4() { public void testWrapInplace5_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity5_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays5_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays5_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -401,7 +399,7 @@ public void testWrapInplace5_1() { public void testWrapInplace5_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity5_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays5_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays5_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -409,7 +407,7 @@ public void testWrapInplace5_2() { public void testWrapInplace5_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity5_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays5_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays5_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -417,7 +415,7 @@ public void testWrapInplace5_3() { public void testWrapInplace5_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity5_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays5_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays5_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -425,7 +423,7 @@ public void testWrapInplace5_4() { public void testWrapInplace5_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity5_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays5_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays5_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -433,7 +431,7 @@ public void testWrapInplace5_5() { public void testWrapInplace6_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity6_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays6_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays6_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -441,7 +439,7 @@ public void testWrapInplace6_1() { public void testWrapInplace6_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity6_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays6_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays6_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -449,7 +447,7 @@ public void testWrapInplace6_2() { public void testWrapInplace6_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity6_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays6_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays6_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -457,7 +455,7 @@ public void testWrapInplace6_3() { public void testWrapInplace6_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity6_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays6_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays6_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -465,7 +463,7 @@ public void testWrapInplace6_4() { public void testWrapInplace6_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity6_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays6_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays6_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -473,7 +471,7 @@ public void testWrapInplace6_5() { public void testWrapInplace6_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity6_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays6_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays6_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -481,7 +479,7 @@ public void testWrapInplace6_6() { public void testWrapInplace7_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays7_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays7_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -489,7 +487,7 @@ public void testWrapInplace7_1() { public void testWrapInplace7_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays7_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays7_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -497,7 +495,7 @@ public void testWrapInplace7_2() { public void testWrapInplace7_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays7_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays7_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -505,7 +503,7 @@ public void testWrapInplace7_3() { public void testWrapInplace7_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays7_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays7_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -513,7 +511,7 @@ public void testWrapInplace7_4() { public void testWrapInplace7_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays7_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays7_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -521,7 +519,7 @@ public void testWrapInplace7_5() { public void testWrapInplace7_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays7_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays7_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -529,7 +527,7 @@ public void testWrapInplace7_6() { public void testWrapInplace7_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity7_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays7_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays7_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -537,7 +535,7 @@ public void testWrapInplace7_7() { public void testWrapInplace8_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays8_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays8_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -545,7 +543,7 @@ public void testWrapInplace8_1() { public void testWrapInplace8_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays8_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays8_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -553,7 +551,7 @@ public void testWrapInplace8_2() { public void testWrapInplace8_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays8_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays8_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -561,7 +559,7 @@ public void testWrapInplace8_3() { public void testWrapInplace8_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays8_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays8_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -569,7 +567,7 @@ public void testWrapInplace8_4() { public void testWrapInplace8_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays8_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays8_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -577,7 +575,7 @@ public void testWrapInplace8_5() { public void testWrapInplace8_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays8_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays8_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -585,7 +583,7 @@ public void testWrapInplace8_6() { public void testWrapInplace8_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays8_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays8_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -593,7 +591,7 @@ public void testWrapInplace8_7() { public void testWrapInplace8_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity8_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays8_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays8_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -601,7 +599,7 @@ public void testWrapInplace8_8() { public void testWrapInplace9_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays9_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays9_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -609,7 +607,7 @@ public void testWrapInplace9_1() { public void testWrapInplace9_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays9_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays9_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -617,7 +615,7 @@ public void testWrapInplace9_2() { public void testWrapInplace9_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays9_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays9_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -625,7 +623,7 @@ public void testWrapInplace9_3() { public void testWrapInplace9_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays9_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays9_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -633,7 +631,7 @@ public void testWrapInplace9_4() { public void testWrapInplace9_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays9_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays9_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -641,7 +639,7 @@ public void testWrapInplace9_5() { public void testWrapInplace9_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays9_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays9_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -649,7 +647,7 @@ public void testWrapInplace9_6() { public void testWrapInplace9_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays9_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays9_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -657,7 +655,7 @@ public void testWrapInplace9_7() { public void testWrapInplace9_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays9_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays9_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -665,7 +663,7 @@ public void testWrapInplace9_8() { public void testWrapInplace9_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity9_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays9_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays9_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -673,7 +671,7 @@ public void testWrapInplace9_9() { public void testWrapInplace10_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays10_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays10_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -681,7 +679,7 @@ public void testWrapInplace10_1() { public void testWrapInplace10_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays10_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays10_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -689,7 +687,7 @@ public void testWrapInplace10_2() { public void testWrapInplace10_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays10_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays10_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -697,7 +695,7 @@ public void testWrapInplace10_3() { public void testWrapInplace10_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays10_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays10_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -705,7 +703,7 @@ public void testWrapInplace10_4() { public void testWrapInplace10_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays10_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays10_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -713,7 +711,7 @@ public void testWrapInplace10_5() { public void testWrapInplace10_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays10_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays10_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -721,7 +719,7 @@ public void testWrapInplace10_6() { public void testWrapInplace10_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays10_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays10_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -729,7 +727,7 @@ public void testWrapInplace10_7() { public void testWrapInplace10_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays10_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays10_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -737,7 +735,7 @@ public void testWrapInplace10_8() { public void testWrapInplace10_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays10_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays10_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -745,7 +743,7 @@ public void testWrapInplace10_9() { public void testWrapInplace10_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity10_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays10_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays10_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -753,7 +751,7 @@ public void testWrapInplace10_10() { public void testWrapInplace11_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays11_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays11_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -761,7 +759,7 @@ public void testWrapInplace11_1() { public void testWrapInplace11_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays11_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays11_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -769,7 +767,7 @@ public void testWrapInplace11_2() { public void testWrapInplace11_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays11_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays11_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -777,7 +775,7 @@ public void testWrapInplace11_3() { public void testWrapInplace11_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays11_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays11_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -785,7 +783,7 @@ public void testWrapInplace11_4() { public void testWrapInplace11_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays11_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays11_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -793,7 +791,7 @@ public void testWrapInplace11_5() { public void testWrapInplace11_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays11_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays11_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -801,7 +799,7 @@ public void testWrapInplace11_6() { public void testWrapInplace11_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays11_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays11_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -809,7 +807,7 @@ public void testWrapInplace11_7() { public void testWrapInplace11_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays11_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays11_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -817,7 +815,7 @@ public void testWrapInplace11_8() { public void testWrapInplace11_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays11_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays11_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -825,7 +823,7 @@ public void testWrapInplace11_9() { public void testWrapInplace11_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays11_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays11_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -833,7 +831,7 @@ public void testWrapInplace11_10() { public void testWrapInplace11_11() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity11_11 op = // - InplaceUtils.match11(ops.env(), "test.mulArrays11_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace11(ops.env(), "test.mulArrays11_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -841,7 +839,7 @@ public void testWrapInplace11_11() { public void testWrapInplace12_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays12_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays12_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -849,7 +847,7 @@ public void testWrapInplace12_1() { public void testWrapInplace12_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays12_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays12_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -857,7 +855,7 @@ public void testWrapInplace12_2() { public void testWrapInplace12_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays12_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays12_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -865,7 +863,7 @@ public void testWrapInplace12_3() { public void testWrapInplace12_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays12_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays12_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -873,7 +871,7 @@ public void testWrapInplace12_4() { public void testWrapInplace12_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays12_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays12_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -881,7 +879,7 @@ public void testWrapInplace12_5() { public void testWrapInplace12_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays12_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays12_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -889,7 +887,7 @@ public void testWrapInplace12_6() { public void testWrapInplace12_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays12_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays12_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -897,7 +895,7 @@ public void testWrapInplace12_7() { public void testWrapInplace12_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays12_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays12_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -905,7 +903,7 @@ public void testWrapInplace12_8() { public void testWrapInplace12_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays12_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays12_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -913,7 +911,7 @@ public void testWrapInplace12_9() { public void testWrapInplace12_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays12_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays12_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -921,7 +919,7 @@ public void testWrapInplace12_10() { public void testWrapInplace12_11() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_11 op = // - InplaceUtils.match11(ops.env(), "test.mulArrays12_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace11(ops.env(), "test.mulArrays12_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -929,7 +927,7 @@ public void testWrapInplace12_11() { public void testWrapInplace12_12() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity12_12 op = // - InplaceUtils.match12(ops.env(), "test.mulArrays12_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace12(ops.env(), "test.mulArrays12_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -937,7 +935,7 @@ public void testWrapInplace12_12() { public void testWrapInplace13_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays13_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays13_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -945,7 +943,7 @@ public void testWrapInplace13_1() { public void testWrapInplace13_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays13_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays13_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -953,7 +951,7 @@ public void testWrapInplace13_2() { public void testWrapInplace13_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays13_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays13_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -961,7 +959,7 @@ public void testWrapInplace13_3() { public void testWrapInplace13_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays13_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays13_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -969,7 +967,7 @@ public void testWrapInplace13_4() { public void testWrapInplace13_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays13_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays13_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -977,7 +975,7 @@ public void testWrapInplace13_5() { public void testWrapInplace13_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays13_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays13_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -985,7 +983,7 @@ public void testWrapInplace13_6() { public void testWrapInplace13_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays13_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays13_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -993,7 +991,7 @@ public void testWrapInplace13_7() { public void testWrapInplace13_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays13_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays13_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1001,7 +999,7 @@ public void testWrapInplace13_8() { public void testWrapInplace13_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays13_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays13_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1009,7 +1007,7 @@ public void testWrapInplace13_9() { public void testWrapInplace13_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays13_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays13_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1017,7 +1015,7 @@ public void testWrapInplace13_10() { public void testWrapInplace13_11() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_11 op = // - InplaceUtils.match11(ops.env(), "test.mulArrays13_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace11(ops.env(), "test.mulArrays13_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1025,7 +1023,7 @@ public void testWrapInplace13_11() { public void testWrapInplace13_12() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_12 op = // - InplaceUtils.match12(ops.env(), "test.mulArrays13_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace12(ops.env(), "test.mulArrays13_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1033,7 +1031,7 @@ public void testWrapInplace13_12() { public void testWrapInplace13_13() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity13_13 op = // - InplaceUtils.match13(ops.env(), "test.mulArrays13_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace13(ops.env(), "test.mulArrays13_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1041,7 +1039,7 @@ public void testWrapInplace13_13() { public void testWrapInplace14_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays14_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays14_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1049,7 +1047,7 @@ public void testWrapInplace14_1() { public void testWrapInplace14_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays14_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays14_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1057,7 +1055,7 @@ public void testWrapInplace14_2() { public void testWrapInplace14_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays14_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays14_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1065,7 +1063,7 @@ public void testWrapInplace14_3() { public void testWrapInplace14_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays14_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays14_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1073,7 +1071,7 @@ public void testWrapInplace14_4() { public void testWrapInplace14_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays14_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays14_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1081,7 +1079,7 @@ public void testWrapInplace14_5() { public void testWrapInplace14_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays14_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays14_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1089,7 +1087,7 @@ public void testWrapInplace14_6() { public void testWrapInplace14_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays14_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays14_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1097,7 +1095,7 @@ public void testWrapInplace14_7() { public void testWrapInplace14_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays14_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays14_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1105,7 +1103,7 @@ public void testWrapInplace14_8() { public void testWrapInplace14_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays14_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays14_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1113,7 +1111,7 @@ public void testWrapInplace14_9() { public void testWrapInplace14_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays14_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays14_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1121,7 +1119,7 @@ public void testWrapInplace14_10() { public void testWrapInplace14_11() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_11 op = // - InplaceUtils.match11(ops.env(), "test.mulArrays14_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace11(ops.env(), "test.mulArrays14_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1129,7 +1127,7 @@ public void testWrapInplace14_11() { public void testWrapInplace14_12() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_12 op = // - InplaceUtils.match12(ops.env(), "test.mulArrays14_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace12(ops.env(), "test.mulArrays14_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1137,7 +1135,7 @@ public void testWrapInplace14_12() { public void testWrapInplace14_13() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_13 op = // - InplaceUtils.match13(ops.env(), "test.mulArrays14_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace13(ops.env(), "test.mulArrays14_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1145,7 +1143,7 @@ public void testWrapInplace14_13() { public void testWrapInplace14_14() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity14_14 op = // - InplaceUtils.match14(ops.env(), "test.mulArrays14_14", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace14(ops.env(), "test.mulArrays14_14", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1153,7 +1151,7 @@ public void testWrapInplace14_14() { public void testWrapInplace15_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays15_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays15_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1161,7 +1159,7 @@ public void testWrapInplace15_1() { public void testWrapInplace15_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays15_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays15_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1169,7 +1167,7 @@ public void testWrapInplace15_2() { public void testWrapInplace15_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays15_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays15_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1177,7 +1175,7 @@ public void testWrapInplace15_3() { public void testWrapInplace15_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays15_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays15_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1185,7 +1183,7 @@ public void testWrapInplace15_4() { public void testWrapInplace15_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays15_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays15_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1193,7 +1191,7 @@ public void testWrapInplace15_5() { public void testWrapInplace15_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays15_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays15_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1201,7 +1199,7 @@ public void testWrapInplace15_6() { public void testWrapInplace15_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays15_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays15_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1209,7 +1207,7 @@ public void testWrapInplace15_7() { public void testWrapInplace15_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays15_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays15_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1217,7 +1215,7 @@ public void testWrapInplace15_8() { public void testWrapInplace15_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays15_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays15_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1225,7 +1223,7 @@ public void testWrapInplace15_9() { public void testWrapInplace15_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays15_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays15_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1233,7 +1231,7 @@ public void testWrapInplace15_10() { public void testWrapInplace15_11() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_11 op = // - InplaceUtils.match11(ops.env(), "test.mulArrays15_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace11(ops.env(), "test.mulArrays15_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1241,7 +1239,7 @@ public void testWrapInplace15_11() { public void testWrapInplace15_12() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_12 op = // - InplaceUtils.match12(ops.env(), "test.mulArrays15_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace12(ops.env(), "test.mulArrays15_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1249,7 +1247,7 @@ public void testWrapInplace15_12() { public void testWrapInplace15_13() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_13 op = // - InplaceUtils.match13(ops.env(), "test.mulArrays15_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace13(ops.env(), "test.mulArrays15_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1257,7 +1255,7 @@ public void testWrapInplace15_13() { public void testWrapInplace15_14() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_14 op = // - InplaceUtils.match14(ops.env(), "test.mulArrays15_14", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace14(ops.env(), "test.mulArrays15_14", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1265,7 +1263,7 @@ public void testWrapInplace15_14() { public void testWrapInplace15_15() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity15_15 op = // - InplaceUtils.match15(ops.env(), "test.mulArrays15_15", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace15(ops.env(), "test.mulArrays15_15", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1273,7 +1271,7 @@ public void testWrapInplace15_15() { public void testWrapInplace16_1() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_1 op = // - InplaceUtils.match1(ops.env(), "test.mulArrays16_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace1(ops.env(), "test.mulArrays16_1", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1281,7 +1279,7 @@ public void testWrapInplace16_1() { public void testWrapInplace16_2() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_2 op = // - InplaceUtils.match2(ops.env(), "test.mulArrays16_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace2(ops.env(), "test.mulArrays16_2", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1289,7 +1287,7 @@ public void testWrapInplace16_2() { public void testWrapInplace16_3() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_3 op = // - InplaceUtils.match3(ops.env(), "test.mulArrays16_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace3(ops.env(), "test.mulArrays16_3", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1297,7 +1295,7 @@ public void testWrapInplace16_3() { public void testWrapInplace16_4() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_4 op = // - InplaceUtils.match4(ops.env(), "test.mulArrays16_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace4(ops.env(), "test.mulArrays16_4", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1305,7 +1303,7 @@ public void testWrapInplace16_4() { public void testWrapInplace16_5() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_5 op = // - InplaceUtils.match5(ops.env(), "test.mulArrays16_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace5(ops.env(), "test.mulArrays16_5", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1313,7 +1311,7 @@ public void testWrapInplace16_5() { public void testWrapInplace16_6() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_6 op = // - InplaceUtils.match6(ops.env(), "test.mulArrays16_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace6(ops.env(), "test.mulArrays16_6", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1321,7 +1319,7 @@ public void testWrapInplace16_6() { public void testWrapInplace16_7() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_7 op = // - InplaceUtils.match7(ops.env(), "test.mulArrays16_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace7(ops.env(), "test.mulArrays16_7", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1329,7 +1327,7 @@ public void testWrapInplace16_7() { public void testWrapInplace16_8() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_8 op = // - InplaceUtils.match8(ops.env(), "test.mulArrays16_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace8(ops.env(), "test.mulArrays16_8", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1337,7 +1335,7 @@ public void testWrapInplace16_8() { public void testWrapInplace16_9() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_9 op = // - InplaceUtils.match9(ops.env(), "test.mulArrays16_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace9(ops.env(), "test.mulArrays16_9", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1345,7 +1343,7 @@ public void testWrapInplace16_9() { public void testWrapInplace16_10() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_10 op = // - InplaceUtils.match10(ops.env(), "test.mulArrays16_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace10(ops.env(), "test.mulArrays16_10", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1353,7 +1351,7 @@ public void testWrapInplace16_10() { public void testWrapInplace16_11() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_11 op = // - InplaceUtils.match11(ops.env(), "test.mulArrays16_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace11(ops.env(), "test.mulArrays16_11", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1361,7 +1359,7 @@ public void testWrapInplace16_11() { public void testWrapInplace16_12() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_12 op = // - InplaceUtils.match12(ops.env(), "test.mulArrays16_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace12(ops.env(), "test.mulArrays16_12", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1369,7 +1367,7 @@ public void testWrapInplace16_12() { public void testWrapInplace16_13() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_13 op = // - InplaceUtils.match13(ops.env(), "test.mulArrays16_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace13(ops.env(), "test.mulArrays16_13", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1377,7 +1375,7 @@ public void testWrapInplace16_13() { public void testWrapInplace16_14() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_14 op = // - InplaceUtils.match14(ops.env(), "test.mulArrays16_14", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace14(ops.env(), "test.mulArrays16_14", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1385,7 +1383,7 @@ public void testWrapInplace16_14() { public void testWrapInplace16_15() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_15 op = // - InplaceUtils.match15(ops.env(), "test.mulArrays16_15", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace15(ops.env(), "test.mulArrays16_15", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } @@ -1393,7 +1391,7 @@ public void testWrapInplace16_15() { public void testWrapInplace16_16() { Nil nilDouble = Nil.of(double[].class); Inplaces.Arity16_16 op = // - InplaceUtils.match16(ops.env(), "test.mulArrays16_16", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); + OpBuilder.matchInplace16(ops.env(), "test.mulArrays16_16", nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble, nilDouble); assertTrue(op instanceof GenericTyped); } diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/monitor/OpMonitorTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/monitor/OpMonitorTest.java similarity index 80% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/monitor/OpMonitorTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/monitor/OpMonitorTest.java index 5e5b106f8..8d0d33615 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/monitor/OpMonitorTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/monitor/OpMonitorTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.monitor; +package org.scijava.ops.engine.monitor; import java.math.BigInteger; import java.util.concurrent.CancellationException; @@ -10,13 +10,12 @@ import org.junit.Assert; import org.junit.Test; -import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.Op; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.monitor.DefaultOpMonitor; +import org.scijava.ops.engine.monitor.OpMonitor; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; import org.scijava.types.Nil; /** @@ -33,7 +32,7 @@ public class OpMonitorTest extends AbstractTestEnvironment { */ @Test(expected = CancellationException.class) public void testCancellation() { - Function bigOp = FunctionUtils.match(ops.env(), "test.opMonitor", new Nil() {}, + Function bigOp = OpBuilder.matchFunction(ops.env(), "test.opMonitor", new Nil() {}, new Nil() {}); OpMonitor monitor = new DefaultOpMonitor(); monitor.cancel(); @@ -50,7 +49,7 @@ public void testCancellation() { */ @Test(expected = CancellationException.class) public void testCancellationDifferentThread() throws InterruptedException { - Function bigOp = FunctionUtils.match(ops.env(), "test.opMonitor", new Nil() {}, + Function bigOp = OpBuilder.matchFunction(ops.env(), "test.opMonitor", new Nil() {}, new Nil() {}); OpMonitor monitor = new DefaultOpMonitor(); try { @@ -66,7 +65,7 @@ public void testCancellationDifferentThread() throws InterruptedException { @Test public void testProgress() throws InterruptedException, ExecutionException{ - BiFunction bigOp = FunctionUtils.match(ops.env(), "test.progress", new Nil() {}, + BiFunction bigOp = OpBuilder.matchFunction(ops.env(), "test.progress", new Nil() {}, new Nil() {}, new Nil() {}); OpMonitor monitor = new DefaultOpMonitor(); @@ -86,8 +85,6 @@ public void testProgress() throws InterruptedException, ExecutionException{ } @Plugin(type = Op.class, name = "test.opMonitor") -@Parameter(key = "monitor") -@Parameter(key = "bigInteger") class InfiniteOp implements Function { @Override @@ -106,9 +103,6 @@ public BigInteger apply(OpMonitor opMonitor) { } @Plugin(type = Op.class, name = "test.progress") -@Parameter(key = "monitor") -@Parameter(key = "target") -@Parameter(key = "output") class CountingOp implements BiFunction { @Override diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/PrimitiveListSimplifierTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/PrimitiveListSimplifierTest.java similarity index 80% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/PrimitiveListSimplifierTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/PrimitiveListSimplifierTest.java index 1a7c37da4..b3df105b2 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/PrimitiveListSimplifierTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/PrimitiveListSimplifierTest.java @@ -1,15 +1,16 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.engine.simplify.PrimitiveListSimplifier; public class PrimitiveListSimplifierTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplificationAdaptationTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplificationAdaptationTest.java similarity index 79% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplificationAdaptationTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplificationAdaptationTest.java index 75e3ab6d3..82a0d5afb 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplificationAdaptationTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplificationAdaptationTest.java @@ -1,11 +1,11 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import org.junit.Assert; import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplificationPriorityTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplificationPriorityTest.java similarity index 84% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplificationPriorityTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplificationPriorityTest.java index ae605f733..4fe0a6173 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplificationPriorityTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplificationPriorityTest.java @@ -1,18 +1,17 @@ -package org.scijava.ops.simplify; - -import static org.junit.jupiter.api.Assertions.assertEquals; +package org.scijava.ops.engine.simplify; import java.util.function.BiFunction; import java.util.function.Function; +import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.conversionLoss.LossReporter; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.OpHints; +import org.scijava.ops.api.OpHints; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.engine.BaseOpHints.Simplification; +import org.scijava.ops.engine.conversionLoss.LossReporter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) @@ -43,7 +42,7 @@ public void testSimplificationPriority() { Double output = ops.op("test.thing").input(thing1, thing2).outType( Double.class).apply(); - assertEquals(1., output); + Assert.assertEquals(1., output, 0.); } @Test @@ -52,7 +51,7 @@ public void testMissingLossReporter() { Double output = ops.op("test.thing").input(thing1).outType( Double.class).apply(); - assertEquals(2., output); + Assert.assertEquals(2., output, 0.); } @OpHints(hints = {Simplification.FORBIDDEN}) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplifyIOTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplifyIOTest.java similarity index 89% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplifyIOTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplifyIOTest.java index b193a353d..b1941f0c2 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplifyIOTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplifyIOTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -8,9 +8,9 @@ import org.junit.Test; import org.scijava.function.Computers; import org.scijava.function.Inplaces; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplifyTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplifyTest.java similarity index 88% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplifyTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplifyTest.java index cff119a6c..fb111762b 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/simplify/SimplifyTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/simplify/SimplifyTest.java @@ -1,14 +1,14 @@ -package org.scijava.ops.simplify; +package org.scijava.ops.engine.simplify; import static org.junit.Assert.assertEquals; import java.util.function.BiFunction; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/stats/MeanTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/stats/MeanTest.java similarity index 61% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/stats/MeanTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/stats/MeanTest.java index 82e8e75be..dcf340f43 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/stats/MeanTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/stats/MeanTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.stats; +package org.scijava.ops.engine.stats; import static org.junit.Assert.assertEquals; @@ -7,9 +7,8 @@ import java.util.function.Function; import org.junit.Test; -import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class MeanTest extends AbstractTestEnvironment{ @@ -17,7 +16,7 @@ public class MeanTest extends AbstractTestEnvironment{ @Test public void regressionTest() { - Function, Double> goodFunc = FunctionUtils.match(ops.env(), "stats.mean", new Nil>() {}, new Nil() {}); + Function, Double> goodFunc = OpBuilder.matchFunction(ops.env(), "stats.mean", new Nil>() {}, new Nil() {}); List goodNums = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); double expected = 5.5; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/AdaptersTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/AdaptersTest.java similarity index 95% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/AdaptersTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/AdaptersTest.java index d54d907aa..c6a1495d0 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/AdaptersTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/AdaptersTest.java @@ -27,14 +27,15 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.util; import java.util.function.BiFunction; import org.junit.Test; import org.scijava.types.Nil; import org.scijava.function.Computers; -import org.scijava.ops.util.Adapt; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.engine.util.Adapt; public class AdaptersTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/ComputersTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/ComputersTest.java similarity index 87% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/ComputersTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/ComputersTest.java index 28b665ed7..409b04d14 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/ComputersTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/ComputersTest.java @@ -27,11 +27,12 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.util; import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.util.ComputerUtils; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class ComputersTest extends AbstractTestEnvironment { @@ -41,7 +42,7 @@ public class ComputersTest extends AbstractTestEnvironment { @Test public void testUnaryComputers() { - Computers.Arity1 sqrtComputer = ComputerUtils.match(ops.env(), + Computers.Arity1 sqrtComputer = OpBuilder.matchComputer(ops.env(), "math.sqrt", nilDoubleArray, nilDoubleArray); double[] result = new double[3]; @@ -52,7 +53,7 @@ public void testUnaryComputers() { @Test public void testBinaryComputers() { Computers.Arity2 addComputer = // - ComputerUtils.match(ops.env(), "math.add", nilDoubleArray, nilDoubleArray, + OpBuilder.matchComputer(ops.env(), "math.add", nilDoubleArray, nilDoubleArray, nilDoubleArray); double[] result = new double[3]; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/FunctionsTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/FunctionsTest.java similarity index 81% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/FunctionsTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/FunctionsTest.java index 1584e3500..764b4ec88 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/FunctionsTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/FunctionsTest.java @@ -27,14 +27,14 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.util; import java.util.function.BiFunction; import java.util.function.Function; import org.junit.Test; -import org.scijava.function.Functions; -import org.scijava.ops.util.FunctionUtils; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class FunctionsTest extends AbstractTestEnvironment { @@ -44,19 +44,19 @@ public class FunctionsTest extends AbstractTestEnvironment { @Test public void testUnaryFunctions() { - Function sqrtFunction = FunctionUtils.match(ops.env(), "math.sqrt", nilDouble, nilDouble); + Function sqrtFunction = OpBuilder.matchFunction(ops.env(), "math.sqrt", nilDouble, nilDouble); double answer = sqrtFunction.apply(16.0); assert 4.0 == answer; } @Test public void testBinaryFunctions() { - BiFunction addFunction = FunctionUtils.match(ops.env(), "math.add", nilDouble, nilDouble, + BiFunction addFunction = OpBuilder.matchFunction(ops.env(), "math.add", nilDouble, nilDouble, nilDouble); double answer = addFunction.apply(16.0, 14.0); assert 30.0 == answer; - BiFunction powerFunction = FunctionUtils.match(ops.env(), "math.pow", nilDouble, + BiFunction powerFunction = OpBuilder.matchFunction(ops.env(), "math.pow", nilDouble, nilDouble, nilDouble); answer = powerFunction.apply(2.0, 10.0); assert 1024.0 == answer; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/InplacesTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/InplacesTest.java similarity index 84% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/InplacesTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/InplacesTest.java index be4055298..992008b41 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/InplacesTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/InplacesTest.java @@ -27,11 +27,12 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.util; import org.junit.Test; import org.scijava.function.Inplaces; -import org.scijava.ops.util.InplaceUtils; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class InplacesTest extends AbstractTestEnvironment { @@ -41,7 +42,7 @@ public class InplacesTest extends AbstractTestEnvironment { @Test public void testUnaryInplaces() { - Inplaces.Arity1 inplaceSqrt = InplaceUtils.match(ops.env(), "math.sqrt", nilDoubleArray); + Inplaces.Arity1 inplaceSqrt = OpBuilder.matchInplace(ops.env(), "math.sqrt", nilDoubleArray); final double[] a1 = { 4, 100, 36 }; inplaceSqrt.mutate(a1); assert arrayEquals(a1, 2.0, 10.0, 6.0); @@ -49,7 +50,7 @@ public void testUnaryInplaces() { @Test public void testBinaryInplaces() { - final Inplaces.Arity2_1 inplaceAdd = InplaceUtils.match1(ops.env(), "math.add", nilDoubleArray, + final Inplaces.Arity2_1 inplaceAdd = OpBuilder.matchInplace1(ops.env(), "math.add", nilDoubleArray, nilDoubleArray); final double[] a1 = { 3, 5, 7 }; final double[] a2 = { 2, 4, 9 }; diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/util/LambdaizerTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/LambdaizerTest.java similarity index 98% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/util/LambdaizerTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/LambdaizerTest.java index b301282cf..f8c262bcf 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/util/LambdaizerTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/LambdaizerTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.util; +package org.scijava.ops.engine.util; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -9,6 +9,7 @@ import org.junit.Test; import org.scijava.function.Computers; import org.scijava.function.Inplaces; +import org.scijava.ops.engine.util.Adapt; /** * Confirms the capabilities of the lambdaizer to convert methods into their diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/LiftTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/LiftTest.java similarity index 88% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/LiftTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/LiftTest.java index 650fe6667..5b9c3028e 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/LiftTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/LiftTest.java @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine.util; import com.google.common.collect.Streams; @@ -39,11 +39,10 @@ import org.junit.Assert; import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.function.Functions; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.util.Maps; import org.scijava.types.Nil; -import org.scijava.ops.util.ComputerUtils; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.ops.util.Maps; public class LiftTest extends AbstractTestEnvironment { @@ -55,7 +54,7 @@ public class LiftTest extends AbstractTestEnvironment { @Test public void testliftFunction(){ - Function powFunction = FunctionUtils.match(ops.env(), "test.liftFunction", nilDouble, nilDouble); + Function powFunction = OpBuilder.matchFunction(ops.env(), "test.liftFunction", nilDouble, nilDouble); Function, Iterable> liftedToIterable = Maps.FunctionMaps.Iterables.liftBoth(powFunction); Iterable res2 = liftedToIterable.apply(Arrays.asList(1.0, 2.0, 3.0, 4.0)); @@ -73,7 +72,7 @@ private static double[] toArray(Iterable iter) { @Test public void testliftComputer() { - Computers.Arity1 powComputer = ComputerUtils.match(ops.env(), "test.liftComputer", nilDoubleArray, nilDoubleArray); + Computers.Arity1 powComputer = OpBuilder.matchComputer(ops.env(), "test.liftComputer", nilDoubleArray, nilDoubleArray); Computers.Arity1, Iterable> liftedToIterable = Maps.ComputerMaps.Iterables .liftBoth(powComputer); diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/util/OpsAsParametersTest.java b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/OpsAsParametersTest.java similarity index 74% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/util/OpsAsParametersTest.java rename to scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/OpsAsParametersTest.java index a137689cf..602381b0b 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/util/OpsAsParametersTest.java +++ b/scijava/scijava-ops-engine/src/test/java/org/scijava/ops/engine/util/OpsAsParametersTest.java @@ -1,4 +1,4 @@ -package org.scijava.ops.util; +package org.scijava.ops.engine.util; import java.util.ArrayList; import java.util.List; @@ -6,29 +6,21 @@ import java.util.function.Function; import org.junit.Test; -import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.core.builder.OpBuilder; -import org.scijava.types.Nil; -import org.scijava.param.Parameter; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpField; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; +import org.scijava.types.Nil; @Plugin(type = OpCollection.class) public class OpsAsParametersTest extends AbstractTestEnvironment { @OpField(names = "test.parameter.computer") - @Parameter(key = "input") - @Parameter(key = "output") public final Function func = (x) -> x.doubleValue(); @OpField(names = "test.parameter.op") - @Parameter(key = "inputList") - @Parameter(key = "op") - @Parameter(key = "outputList") public final BiFunction, Function, List> biFunc = (x, op) -> { List output = new ArrayList<>(); for (Number n : x) @@ -57,7 +49,7 @@ public void TestOpWithOpFieldWithoutRun() { list.add(20.5); list.add(4.0d); - BiFunction, Function, List> thing = FunctionUtils.match(ops.env(), + BiFunction, Function, List> thing = OpBuilder.matchFunction(ops.env(), "test.parameter.op", new Nil>() { }, new Nil>() { }, new Nil>() { @@ -75,7 +67,7 @@ public void TestOpWithOpClass() { list.add(20.5); list.add(4.0d); - Function funcClass = FunctionUtils.match(ops.env(), "test.parameter.class", new Nil() { + Function funcClass = OpBuilder.matchFunction(ops.env(), "test.parameter.class", new Nil() { }, new Nil() { }); @@ -86,8 +78,6 @@ public void TestOpWithOpClass() { } @Plugin(type = Op.class, name = "test.parameter.class") -@Parameter(key = "input") -@Parameter(key = "output") class FuncClass implements Function { @Override diff --git a/scijava/scijava-ops-engine/templates/main/java/module-info.list b/scijava/scijava-ops-engine/templates/main/java/module-info.list new file mode 100644 index 000000000..f78128f81 --- /dev/null +++ b/scijava/scijava-ops-engine/templates/main/java/module-info.list @@ -0,0 +1,45 @@ +[module-info.java] +findPackageNames = ``` +import java.io.File; +import java.util.Set; +{ set, dirName -> + + File directory = new File(dirName); + // get all the files from a directory + File[] fList = directory.listFiles(); + for (File file : fList) { + if (file.isFile()) { + String path = file.getPath(); + int begin = path.indexOf("org"); + int end = path.lastIndexOf(File.separator); + String packName = path.substring(begin, end); + set.add(packName.replace(File.separator, '.')); + } + else if (file.isDirectory()) { + findPackageNames(set, file.getAbsolutePath()); + } + } +} +``` + +modulePackages = ``` +import java.util.HashSet; +{ path -> + set = new HashSet<>(); + findPackageNames(set, path); + return set; +} +``` + +opensToString = ``` +import java.util.HashSet; +{ p, scijavaPackages, therapiPackages -> + set = new HashSet<>(); + if (scijavaPackages.contains(p)) + set.add("org.scijava"); + if (therapiPackages.contains(p)) + set.add("therapi.runtime.javadoc"); + String packageString = set.toArray().toString(); + return packageString.substring(1, packageString.length() - 1); +} +``` \ No newline at end of file diff --git a/scijava/scijava-ops-engine/templates/main/java/module-info.vm b/scijava/scijava-ops-engine/templates/main/java/module-info.vm new file mode 100644 index 000000000..089320bc7 --- /dev/null +++ b/scijava/scijava-ops-engine/templates/main/java/module-info.vm @@ -0,0 +1,37 @@ +module org.scijava.ops.engine { + +/* + * This is autogenerated source code -- DO NOT EDIT. Instead, edit the + * corresponding template in templates/ and rerun bin/generate.groovy. + */ + +## Determines all packages in the module +#set($packages = $modulePackages.call("src/main/java/org/scijava")) +## Defines the packages that should be exported to org.scijava +#set($scijavaPackages = ["org.scijava.ops.engine", "org.scijava.ops.engine.impl", "org.scijava.ops.engine.matcher.impl", "org.scijava.ops.engine.conversionLoss.impl"]) +## Defines the packages that should be exported to therapi.runtime.javadoc +#set($therapiPackages = $modulePackages.call("src/main/java/org/scijava")) + + exports org.scijava.ops.engine; + exports org.scijava.ops.engine.conversionLoss; + exports org.scijava.ops.engine.util; + +#foreach($package in $packages) + opens $package to $opensToString.call($package, $scijavaPackages, $therapiPackages); +#end + + requires java.desktop; + + requires org.scijava; + requires org.scijava.function; + requires org.scijava.struct; + requires org.scijava.ops.api; + requires org.scijava.ops.discovery; + requires org.scijava.ops.spi; + requires org.scijava.types; + requires javassist; + requires java.compiler; + requires therapi.runtime.javadoc; + + uses javax.annotation.processing.Processor; +} diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.list similarity index 94% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.list index 5ed4ceef8..1febe798e 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputersToFunctionsAndLift.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.vm similarity index 94% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.vm index 4ce032cb5..16abc7012 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/ComputersToFunctionsAndLift.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/ComputersToFunctionsAndLift.vm @@ -66,7 +66,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import java.util.function.BiFunction; import java.util.function.Function; @@ -74,9 +74,9 @@ import java.util.function.Function; import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -89,8 +89,6 @@ public class ComputersToFunctionsAndLift { #foreach($arity in [1..$maxArity]) @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer${arity}ToFunction${arity}AndLiftViaSource$generics.call($arity) implements Function<$computerArity.call($arity)$generics.call($arity), $functionArity.call($arity)$iterableGenerics.call($arity)> { @@ -99,6 +97,10 @@ public class ComputersToFunctionsAndLift { @OpDependency(name = "adapt", adaptable = false) Function<$functionArity.call($arity)$generics.call($arity), $functionArity.call($arity)$iterableGenerics.call($arity)> lifter; + /** + * @param computer the Computer to convert + * @return {@code computer} as a Function + */ @Override public $functionArity.call($arity)$iterableGenerics.call($arity) apply($computerArity.call($arity)$generics.call($arity) computer) { return lifter.apply(adaptor.apply(computer)); diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.list similarity index 94% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.list index 645bc8a04..09b3e38fe 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionsToComputersAndLift.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.vm similarity index 91% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.vm index ce1342b9b..f0391ed15 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/complexLift/FunctionsToComputersAndLift.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/complexLift/FunctionsToComputersAndLift.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import java.util.function.BiFunction; import java.util.function.Function; @@ -40,9 +40,9 @@ import java.util.function.Function; import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -56,8 +56,6 @@ public class FunctionsToComputersAndLift { #foreach($arity in [1..$maxArity]) @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function${arity}ToComputer${arity}AndLiftAfter$generics.call($arity) implements Function<$functionArity.call($arity)$generics.call($arity), $computerArity.call($arity)$iterableGenerics.call($arity)> { @@ -67,6 +65,10 @@ public class FunctionsToComputersAndLift { @OpDependency(name = "adapt", adaptable = false) Function<$computerArity.call($arity)$generics.call($arity), $computerArity.call($arity)$iterableGenerics.call($arity)> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public $computerArity.call($arity)$iterableGenerics.call($arity) apply( $functionArity.call($arity)$generics.call($arity) function) @@ -77,8 +79,6 @@ public class FunctionsToComputersAndLift { } @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW + 1) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function${arity}ToComputer${arity}AndLiftBefore$generics.call($arity) implements Function<$functionArity.call($arity)$generics.call($arity), $computerArity.call($arity)$iterableGenerics.call($arity)> { @@ -88,6 +88,10 @@ public class FunctionsToComputersAndLift { @OpDependency(name = "adapt", adaptable = false) Function<$functionArity.call($arity)$generics.call($arity), $functionArity.call($arity)$iterableGenerics.call($arity)> lifter; + /** + * @param function - the Function to convert + * @return the function as a Computer + */ @Override public $computerArity.call($arity)$iterableGenerics.call($arity) apply( $functionArity.call($arity)$generics.call($arity) function) diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.list similarity index 51% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.list index 438cb5e01..0607ffaa3 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputersToFunctionsViaFunction.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.vm similarity index 91% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.vm index b4592f2f3..18b74e3a3 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaFunction.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaFunction.vm @@ -32,16 +32,16 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Computers; import org.scijava.function.Functions; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -55,14 +55,16 @@ public class ComputersToFunctionsViaFunction { #foreach($arity in [1..$maxArity]) @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer${arity}ToFunction${arity}ViaFunction$generics.call($arity) implements Function<$computerArity.call($arity)$generics.call($arity), $functionArity.call($arity)$generics.call($arity)> { @OpDependency(name = "create", adaptable = false) Function creator; + /** + * @param computer the Computer to adapt + * @return computer, adapted into a Function + */ @Override public $functionArity.call($arity)$generics.call($arity) apply($computerArity.call($arity)$generics.call($arity) computer) { return ($applyArgs.call($arity)) -> { diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.list similarity index 50% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.list index a6e433646..8e5b576cf 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputersToFunctionsViaSource.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.vm similarity index 91% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.vm index 7117e84be..b7a94614d 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/ComputersToFunctionsViaSource.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/ComputersToFunctionsViaSource.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; @@ -41,9 +41,9 @@ import org.scijava.Priority; import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Producer; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -57,14 +57,16 @@ public class ComputersToFunctionsViaSource { #foreach($arity in [0..$maxArity]) @Plugin(type = Op.class, name = "adapt", priority = Priority.LOW) - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Computer${arity}ToFunction${arity}ViaSource$generics.call($arity) implements Function<$computerArity.call($arity)$generics.call($arity), $functionArity.call($arity)$generics.call($arity)> { @OpDependency(name = "create", adaptable = false) Producer creator; + /** + * @param computer the computer to adapt + * @return a Function adaptation of computer + */ @Override public $functionArity.call($arity)$generics.call($arity) apply($computerArity.call($arity)$generics.call($arity) computer) { return (#if($arity == 0)#{else}$applyArgs.call($arity)#end) -> { diff --git a/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.list new file mode 100644 index 000000000..346a325b9 --- /dev/null +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.list @@ -0,0 +1,4 @@ +.include templates/main/java/org/scijava/ops/engine/util/Globals.list +arities = (1..maxArity).collect() + +[FunctionsToComputers.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.vm similarity index 91% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.vm index 75a785eb9..a2f01bbe2 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/FunctionsToComputers.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; @@ -40,9 +40,9 @@ import java.util.function.Function; import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Producer; -import org.scijava.ops.OpDependency; -import org.scijava.ops.core.Op; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; import org.scijava.plugin.Plugin; /** @@ -56,13 +56,15 @@ public class FunctionsToComputers { #foreach($arity in [0..$maxArity]) @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public static class Function${arity}ToComputer${arity}$generics.call($arity) implements Function<$functionArity.call($arity)$generics.call($arity), $computerArity.call($arity)$generics.call($arity)> { @OpDependency(name = "copy", adaptable = false) Computers.Arity1 copyOp; + /** + * @param function the function to adapt + * @return an adaptation of function + */ @Override public $computerArity.call($arity)$generics.call($arity) apply($functionArity.call($arity)$generics.call($arity) function) { return ($computeArgs.call($arity)) -> { diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.list similarity index 97% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.list index 58cd80a56..580ce0e84 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [InplacesToFunctions.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.vm similarity index 90% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.vm index 058fe743f..8a18e8521 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/InplacesToFunctions.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/functional/InplacesToFunctions.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; @@ -40,11 +40,11 @@ import java.util.function.Function; import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpField; -import org.scijava.ops.core.Op; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.Op; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; #set($classArity = $maxArity + 1) @@ -60,8 +60,6 @@ public class InplacesToFunctions$generics.call($classArity, $classArity) { #foreach($arity in [1..$maxArity]) #foreach($a in [1..$arity]) @Plugin(type = Op.class, name = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") static class Inplace$inplaceSuffix.call($arity, $a)ToFunction${arity}$generics.call($arity, $a) implements Function<$inplaceType.call($arity, $a)$generics.call($arity, $a), $functionArity.call($arity)$functionGenerics.call($arity, $a)> { @OpDependency(name = "create", adaptable = false) @@ -69,6 +67,10 @@ public class InplacesToFunctions$generics.call($classArity, $classArity) { @OpDependency(name = "copy", adaptable = false) private Computers.Arity1 copyOp; + /** + * @param t the Inplace to adapt + * @return an adaptation of inplace + */ @Override public $functionArity.call($arity)$functionGenerics.call($arity, $a) apply($inplaceType.call($arity, $a)$generics.call($arity, $a) t) { return ($mutateArgs.call($arity, $a)) -> { diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.list similarity index 87% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.list index e95840833..efd5bd2c2 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToArrays.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.vm similarity index 90% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.vm index 8ed29b630..b4a60d2d6 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToArrays.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToArrays.vm @@ -32,13 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.function.Function; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.list similarity index 94% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.list index 998367017..d26205a6b 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToIterables.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.vm similarity index 92% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.vm index 6aae73953..5e35f4804 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/ComputerToIterables.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/ComputerToIterables.vm @@ -32,15 +32,16 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.Iterator; import java.util.function.Function; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -56,8 +57,6 @@ public class ComputerToIterables$classGenerics.call($maxArity) { #foreach($arity in [0..$maxArity]) @OpField(names = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public final Function<$computerArity.call($arity)$generics.call($arity), $computerArity.call($arity)$iterableGenerics.call($arity)> liftComputer$arity = (computer) -> { return ($computeArgs.call($arity)) -> { diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.list similarity index 90% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.list index 71c946edb..a2c1e9a20 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToArrays.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.vm similarity index 94% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.vm index 88af66634..8ff22b9b5 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToArrays.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToArrays.vm @@ -32,15 +32,17 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.lang.reflect.Array; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.list similarity index 92% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.list index 35233e15f..bd8ef86e0 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToIterables.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.vm similarity index 95% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.vm index c47d12798..edc36df89 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/FunctionToIterables.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/FunctionToIterables.vm @@ -32,16 +32,17 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.Iterator; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -61,8 +62,6 @@ public class FunctionToIterables$classGenerics.call($maxArity) { #foreach($arity in [1..$maxArity]) @SuppressWarnings("unchecked") @OpField(names = "adapt") - @Parameter(key = "fromOp") - @Parameter(key = "toOp") public final Function<$functionArity.call($arity)$generics.call($arity), $functionArity.call($arity)$iterableGenerics.call($arity)> liftFunction$arity = (function) -> { return ($iteratorInputs.call($arity)) -> lazyIterable(itrs -> function.apply(${funcItrsNext.call($arity)}), $iteratorInputs.call($arity)); diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.list similarity index 94% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.list index 4d87e613b..a51d8da30 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [InplaceToArrays.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.vm similarity index 90% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.vm index cead7be70..16f4b5be2 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/lift/InplaceToArrays.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/adapt/lift/InplaceToArrays.vm @@ -32,13 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.function.Function; import org.scijava.function.Inplaces; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/matcher/OpWrappers.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.list similarity index 96% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/matcher/OpWrappers.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.list index 3f884301e..0b540bf29 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/matcher/OpWrappers.list +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.list @@ -1,4 +1,4 @@ -.include ../util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (0..maxArity).collect() [OpWrappers.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/matcher/OpWrappers.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.vm similarity index 89% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/matcher/OpWrappers.vm rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.vm index 10efa2822..1b6a29500 100644 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/matcher/OpWrappers.vm +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/matcher/impl/OpWrappers.vm @@ -3,7 +3,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher.impl; import java.lang.reflect.Type; import java.util.UUID; @@ -15,12 +15,12 @@ import org.scijava.function.Container; import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.OpInfo; -import org.scijava.ops.hints.BaseOpHints.DependencyMatching; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.provenance.OpExecutionSummary; -import org.scijava.ops.provenance.OpHistoryService; -import org.scijava.ops.util.OpWrapper; +import org.scijava.ops.api.Hints; +import org.scijava.ops.api.OpHistory; +import org.scijava.ops.api.OpInfo; +import org.scijava.ops.api.OpWrapper; +import org.scijava.ops.engine.BaseOpHints.DependencyMatching; +import org.scijava.ops.engine.OpExecutionSummary; import org.scijava.plugin.Plugin; import org.scijava.types.GenericTyped; @@ -32,7 +32,7 @@ public class OpWrappers { public static class ProducerOpWrapper implements OpWrapper> { @Override - public Producer wrap(final Producer op, final OpInfo info, final Hints hints, final OpHistoryService history, final UUID executionID, final Type reifiedType) { + public Producer wrap(final Producer op, final OpInfo info, final Hints hints, final OpHistory history, final UUID executionID, final Type reifiedType) { class GenericTypedProducer implements Producer, GenericTyped { @Override @@ -73,7 +73,7 @@ public class OpWrappers { final $fg op, // final OpInfo info, // final Hints hints, // - final OpHistoryService history, // + final OpHistory history, // final UUID executionID, // final Type reifiedType) { @@ -121,7 +121,7 @@ public class OpWrappers { final $cg op, // final OpInfo info, // final Hints hints, // - final OpHistoryService history, // + final OpHistory history, // final UUID executionID, // final Type reifiedType) { @@ -169,7 +169,7 @@ public class OpWrappers { final $ig op, // final OpInfo info, // final Hints hints, // - final OpHistoryService history, // + final OpHistory history, // final UUID executionID, // final Type reifiedType) { diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/FunctionUtils.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/FunctionUtils.list similarity index 100% rename from scijava/scijava-ops/templates/main/java/org/scijava/ops/util/FunctionUtils.list rename to scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/FunctionUtils.list diff --git a/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/FunctionUtils.vm b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/FunctionUtils.vm new file mode 100644 index 000000000..421e1415e --- /dev/null +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/FunctionUtils.vm @@ -0,0 +1,64 @@ +/* + * This is autogenerated source code -- DO NOT EDIT. Instead, edit the + * corresponding template in templates/ and rerun bin/generate.groovy. + */ + +package org.scijava.ops.engine.util; + +import java.lang.reflect.Type; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.Function; + +import org.scijava.function.Functions; +import org.scijava.function.Producer; +import org.scijava.ops.api.OpEnvironment; +import org.scijava.ops.api.Hints; +import org.scijava.types.Nil; +import org.scijava.types.Types; + +/** + * Utility class designed to match {@code Function}s of various arities. + * + * @author Curtis Rueden + * @author Gabriel Selzer + */ +public final class FunctionUtils { + + private FunctionUtils() { + // NB: Prevent instantiation of utility class. + } + + @SuppressWarnings({ "unchecked" }) + public static Functions.ArityN matchN(final OpEnvironment env, + final String opName, final Nil outType, final Nil... inTypes) + { + Map.Entry> c = Functions.ALL_FUNCTIONS // + .entrySet().stream() // + .filter(e -> e.getKey() == inTypes.length) // + .findAny().get(); + Object op = matchHelper(env, opName, c.getValue(), outType, inTypes); + if (op instanceof Producer) { + return Functions.nary((Producer) op); + } +#set($maxMinusOne = $maxArity - 1) +#foreach($arity in [1..$maxMinusOne]) + else if (op instanceof $functionArity.call($arity)) { + return Functions.nary(($functionArity.call($arity)$objectGenerics.call($arity)) op); + } +#end + return Functions.nary(($functionArity.call($maxArity)$objectGenerics.call($maxArity)) op); + } + + @SuppressWarnings({ "unchecked" }) + private static T matchHelper(final OpEnvironment env, final String opName, + final Class opClass, final Nil outType, final Nil... inTypes) + { + final Type[] types = new Type[inTypes.length + 1]; + for (int i = 0; i < inTypes.length; i++) + types[i] = inTypes[i].getType(); + types[types.length - 1] = outType.getType(); + final Type specialType = Types.parameterize(opClass, types); + return (T) env.op(opName, Nil.of(specialType), inTypes, outType); + } +} diff --git a/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/Globals.list b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/Globals.list new file mode 100644 index 000000000..683b34d16 --- /dev/null +++ b/scijava/scijava-ops-engine/templates/main/java/org/scijava/ops/engine/util/Globals.list @@ -0,0 +1,121 @@ +maxArity = 16 +numConsumers = maxArity+1 + +inplaceSuffix = ``` +{ arity, num -> + arity == 1 ? '1' : + arity + "_" + num +} +``` +simplifiedInplace = ``` +{ arity, num -> + arity == 1 ? "Arity1" : + "Arity" + inplaceSuffix(arity, num) +} +``` +inplaceType = ``` +{ arity, num -> + "Inplaces." + simplifiedInplace(arity,num) +} +``` +computerArity = ``` +{ arity -> + "Computers.Arity${arity}" +} +``` +consumerArity = ``` +{ arity -> + arity == 0 ? 'Consumer' : + arity == 1 ? 'BiConsumer' : + "Consumers.Arity${arity+1}" +} +``` +functionArity = ``` +{ arity -> + arity == 0 ? 'Producer' : + arity == 1 ? 'Function' : + arity == 2 ? 'BiFunction' : + "Functions.Arity${arity}" +} +``` +genericParamTypes = ``` +{ arity -> + arity == 0 ? ['O'] : + arity == 1 ? ['I', 'O'] : + (1..arity).stream().map{a -> "I$a"}.collect() + ['O'] +} +``` +generics = ``` +{ arity -> + '<' + String.join(', ', genericParamTypes(arity)) + '>' +} +``` +genericsNamesList = ``` +{ arity -> + genericParamTypes(arity).stream().map{a -> + a == 'O' ? "out" : + a == 'I' ? "in" : + "in${a.substring(1)}" + }.collect() +} +``` +nilNames = ``` +{ arity -> + genericsNamesList(arity).stream().map{a -> "${a}Type"}.collect() +} +``` +typeArgs = ``` +{ arity -> + String.join(', ', nilNames(arity).stream().map{a -> "${a}.getType()"}.collect()) +} +``` +typeParamsList = ``` +{ arity -> + gpt = genericParamTypes(arity) + names = genericsNamesList(arity) + (0..arity).stream().map{a -> "${gpt[a]} ${names[a]}"}.collect() +} +``` +typeParamsListWithoutOutput = ``` +{ arity -> + gpt = genericParamTypes(arity) + names = genericsNamesList(arity) + (0..arity-1).stream().map{a -> "${gpt[a]} ${names[a]}"}.collect() +} +``` +applyParams = ``` +{ arity -> + typeParams = typeParamsList(arity) + typeParams.remove(typeParams.size() - 1) + String.join(', ', typeParams) +} +``` +applyArgs = ``` +{ arity -> + names = genericsNamesList(arity) + String.join(', ', names[0..names.size() - 2]) +} +``` +computeParams = ``` +{ arity -> + typeParams = typeParamsList(arity) + typeParams.set(arity, "@Container " + typeParams.get(arity)) + String.join(', ', typeParams) +} +``` +acceptParams = ``` +{ arity -> + String.join(', ', typeParamsList(arity).stream().map{a -> "final " + a}.collect()) +} +``` +computeArgs = ``` +{ arity -> + String.join(', ', genericsNamesList(arity)) +} +``` +acceptArgs = ``` +{ arity -> + computeArgs(arity) +} +``` + diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTest.list similarity index 95% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTest.list index 78f0fb877..c09377f30 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (0..maxArity).collect() inputDoubles = ``` diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTest.vm similarity index 98% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTest.vm index e64ba305b..4e4205d58 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTest.vm @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.core.builder; +package org.scijava.ops.engine; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -41,7 +41,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; /** * Tests {@link OpBuilder}. For each arity, we test the following matches and diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTestOps.list similarity index 100% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTestOps.list diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTestOps.vm similarity index 95% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTestOps.vm index 9be64ce4b..7cd485890 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/core/builder/OpBuilderTestOps.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpBuilderTestOps.vm @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops.core.builder; +package org.scijava.ops.engine; import java.util.function.BiFunction; import java.util.function.Function; @@ -36,8 +36,10 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTest.list similarity index 96% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTest.list index b76b0a30d..a5df58eb5 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (0..maxArity).collect() inputDoubles = ``` diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTest.vm similarity index 95% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTest.vm index cbfb18ca0..7210e6a7f 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTest.vm @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -42,10 +42,9 @@ import org.junit.Test; import org.scijava.function.Computers; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; import org.scijava.types.Nil; /** @@ -88,17 +87,12 @@ public class OpMethodTest extends AbstractTestEnvironment { // @OpMethod(names = "test.parseInteger", type = Function.class) // // Refers to the input parameter of the function that's returned by this // // factory method. -// @Parameter(key = "numericString") // // Refers to the output parameter of the function. -// @Parameter(key = "parsedInteger") // public static Integer createParseIntegerOp(String in) { // return Integer.parseInt(in); // } // // @OpMethod(names = "test.multiplyNumericStrings", type = BiFunction.class) -// @Parameter(key = "numericString1") -// @Parameter(key = "numericString2") -// @Parameter(key = "multipliedNumericStrings") // public static Integer createMultiplyNumericStringsOp(final String in1, // final String in2, @OpDependency( // name = "test.parseInteger") Function parseIntegerOp) diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTestOps.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTestOps.list similarity index 93% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTestOps.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTestOps.list index 57ee2eb1f..2b9e9fb67 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTestOps.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTestOps.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list argsList = ``` {arity -> diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTestOps.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTestOps.vm similarity index 96% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTestOps.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTestOps.vm index 89b21ac81..695402590 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/OpMethodTestOps.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/OpMethodTestOps.vm @@ -27,7 +27,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.engine; import java.util.List; import java.util.function.BiFunction; @@ -37,17 +37,17 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpDependency; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpMethod; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; @Plugin(type = OpCollection.class) public class OpMethodTestOps { // -- Functions -- // @OpMethod(names = "test.multiplyNumericStrings", type = Producer.class) - @Parameter(key = "multipliedNumericStrings") public static Integer multiplyNumericStringsProducer() { return Integer.valueOf(1); } diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.list similarity index 88% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.list index 3781b2349..b3b578b6d 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToFunctionIterablesTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.vm similarity index 94% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.vm index cc834c67f..55c7f14a8 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/ComputerToFunctionIterablesTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/ComputerToFunctionIterablesTest.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import static org.junit.Assert.assertArrayEquals; @@ -41,8 +41,8 @@ import java.util.List; import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.list similarity index 78% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.list index d32317319..c8c042121 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToComputerIterablesTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.vm similarity index 93% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.vm index f0ef64fe6..cb11bae52 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/complexLift/FunctionToComputerIterablesTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/complexLift/FunctionToComputerIterablesTest.vm @@ -32,15 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.complexLift; +package org.scijava.ops.engine.adapt.complexLift; import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; public class FunctionToComputerIterablesTest extends AbstractTestEnvironment { #foreach($arity in [1..$maxArity]) diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.list similarity index 78% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.list index b8cee8f8e..156ed5bae 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToFunctionAdaptTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.vm similarity index 93% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.vm index 014aa1284..cd37b20b5 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTest.vm @@ -32,13 +32,13 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; public class ComputerToFunctionAdaptTest extends AbstractTestEnvironment { #foreach($arity in [1..$maxArity]) diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.list similarity index 84% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.list index 002b9cd8b..10905acf2 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToFunctionAdaptTestOps.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.vm similarity index 90% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.vm index 8270bdcd1..45c91561e 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/ComputerToFunctionAdaptTestOps.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/ComputerToFunctionAdaptTestOps.vm @@ -32,12 +32,13 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import org.scijava.function.Computers; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) @@ -45,9 +46,6 @@ public class ComputerToFunctionAdaptTestOps { #foreach($arity in [1..$maxArity]) @OpField(names = "test.CtF") -#foreach($p in $genericsNamesList.call($arity)) - @Parameter(key = "$p") -#end public static final $computerArity.call($arity)$doubleGenerics.call($arity) toFunc${arity} = ($computeArgs.call($arity)) -> { for(int i = 0; i < in#if($arity == 1)#{else}1#end.length; i++) { out[i] = 0.0; diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.list similarity index 78% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.list index 05f7f7cc4..20f2cc2e9 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToComputerAdaptTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.vm similarity index 93% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.vm index 0f0917d04..cc70f4b2e 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTest.vm @@ -32,12 +32,12 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import org.junit.Assert; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; public class FunctionToComputerAdaptTest extends AbstractTestEnvironment { #foreach($arity in [1..$maxArity]) diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.list similarity index 84% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.list index 962a3d11e..91bbec8e0 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToComputerAdaptTestOps.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.vm similarity index 90% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.vm index 7822613cb..959e10115 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/FunctionToComputerAdaptTestOps.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/FunctionToComputerAdaptTestOps.vm @@ -32,15 +32,16 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import java.util.function.BiFunction; import java.util.function.Function; import org.scijava.function.Functions; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.param.Parameter; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; @Plugin(type = OpCollection.class) @@ -48,9 +49,6 @@ public class FunctionToComputerAdaptTestOps { #foreach($arity in [1..$maxArity]) @OpField(names = "test.FtC") -#foreach($p in $genericsNamesList.call($arity)) - @Parameter(key = "$p") -#end public static final $functionArity.call($arity)$doubleGenerics.call($arity) toComp${arity} = ($applyArgs.call($arity)) -> { double[] out = new double[in#if($arity == 1)#{else}1#end.length]; for(int i = 0; i < in#if($arity == 1)#{else}1#end.length; i++) { diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.list similarity index 86% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.list index dbd9e56a1..1d4d27d1b 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [InplaceToFunctionAdaptTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.vm similarity index 94% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.vm index d86ab3e9a..2f79b7674 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/functional/InplaceToFunctionAdaptTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/functional/InplaceToFunctionAdaptTest.vm @@ -32,15 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.functional; +package org.scijava.ops.engine.adapt.functional; import static org.junit.Assert.assertTrue; import java.util.Arrays; import org.junit.Test; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; public class InplaceToFunctionAdaptTest extends AbstractTestEnvironment { diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.list similarity index 93% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.list index b964e3b7f..b53d60263 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToArraysTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.vm similarity index 91% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.vm index bc4d2e290..181e36396 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToArraysTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToArraysTest.vm @@ -32,14 +32,14 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.Assert; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; import org.scijava.plugin.Plugin; /** @@ -86,7 +86,7 @@ public class ComputerToArraysTest extends AbstractTestEnvironment { ops.env().op("test.liftArrayC").input($inputArgs.call($arity)).output(output).compute(); for(int i = 0; i < output.length; i++) { - Assertions.assertEquals($arity * i, output[i].getNumber()); + Assert.assertEquals($arity * i, output[i].getNumber()); } } diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.list similarity index 88% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.list index 87b6590a9..9ecb10052 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [ComputerToIterablesTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.vm similarity index 94% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.vm index acf32683f..2fbf26e07 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/ComputerToIterablesTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/ComputerToIterablesTest.vm @@ -32,7 +32,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import static org.junit.Assert.assertArrayEquals; @@ -41,8 +41,8 @@ import java.util.List; import org.junit.Test; import org.scijava.function.Computers; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; /** * Tests the adaptation of {@link Computers} running on a type into diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.list similarity index 93% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.list index 1fcf927cb..30d2a6433 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToArraysTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.vm similarity index 89% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.vm index e1ea8eec7..3086725f2 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToArraysTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToArraysTest.vm @@ -32,17 +32,19 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.function.BiFunction; import java.util.function.Function; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.Assert; import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; import org.scijava.types.Nil; @@ -87,7 +89,7 @@ public class FunctionToArraysTest extends AbstractTestEnvironment { {}).apply(); for (int i = 0; i < output.length; i++) { - Assertions.assertEquals($arity * i, output[i].getNumber()); + Assert.assertEquals($arity * i, output[i].getNumber()); } } diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.list similarity index 88% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.list index a9fadf984..e15734e74 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [FunctionToIterablesTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.vm similarity index 94% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.vm index 6d7599b89..4aef7a132 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/FunctionToIterablesTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/FunctionToIterablesTest.vm @@ -32,15 +32,15 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import java.util.Arrays; import java.util.List; import org.junit.Test; import org.scijava.function.Functions; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.core.builder.OpBuilder; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.Nil; /** diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.list similarity index 95% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.list index 4c247d5d9..965c980de 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (1..maxArity).collect() [InplaceToArraysTest.java] diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.vm similarity index 92% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.vm index 2235a214a..f96c0b4df 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/adapt/lift/InplaceToArraysTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/adapt/lift/InplaceToArraysTest.vm @@ -32,14 +32,14 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.adapt.lift; +package org.scijava.ops.engine.adapt.lift; import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.Assert; import org.scijava.function.Inplaces; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.spi.OpField; +import org.scijava.ops.spi.OpCollection; import org.scijava.plugin.Plugin; /** @@ -97,7 +97,7 @@ public class InplaceToArraysTest extends AbstractTestEnvironment { .${mutateMethod.call($arity, $a)}(); for (int i = 0; i < input.length; i++) { - Assertions.assertEquals($arity * i, io[i].getNumber()); + Assert.assertEquals($arity * i, io[i].getNumber()); } } #end diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/matcher/OpWrappersTest.list b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.list similarity index 78% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/matcher/OpWrappersTest.list rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.list index f7e22fb47..a4c18976a 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/matcher/OpWrappersTest.list +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.list @@ -1,4 +1,4 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list +.include templates/main/java/org/scijava/ops/engine/util/Globals.list arities = (0..maxArity).collect() [OpWrappersTest.java] @@ -20,7 +20,7 @@ nilDoubleList = ``` ``` matchName = ``` { arity, num -> - arity == 1 ? "match" : - "match${num}" + arity == 1 ? "matchInplace" : + "matchInplace${num}" } ``` diff --git a/scijava/scijava-ops/templates/test/java/org/scijava/ops/matcher/OpWrappersTest.vm b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.vm similarity index 76% rename from scijava/scijava-ops/templates/test/java/org/scijava/ops/matcher/OpWrappersTest.vm rename to scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.vm index 7c3dc856e..3eb683757 100644 --- a/scijava/scijava-ops/templates/test/java/org/scijava/ops/matcher/OpWrappersTest.vm +++ b/scijava/scijava-ops-engine/templates/test/java/org/scijava/ops/engine/matcher/OpWrappersTest.vm @@ -3,7 +3,7 @@ * corresponding template in templates/ and rerun bin/generate.groovy. */ -package org.scijava.ops.matcher; +package org.scijava.ops.engine.matcher; import static org.junit.Assert.assertTrue; @@ -15,10 +15,8 @@ import org.scijava.function.Computers; import org.scijava.function.Functions; import org.scijava.function.Inplaces; import org.scijava.function.Producer; -import org.scijava.ops.AbstractTestEnvironment; -import org.scijava.ops.util.ComputerUtils; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.ops.util.InplaceUtils; +import org.scijava.ops.engine.AbstractTestEnvironment; +import org.scijava.ops.api.OpBuilder; import org.scijava.types.GenericTyped; import org.scijava.types.Nil; @@ -33,7 +31,7 @@ public class OpWrappersTest extends AbstractTestEnvironment { @Test public void testWrapProducer() { Nil nilDouble = Nil.of(Double.class); - Producer op = FunctionUtils.match(ops.env(), "test.addDoubles", nilDouble); + Producer op = OpBuilder.matchFunction(ops.env(), "test.addDoubles", nilDouble); assertTrue(op instanceof GenericTyped); } @@ -42,7 +40,7 @@ public class OpWrappersTest extends AbstractTestEnvironment { public void testWrapFunction$arity() { Nil nilDouble = Nil.of(Double.class); $functionArity.call($arity)$doubleTypeParams.call($arity) op = // - FunctionUtils.match(ops.env(), "test.addDoubles", // + OpBuilder.matchFunction(ops.env(), "test.addDoubles", // $nilDoubleList.call($arity)); assertTrue(op instanceof GenericTyped); } @@ -53,7 +51,7 @@ public class OpWrappersTest extends AbstractTestEnvironment { public void testWrapComputer$arity() { Nil nilDouble = Nil.of(double[].class); $computerArity.call($arity)$doubleArrayTypeParams.call($arity) op = // - ComputerUtils.match(ops.env(), "test.addArrays", $nilDoubleList.call($arity)); + OpBuilder.matchComputer(ops.env(), "test.addArrays", $nilDoubleList.call($arity)); assertTrue(op instanceof GenericTyped); } @@ -65,7 +63,7 @@ public class OpWrappersTest extends AbstractTestEnvironment { public void testWrapInplace$inplaceSuffix.call($arity, $a)() { Nil nilDouble = Nil.of(double[].class); $inplaceType.call($arity, $a)$doubleArrayTypeParams.call($t) op = // - InplaceUtils.$matchName.call($arity, $a)(ops.env(), "test.mulArrays${arity}_${a}", $nilDoubleList.call($t)); + OpBuilder.$matchName.call($arity, $a)(ops.env(), "test.mulArrays${arity}_${a}", $nilDoubleList.call($t)); assertTrue(op instanceof GenericTyped); } diff --git a/scijava/scijava-ops-spi/.gitignore b/scijava/scijava-ops-spi/.gitignore new file mode 100644 index 000000000..00d2ab71d --- /dev/null +++ b/scijava/scijava-ops-spi/.gitignore @@ -0,0 +1,2 @@ +/.apt_generated/ +/.apt_generated_tests/ diff --git a/scijava/scijava-ops-spi/LICENSE.txt b/scijava/scijava-ops-spi/LICENSE.txt new file mode 100644 index 000000000..ef17d5e7a --- /dev/null +++ b/scijava/scijava-ops-spi/LICENSE.txt @@ -0,0 +1,24 @@ +Copyright (c) 2016 - 2019, SciJava Ops developers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/scijava/scijava-ops-spi/README.md b/scijava/scijava-ops-spi/README.md new file mode 100644 index 000000000..90608641c --- /dev/null +++ b/scijava/scijava-ops-spi/README.md @@ -0,0 +1,12 @@ +The SciJava Ops projects offers a framework for typed operations, or Ops. + +Each op implements a particular functional interface, possessing typed inputs +or outputs. The system provides the ability to request ops matching particular +constraints, including implementing interface, input types and output types. + +It is like Java's method overloading, but more powerful, and more extensible. + +More documentation coming later. + +See also [ImageJ Ops](https://github.com/imagej/imagej-ops), a collection of +ops focused on scientific image processing and analysis. diff --git a/scijava/scijava-ops-spi/bin/generate.groovy b/scijava/scijava-ops-spi/bin/generate.groovy new file mode 100644 index 000000000..3e26050d9 --- /dev/null +++ b/scijava/scijava-ops-spi/bin/generate.groovy @@ -0,0 +1,238 @@ +#!/usr/bin/env groovy + +/* + * #%L + * SciJava Operations: a framework for reusable algorithms. + * %% + * Copyright (C) 2018 SciJava developers. + * %% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * #L% + */ + +debug = System.getenv('DEBUG') +def debug(msg) { + if (debug) System.err.println("[DEBUG] $msg") +} + +@Grab('org.apache.velocity:velocity:1.7') +import org.apache.velocity.app.VelocityEngine + +// TODO: Get path to Groovy script and make these dirs relative to that. +templateDirectory = 'templates' +outputDirectory = 'src' + +knownFiles = new java.util.HashSet(); + +/* Gets the last modified timestamp for the given file. */ +def timestamp(dir, file) { + if (file == null) return Long.MAX_VALUE; + file = new java.io.File(dir, file); + knownFiles.add(file); + return file.lastModified(); +} + +/* Processes a template using Apache Velocity. */ +def processTemplate(engine, context, templateFile, outFilename) { + debug("processTemplate('$engine', '$context', '$templateFile', '$outFilename')") + + if (outFilename == null) return; // nothing to do + + // create output directory if it does not already exist + outFile = new java.io.File(outputDirectory, outFilename); + knownFiles.add(outFile); + if (outFile.getParentFile() != null) outFile.getParentFile().mkdirs(); + + // apply the template and write out the result + t = engine.getTemplate(templateFile); + writer = new StringWriter(); + t.merge(context, writer); + out = new PrintWriter(outFile, "UTF-8"); + out.print(writer.toString()); + out.close(); +} + +/* Evaluates a string using Groovy. */ +def parseValue(sh, translationsFile, key, expression) { + try { + result = sh.evaluate(expression) + sh.setVariable(key, result) + return result + } + catch (groovy.lang.GroovyRuntimeException e) { + print("[WARNING] $translationsFile: " + + "key '$key' has unparseable value: " + e.getMessage()); + } +} + +/* Reads a translations File */ +def readTranslation(engine, globalContext, reader, templateSubdirectory, templateFile, translationsFile, isInclude){ + sh = new groovy.lang.GroovyShell(); + for (;;) { + // read the line + line = reader.readLine(); + + if (line == null) break; + // check if the line starts a new section + if (line.startsWith("[") && line.endsWith("]")) { + // if we are parsing a .include file, return when we hit any sections + if(isInclude){ + println("[WARNING] $translationsFile: Section definition in .include file. Ending processing of $translationsFile"); + return context; + } + // write out the previous file + processTemplate(engine, context, templateFile, outputFilename); + + // start a new file + outputFilename = line.substring(1, line.length() - 1); + if (!templateDirectory.equals(templateSubdirectory)) { + subPath = templateSubdirectory.substring(templateDirectory.length() + 1); + outputFilename = "$subPath/$outputFilename"; + } + context = new org.apache.velocity.VelocityContext(globalContext); + continue; + } + + // ignore blank lines + trimmedLine = line.trim(); + if (trimmedLine.isEmpty()) continue; + + // ignore comments + if (trimmedLine.startsWith("#")) continue; + + // include any global files + if (trimmedLine.startsWith(".include")){ + includeFile = line.substring(9); + if(includeFile.startsWith("templates")){ + includeSubdirectory = includeFile.substring(0, includeFile.lastIndexOf("/")) + includeFile = includeFile.substring(includeFile.lastIndexOf("/")) + } + else{ + includeSubdirectory = templateSubdirectory + } + globalReader = new java.io.BufferedReader(new java.io.FileReader("$includeSubdirectory/$includeFile")); + encapsulatedContext = new org.apache.velocity.VelocityContext(context) + context = readTranslation(engine, encapsulatedContext, globalReader, templateSubdirectory, templateFile, includeFile, true) + continue; + } + + if (!line.contains('=')) { + print("[WARNING] $translationsFile: Ignoring spurious line: $line"); + continue; + } + + int idx = line.indexOf('='); + key = line.substring(0, idx).trim(); + value = line.substring(idx + 1); + + if (value.trim().equals('```')) { + // multi-line value + builder = new StringBuilder(); + for (;;) { + line = reader.readLine(); + if (line == null) { + throw new RuntimeException("Unfinished value: " + builder.toString()); + } + if (line.equals('```')) { + break; + } + if (builder.length() > 0) { + builder.append("\n"); + } + builder.append(line); + } + value = builder.toString(); + } + + context.put(key, parseValue(sh, translationsFile, key, value)); + } + + return context; +} + +/* + * Translates a template into many files in the outputDirectory, + * given a translations file in INI style; e.g.: + * + * [filename1] + * variable1 = value1 + * variable2 = value2 + * ... + * [filename2] + * variable1 = value3 + * variable2 = value4 + * ... + */ +def translate(templateSubdirectory, templateFile, translationsFile) { + debug("translate('$templateSubdirectory', '$templateFile', '$translationsFile')") + + // initialize the Velocity engine + engine = new org.apache.velocity.app.VelocityEngine(); + p = new java.util.Properties(); + // fail if template uses an invalid expression; e.g., an undefined variable + p.setProperty("runtime.references.strict", "true"); + // tell Velocity where the templates are located + p.setProperty("file.resource.loader.path", "$templateSubdirectory"); + // tell Velocity to log to stderr rather than to a velocity.log file + p.setProperty(org.apache.velocity.runtime.RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, + "org.apache.velocity.runtime.log.SystemLogChute"); + engine.init(p); + + // read translation lines + outputFilename = null; + context = globalContext = new org.apache.velocity.VelocityContext(); + reader = new java.io.BufferedReader(new java.io.FileReader("$templateSubdirectory/$translationsFile")); + + readTranslation(engine, context, reader, templateSubdirectory, templateFile, translationsFile, false); + + reader.close(); + + // process the template + processTemplate(engine, context, templateFile, outputFilename); +} + +/* Recursively translates all templates in the given directory. */ +def translateDirectory(templateSubdirectory) { + debug("translateDirectory('$templateSubdirectory')") + + for (file in new java.io.File(templateSubdirectory).listFiles()) { + if (file.isDirectory()) { + // process subdirectories recursively + translateDirectory(file.getPath()); + } + else { + // process Velocity template files only + name = file.getName(); + if (!name.endsWith('.vm')) continue; + prefix = name.substring(0, name.lastIndexOf('.')); + translate(templateSubdirectory, name, prefix + '.list'); + } + } +} + +try { + translateDirectory(templateDirectory); +} +catch (Throwable t) { + t.printStackTrace(System.err); + throw t; +} diff --git a/scijava/scijava-ops-spi/pom.xml b/scijava/scijava-ops-spi/pom.xml new file mode 100644 index 000000000..999e8478b --- /dev/null +++ b/scijava/scijava-ops-spi/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + + + org.scijava + scijava-incubator + 0-SNAPSHOT + ../.. + + + scijava-ops-spi + + SciJava Ops SPI + SciJava Operations SPI: service descriptors used by the SciJava Operations framework. + https://github.com/scijava/scijava-ops-spi + 2021 + + SciJava + https://scijava.org/ + + + + Simplified BSD License + repo + + + + + + ctrueden + Curtis Rueden + https://imagej.net/User:Rueden + + founder + lead + reviewer + support + maintainer + + + + gselzer + Gabriel Selzer + + founder + developer + debugger + reviewer + support + + + + + + Christian Dietz + https://imagej.net/User:Dietzc + + founder + + + dietzc + + + + David Kolb + + founder + + + Treiblesschorle + + + + + + + Image.sc Forum + https://forum.image.sc/tags/scijava-ops-spi + + + + + scm:git:git://github.com/scijava/incubator + scm:git:git@github.com:scijava/incubator + HEAD + https://github.com/scijava/incubator + + + GitHub Issues + https://github.com/scijava/scijava-ops-spi/issues + + + Travis CI + https://travis-ci.com/scijava/incubator + + + + org.scijava.ops.spi.Main + org.scijava.ops.spi + + bsd_2 + SciJava developers. + + ${scijava.allowedDuplicateClasses},com.github.therapi.runtimejavadoc.repack.com.eclipsesource.json.* + ${scijava-ops-spi.allowedDuplicateClasses} + + + + + org.scijava + scijava-common + + + + + diff --git a/scijava/scijava-ops-spi/src/main/java/module-info.java b/scijava/scijava-ops-spi/src/main/java/module-info.java new file mode 100644 index 000000000..bca1c6d6f --- /dev/null +++ b/scijava/scijava-ops-spi/src/main/java/module-info.java @@ -0,0 +1,7 @@ +module org.scijava.ops.spi { + + exports org.scijava.ops.spi; + + requires org.scijava; + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/Op.java b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/Op.java similarity index 78% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/core/Op.java rename to scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/Op.java index c6105ef4c..8cca2cdf3 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/Op.java +++ b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/Op.java @@ -1,4 +1,4 @@ -package org.scijava.ops.core; +package org.scijava.ops.spi; import org.scijava.plugin.SciJavaPlugin; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OpCollection.java b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpCollection.java similarity index 86% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/core/OpCollection.java rename to scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpCollection.java index 1413c3816..5389ff057 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OpCollection.java +++ b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpCollection.java @@ -1,4 +1,4 @@ -package org.scijava.ops.core; +package org.scijava.ops.spi; import org.scijava.plugin.SciJavaPlugin; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependency.java b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpDependency.java similarity index 88% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependency.java rename to scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpDependency.java index 0a20fb24a..f08a23ae6 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependency.java +++ b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpDependency.java @@ -1,7 +1,6 @@ -package org.scijava.ops; +package org.scijava.ops.spi; import java.lang.annotation.ElementType; -import java.lang.annotation.Repeatable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpField.java b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpField.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpField.java rename to scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpField.java index 2c46e9970..fc7f824c2 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpField.java +++ b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpField.java @@ -1,4 +1,4 @@ -package org.scijava.ops; +package org.scijava.ops.spi; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -6,7 +6,6 @@ import java.lang.annotation.Target; import org.scijava.Priority; -import org.scijava.ops.core.OpCollection; /** Annotates an op declared as a field in an {@link OpCollection}. */ @Retention(RetentionPolicy.RUNTIME) diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpMethod.java b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpMethod.java similarity index 95% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/OpMethod.java rename to scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpMethod.java index 75fc7eb86..dc0d08d70 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpMethod.java +++ b/scijava/scijava-ops-spi/src/main/java/org/scijava/ops/spi/OpMethod.java @@ -28,7 +28,7 @@ * #L% */ -package org.scijava.ops; +package org.scijava.ops.spi; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/scijava/scijava-ops/src/main/java/module-info.java b/scijava/scijava-ops/src/main/java/module-info.java deleted file mode 100644 index 1fbb401dc..000000000 --- a/scijava/scijava-ops/src/main/java/module-info.java +++ /dev/null @@ -1,32 +0,0 @@ -module org.scijava.ops { - - //TODO: rearrange packages to export only needed classes - exports org.scijava.ops; //contains OpDependency interface - exports org.scijava.ops.core; // contains OpCollection, Op interfaces - exports org.scijava.ops.core.builder; // contains OpBuilder classes - exports org.scijava.ops.hints; - exports org.scijava.ops.matcher; - exports org.scijava.ops.provenance; - exports org.scijava.ops.simplify; - exports org.scijava.ops.conversionLoss; - // TODO: move OpWrapper to its own package (org.scijava.ops.wrap??) - exports org.scijava.ops.util; // contains OpWrapper interface - exports org.scijava.struct; - exports org.scijava.param; - - // -- Open plugins to scijava-common - opens org.scijava.ops to org.scijava; - opens org.scijava.ops.impl to org.scijava; - opens org.scijava.ops.provenance to org.scijava; - opens org.scijava.ops.provenance.impl to org.scijava; - - // FIXME: This is a file name and is thus unstable - requires geantyref; - - requires java.desktop; - - requires org.scijava; - requires org.scijava.types; - requires javassist; - requires org.scijava.function; -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/NeededOp.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/NeededOp.java deleted file mode 100644 index fad389a75..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/NeededOp.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.scijava.ops; - -public @interface NeededOp { - - String name(); -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependencies.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependencies.java deleted file mode 100644 index fc2fb880e..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/OpDependencies.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * #%L - * ImageJ software for multidimensional image processing and analysis. - * %% - * Copyright (C) 2014 - 2016 Board of Regents of the University of - * Wisconsin-Madison and University of Konstanz. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.ops; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface OpDependencies { - - OpDependency[] value(); - -} \ No newline at end of file diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/IdentityLossReporter.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/IdentityLossReporter.java deleted file mode 100644 index 787145415..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/IdentityLossReporter.java +++ /dev/null @@ -1,30 +0,0 @@ - -package org.scijava.ops.conversionLoss; - -import org.scijava.ops.core.Op; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.OpHints; -import org.scijava.param.Parameter; -import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; -import org.scijava.types.Nil; - -/** - * A {@link LossReporter} used when a type is not simplified. - * - * @author Gabriel Selzer - * @param - the type that is not being simplified. - */ -@OpHints(hints = {Simplification.FORBIDDEN}) -@Plugin(type = Op.class, name = "lossReporter") -@Parameter(key = "fromType") -@Parameter(key = "toType") -@Parameter(key = "maximumLoss") -public class IdentityLossReporter implements LossReporter { - - @Override - public Double apply(Nil t, Nil u) { - return 0.; - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/PrimitiveArrayLossReporters.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/PrimitiveArrayLossReporters.java deleted file mode 100644 index 82dc6b4c9..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/conversionLoss/PrimitiveArrayLossReporters.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.scijava.ops.conversionLoss; - -import org.scijava.ops.OpField; -import org.scijava.ops.core.OpCollection; -import org.scijava.ops.hints.OpHints; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.plugin.Plugin; - -@Plugin(type = OpCollection.class) -public class PrimitiveArrayLossReporters { - -// @Unsimplifiable -// @Plugin(type = Op.class) -// static class ByteArrayIntArrayReporter implements LosslessReporter {} - - @OpHints(hints = {Simplification.FORBIDDEN}) - @OpField(names = "lossReporter") - public final LossReporter bArrIArr = (from, to) -> 0.; - - @OpHints(hints = {Simplification.FORBIDDEN}) - @OpField(names = "lossReporter") - public final LossReporter dArrIArr = (from, to) -> 0.; - -} - -//@Plugin(type = Op.class, name = "lossReporter") -//@Parameter(key = "fromNil") -//@Parameter(key = "toNil") -//@Parameter(key = "loss") -//public static class ArrayLossReporter implements LossReporter{ -// -// @OpDependency(name = "lossReporter") -// private LossReporter elementReporter; -// -// @Override -// public Double apply(Nil from, Nil to) { -// Nil fromElement = Nil.of(from.getType()) -// } -// -//} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OneToOneCommand.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OneToOneCommand.java deleted file mode 100644 index 555a412cf..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OneToOneCommand.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.scijava.ops.core; - -import java.util.function.Supplier; - -import org.scijava.command.Command; -import org.scijava.param.Parameter; -import org.scijava.struct.ItemIO; - -public abstract class OneToOneCommand implements Command, Supplier { - - @Parameter - protected I input; - - @Parameter(itemIO = ItemIO.OUTPUT) - protected O output; - - @Override - public O get() { - return output; - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OpExecutionException.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OpExecutionException.java deleted file mode 100644 index 4bf163832..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/OpExecutionException.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.scijava.ops.core; - -public class OpExecutionException extends RuntimeException{ - - public OpExecutionException(Exception cause) { - super(cause); - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/builder/OpBuilder.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/core/builder/OpBuilder.java deleted file mode 100644 index 5015fedfc..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/core/builder/OpBuilder.java +++ /dev/null @@ -1,8984 +0,0 @@ -/* - * #%L - * SciJava Operations: a framework for reusable algorithms. - * %% - * Copyright (C) 2016 - 2019 SciJava Ops developers. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -/* -* This is autogenerated source code -- DO NOT EDIT. Instead, edit the -* corresponding template in templates/ and rerun bin/generate.groovy. -*/ - -package org.scijava.ops.core.builder; - -import java.lang.reflect.Type; -import java.util.function.BiFunction; -import java.util.function.Function; - -import org.scijava.function.Computers; -import org.scijava.function.Functions; -import org.scijava.function.Inplaces; -import org.scijava.function.Producer; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.ops.util.ComputerUtils; -import org.scijava.ops.util.FunctionUtils; -import org.scijava.ops.util.InplaceUtils; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Convenience class for looking up and/or executing ops using a builder - * pattern. - *

- * TODO: Examples - *

- * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public class OpBuilder { - - private final OpEnvironment env; - private final String opName; - - public OpBuilder(final OpEnvironment env, final String opName) { - this.env = env; - this.opName = opName; - } - - /** Specifies the op accepts no inputs—i.e., a nullary op. */ - public Arity0_OU input() { - return new Arity0_OU(); - } - - /** Specifies 1 input by value. */ - public Arity1_IV_OU input(final I1 in1) - { - return new Arity1_IV_OU<>(in1); - } - - /** Specifies 1 input by raw type. */ - public Arity1_IT_OU inType(final Class in1Class) - { - return inType(Nil.of(in1Class)); - } - - /** Specifies 1 input by generic type. */ - public Arity1_IT_OU inType(final Nil in1Type) - { - return new Arity1_IT_OU<>(in1Type); - } - - /** Specifies 2 input by value. */ - public Arity2_IV_OU input(final I1 in1, final I2 in2) - { - return new Arity2_IV_OU<>(in1, in2); - } - - /** Specifies 2 input by raw type. */ - public Arity2_IT_OU inType(final Class in1Class, final Class in2Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class)); - } - - /** Specifies 2 input by generic type. */ - public Arity2_IT_OU inType(final Nil in1Type, final Nil in2Type) - { - return new Arity2_IT_OU<>(in1Type, in2Type); - } - - /** Specifies 3 input by value. */ - public Arity3_IV_OU input(final I1 in1, final I2 in2, final I3 in3) - { - return new Arity3_IV_OU<>(in1, in2, in3); - } - - /** Specifies 3 input by raw type. */ - public Arity3_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class)); - } - - /** Specifies 3 input by generic type. */ - public Arity3_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type) - { - return new Arity3_IT_OU<>(in1Type, in2Type, in3Type); - } - - /** Specifies 4 input by value. */ - public Arity4_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4) - { - return new Arity4_IV_OU<>(in1, in2, in3, in4); - } - - /** Specifies 4 input by raw type. */ - public Arity4_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class)); - } - - /** Specifies 4 input by generic type. */ - public Arity4_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type) - { - return new Arity4_IT_OU<>(in1Type, in2Type, in3Type, in4Type); - } - - /** Specifies 5 input by value. */ - public Arity5_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5) - { - return new Arity5_IV_OU<>(in1, in2, in3, in4, in5); - } - - /** Specifies 5 input by raw type. */ - public Arity5_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class)); - } - - /** Specifies 5 input by generic type. */ - public Arity5_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type) - { - return new Arity5_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type); - } - - /** Specifies 6 input by value. */ - public Arity6_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6) - { - return new Arity6_IV_OU<>(in1, in2, in3, in4, in5, in6); - } - - /** Specifies 6 input by raw type. */ - public Arity6_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class)); - } - - /** Specifies 6 input by generic type. */ - public Arity6_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) - { - return new Arity6_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - /** Specifies 7 input by value. */ - public Arity7_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7) - { - return new Arity7_IV_OU<>(in1, in2, in3, in4, in5, in6, in7); - } - - /** Specifies 7 input by raw type. */ - public Arity7_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class)); - } - - /** Specifies 7 input by generic type. */ - public Arity7_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) - { - return new Arity7_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - /** Specifies 8 input by value. */ - public Arity8_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8) - { - return new Arity8_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8); - } - - /** Specifies 8 input by raw type. */ - public Arity8_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class)); - } - - /** Specifies 8 input by generic type. */ - public Arity8_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - return new Arity8_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - /** Specifies 9 input by value. */ - public Arity9_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9) - { - return new Arity9_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - /** Specifies 9 input by raw type. */ - public Arity9_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class)); - } - - /** Specifies 9 input by generic type. */ - public Arity9_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return new Arity9_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - /** Specifies 10 input by value. */ - public Arity10_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10) - { - return new Arity10_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - /** Specifies 10 input by raw type. */ - public Arity10_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class)); - } - - /** Specifies 10 input by generic type. */ - public Arity10_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return new Arity10_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - /** Specifies 11 input by value. */ - public Arity11_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11) - { - return new Arity11_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - /** Specifies 11 input by raw type. */ - public Arity11_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class)); - } - - /** Specifies 11 input by generic type. */ - public Arity11_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return new Arity11_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - /** Specifies 12 input by value. */ - public Arity12_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12) - { - return new Arity12_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - /** Specifies 12 input by raw type. */ - public Arity12_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class)); - } - - /** Specifies 12 input by generic type. */ - public Arity12_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return new Arity12_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - /** Specifies 13 input by value. */ - public Arity13_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13) - { - return new Arity13_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - /** Specifies 13 input by raw type. */ - public Arity13_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class)); - } - - /** Specifies 13 input by generic type. */ - public Arity13_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return new Arity13_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - /** Specifies 14 input by value. */ - public Arity14_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14) - { - return new Arity14_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - /** Specifies 14 input by raw type. */ - public Arity14_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class, final Class in14Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class), Nil.of(in14Class)); - } - - /** Specifies 14 input by generic type. */ - public Arity14_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return new Arity14_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - /** Specifies 15 input by value. */ - public Arity15_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15) - { - return new Arity15_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - /** Specifies 15 input by raw type. */ - public Arity15_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class, final Class in14Class, final Class in15Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class), Nil.of(in14Class), Nil.of(in15Class)); - } - - /** Specifies 15 input by generic type. */ - public Arity15_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return new Arity15_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - /** Specifies 16 input by value. */ - public Arity16_IV_OU input(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16) - { - return new Arity16_IV_OU<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - /** Specifies 16 input by raw type. */ - public Arity16_IT_OU inType(final Class in1Class, final Class in2Class, final Class in3Class, final Class in4Class, final Class in5Class, final Class in6Class, final Class in7Class, final Class in8Class, final Class in9Class, final Class in10Class, final Class in11Class, final Class in12Class, final Class in13Class, final Class in14Class, final Class in15Class, final Class in16Class) - { - return inType(Nil.of(in1Class), Nil.of(in2Class), Nil.of(in3Class), Nil.of(in4Class), Nil.of(in5Class), Nil.of(in6Class), Nil.of(in7Class), Nil.of(in8Class), Nil.of(in9Class), Nil.of(in10Class), Nil.of(in11Class), Nil.of(in12Class), Nil.of(in13Class), Nil.of(in14Class), Nil.of(in15Class), Nil.of(in16Class)); - } - - /** Specifies 16 input by generic type. */ - public Arity16_IT_OU inType(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return new Arity16_IT_OU<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - // -- Helper methods -- - - @SuppressWarnings({ "unchecked" }) - private Nil type(Object obj) { - // FIXME: This vacuous T and unsafe cast is wrong. - return (Nil) Nil.of(env.genericType(obj)); - } - - private void checkComputerRefs(Object... objects) { - checkRefs(objects.length - 1, "Output", objects); - } - - private void checkInplaceRefs(int inplaceNo, Object... objects) { - checkRefs(inplaceNo - 1, "Mutable input " + inplaceNo, objects); - } - - private void checkRefs(int mutableIndex, String label, Object... objects) { - for (int i = 0; i < objects.length; i++) { - if (i == mutableIndex) continue; - if (objects[mutableIndex] == objects[i]) { - throw new IllegalArgumentException(label + - " cannot be same reference as input #" + (i + 1)); - } - } - } - - // @formatter:off - /* - * -- HELPER CLASSES -- - * - * For each arity, there are multiple conditions: - * * Input TYPES are given (IT) - * 1) The output is unspecified (OU): - * a) matchable: Function, Inplace - * b) runnable: none - * 2) The output type is given (OT): - * a) matchable: Function, Computer - * b) runnable: none - * - * * Input VALUES are given (IV) (N.B. this case applies for Arity0): - * 1) The output is unspecified (OU): - * a) matchable: Function, Inplace - * b) runnable: apply, mutate - * 2) The output type is given (OT): - * a) matchable: Function, Computer - * b) runnable: apply - * 3) The output value is given (OV): - * a) matchable: Computer - * b) runnable: compute - */ - // @formatter:on - - /** - * Builder with arity 0, output unspecified. - * - * @author Curtis Rueden - */ - public final class Arity0_OU { - - public Arity0_OV output(final O out) { - return new Arity0_OV<>(out); - } - - public Arity0_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity0_OT outType(final Nil outType) { - return new Arity0_OT<>(outType); - } - - public Producer producer() { - final Nil> specialType = new Nil<>() { - - @Override - public Type getType() { - return Types.parameterize(Producer.class, new Type[] { - Object.class }); - } - }; - return env.op(opName, specialType, new Nil[0], Nil.of( - Object.class)); - } - - public Producer producer(final Hints hints) { - final Nil> specialType = new Nil<>() { - - @Override - public Type getType() { - return Types.parameterize(Producer.class, new Type[] { - Object.class }); - } - }; - return env.op(opName, specialType, new Nil[0], Nil.of( - Object.class, hints)); - } - - public Object create() { - return producer().create(); - } - - public Object create(final Hints hints) { - return producer(hints).create(); - } - } - - /** - * Builder with arity 0, output type given. - * - * @author Curtis Rueden - * @param The type of the output. - */ - public final class Arity0_OT { - - private final Nil outType; - - public Arity0_OT(final Nil outType) { - this.outType = outType; - } - - public Producer producer() { - final Nil> specialType = new Nil<>() { - - @Override - public Type getType() { - return Types.parameterize(Producer.class, new Type[] { outType - .getType() }); - } - }; - return env.op(opName, specialType, new Nil[0], outType); - } - - public Producer producer(final Hints hints) { - final Nil> specialType = new Nil<>() { - - @Override - public Type getType() { - return Types.parameterize(Producer.class, new Type[] { outType - .getType() }); - } - }; - return env.op(opName, specialType, new Nil[0], outType, hints); - } - - public Computers.Arity0 computer() { - return ComputerUtils.match(env, opName, outType); - } - - public O create() { - return producer().create(); - } - - public Computers.Arity0 computer(Hints hints) { - return ComputerUtils.match(env, opName, outType, hints); - } - - public O create(Hints hints) { - return producer(hints).create(); - } - - } - - /** - * Builder with arity 0, output value given. - * - * @author Curtis Rueden - * @param The type of the output. - */ - public final class Arity0_OV { - - private final O out; - - public Arity0_OV(final O out) { - this.out = out; - } - - public Computers.Arity0 computer() { - return ComputerUtils.match(env, opName, type(out)); - } - - public void compute() { - computer().compute(out); - } - - public Computers.Arity0 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(out); - } - - } - - /** - * Builder with arity 1, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of the output. - */ - public final class Arity1_IT_OT { - - private final Nil in1Type; - private final Nil outType; - - public Arity1_IT_OT(final Nil in1Type, final Nil outType) - { - this.in1Type = in1Type; - this.outType = outType; - } - - public Function function() { - return FunctionUtils.match(env, opName, in1Type, outType); - } - - public Function function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, outType, hints); - } - - public Computers.Arity1 computer() { - return ComputerUtils.match(env, opName, in1Type, outType); - } - - public Computers.Arity1 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, outType, hints); - } - - public Inplaces.Arity1 inplace() { - return InplaceUtils.match(env, opName, in1Type); - } - - } - - /** - * Builder with arity 1, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - */ - public final class Arity1_IT_OU { - - private final Nil in1Type; - - public Arity1_IT_OU(final Nil in1Type) - { - this.in1Type = in1Type; - } - - public Arity1_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity1_IT_OT outType(final Nil outType) { - return new Arity1_IT_OT<>(in1Type, outType); - } - - public Function function() { - return FunctionUtils.match(env, opName, in1Type, Nil.of(Object.class)); - } - - public Function function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity1 inplace() { - return InplaceUtils.match(env, opName, in1Type); - } - - } - - /** - * Builder with arity 1, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of the output. - */ - public final class Arity1_IV_OT { - - private final I1 in1; - private final Nil outType; - - public Arity1_IV_OT(final I1 in1, final Nil outType) - { - this.in1 = in1; - this.outType = outType; - } - - public Function function() { - return FunctionUtils.match(env, opName, type(in1), outType); - } - - public Function function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), outType, hints); - } - - public Computers.Arity1 computer() { - return ComputerUtils.match(env, opName, type(in1), outType); - } - - public Computers.Arity1 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), outType, hints); - } - - public O apply() { - return function().apply(in1); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1); - } - } - - /** - * Builder with arity 1, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - */ - public final class Arity1_IV_OU { - - private final I1 in1; - - public Arity1_IV_OU(final I1 in1) - { - this.in1 = in1; - } - - public Arity1_IV_OV output(final O out) { - checkComputerRefs(in1, out); - return new Arity1_IV_OV<>(in1, out); - } - - public Arity1_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity1_IV_OT outType(final Nil outType) { - return new Arity1_IV_OT<>(in1, outType); - } - - public Function function() { - return FunctionUtils.match(env, opName, type(in1), Nil.of(Object.class)); - } - - public Function function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), Nil.of(Object.class), hints); - } - - public Inplaces.Arity1 inplace() { - checkInplaceRefs(1, in1); - return InplaceUtils.match(env, opName, type(in1)); - } - - public Inplaces.Arity1 inplace(final Hints hints) { - checkInplaceRefs(1, in1); - return InplaceUtils.match(env, opName, type(in1), hints); - } - - public Object apply() { - return function().apply(in1); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1); - } - - public void mutate() { - inplace().mutate(in1); - } - - public void mutate(final Hints hints) { - inplace(hints).mutate(in1); - } - - } - - /** - * Builder with arity 1, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - */ - public final class Arity1_IV_OV { - - private final I1 in1; - private final O out; - - public Arity1_IV_OV(final I1 in1, final O out) - { - this.in1 = in1; - this.out = out; - } - - public Computers.Arity1 computer() { - return ComputerUtils.match(env, opName, type(in1), type(out)); - } - - public void compute() { - computer().compute(in1, out); - } - - public Computers.Arity1 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, out); - } - - } - - /** - * Builder with arity 2, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of the output. - */ - public final class Arity2_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil outType; - - public Arity2_IT_OT(final Nil in1Type, final Nil in2Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.outType = outType; - } - - public BiFunction function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, outType); - } - - public BiFunction function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, outType, hints); - } - - public Computers.Arity2 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, outType); - } - - public Computers.Arity2 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, outType, hints); - } - - public Inplaces.Arity2_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type); - } - - public Inplaces.Arity2_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type); - } - - } - - /** - * Builder with arity 2, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - */ - public final class Arity2_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - - public Arity2_IT_OU(final Nil in1Type, final Nil in2Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - } - - public Arity2_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity2_IT_OT outType(final Nil outType) { - return new Arity2_IT_OT<>(in1Type, in2Type, outType); - } - - public BiFunction function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, Nil.of(Object.class)); - } - - public BiFunction function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity2_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type); - } - - public Inplaces.Arity2_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type); - } - - } - - /** - * Builder with arity 2, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of the output. - */ - public final class Arity2_IV_OT { - - private final I1 in1; - private final I2 in2; - private final Nil outType; - - public Arity2_IV_OT(final I1 in1, final I2 in2, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.outType = outType; - } - - public BiFunction function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), outType); - } - - public BiFunction function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), outType, hints); - } - - public Computers.Arity2 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), outType); - } - - public Computers.Arity2 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), outType, hints); - } - - public O apply() { - return function().apply(in1, in2); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2); - } - } - - /** - * Builder with arity 2, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - */ - public final class Arity2_IV_OU { - - private final I1 in1; - private final I2 in2; - - public Arity2_IV_OU(final I1 in1, final I2 in2) - { - this.in1 = in1; - this.in2 = in2; - } - - public Arity2_IV_OV output(final O out) { - checkComputerRefs(in1, in2, out); - return new Arity2_IV_OV<>(in1, in2, out); - } - - public Arity2_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity2_IV_OT outType(final Nil outType) { - return new Arity2_IV_OT<>(in1, in2, outType); - } - - public BiFunction function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), Nil.of(Object.class)); - } - - public BiFunction function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), Nil.of(Object.class), hints); - } - - public Inplaces.Arity2_1 inplace1() { - checkInplaceRefs(1, in1, in2); - return InplaceUtils.match1(env, opName, type(in1), type(in2)); - } - - public Inplaces.Arity2_2 inplace2() { - checkInplaceRefs(2, in1, in2); - return InplaceUtils.match2(env, opName, type(in1), type(in2)); - } - - public Inplaces.Arity2_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2); - return InplaceUtils.match1(env, opName, type(in1), type(in2), hints); - } - - public Inplaces.Arity2_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2); - return InplaceUtils.match2(env, opName, type(in1), type(in2), hints); - } - - public Object apply() { - return function().apply(in1, in2); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2); - } - - public void mutate1() { - inplace1().mutate(in1, in2); - } - - public void mutate2() { - inplace2().mutate(in1, in2); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2); - } - - } - - /** - * Builder with arity 2, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - */ - public final class Arity2_IV_OV { - - private final I1 in1; - private final I2 in2; - private final O out; - - public Arity2_IV_OV(final I1 in1, final I2 in2, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.out = out; - } - - public Computers.Arity2 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(out)); - } - - public void compute() { - computer().compute(in1, in2, out); - } - - public Computers.Arity2 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, out); - } - - } - - /** - * Builder with arity 3, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of the output. - */ - public final class Arity3_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil outType; - - public Arity3_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.outType = outType; - } - - public Functions.Arity3 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, outType); - } - - public Functions.Arity3 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, outType, hints); - } - - public Computers.Arity3 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, outType); - } - - public Computers.Arity3 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, outType, hints); - } - - public Inplaces.Arity3_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type); - } - - public Inplaces.Arity3_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type); - } - - public Inplaces.Arity3_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type); - } - - } - - /** - * Builder with arity 3, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - */ - public final class Arity3_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - - public Arity3_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - } - - public Arity3_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity3_IT_OT outType(final Nil outType) { - return new Arity3_IT_OT<>(in1Type, in2Type, in3Type, outType); - } - - public Functions.Arity3 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, Nil.of(Object.class)); - } - - public Functions.Arity3 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity3_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type); - } - - public Inplaces.Arity3_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type); - } - - public Inplaces.Arity3_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type); - } - - } - - /** - * Builder with arity 3, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of the output. - */ - public final class Arity3_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final Nil outType; - - public Arity3_IV_OT(final I1 in1, final I2 in2, final I3 in3, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.outType = outType; - } - - public Functions.Arity3 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), outType); - } - - public Functions.Arity3 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), outType, hints); - } - - public Computers.Arity3 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), outType); - } - - public Computers.Arity3 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3); - } - } - - /** - * Builder with arity 3, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - */ - public final class Arity3_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - - public Arity3_IV_OU(final I1 in1, final I2 in2, final I3 in3) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - } - - public Arity3_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, out); - return new Arity3_IV_OV<>(in1, in2, in3, out); - } - - public Arity3_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity3_IV_OT outType(final Nil outType) { - return new Arity3_IV_OT<>(in1, in2, in3, outType); - } - - public Functions.Arity3 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), Nil.of(Object.class)); - } - - public Functions.Arity3 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), Nil.of(Object.class), hints); - } - - public Inplaces.Arity3_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3)); - } - - public Inplaces.Arity3_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3)); - } - - public Inplaces.Arity3_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3)); - } - - public Inplaces.Arity3_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), hints); - } - - public Inplaces.Arity3_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), hints); - } - - public Inplaces.Arity3_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3); - } - - } - - /** - * Builder with arity 3, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - */ - public final class Arity3_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final O out; - - public Arity3_IV_OV(final I1 in1, final I2 in2, final I3 in3, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.out = out; - } - - public Computers.Arity3 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, out); - } - - public Computers.Arity3 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, out); - } - - } - - /** - * Builder with arity 4, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of the output. - */ - public final class Arity4_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil outType; - - public Arity4_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.outType = outType; - } - - public Functions.Arity4 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, outType); - } - - public Functions.Arity4 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, outType, hints); - } - - public Computers.Arity4 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, outType); - } - - public Computers.Arity4 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, outType, hints); - } - - public Inplaces.Arity4_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - public Inplaces.Arity4_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - public Inplaces.Arity4_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - public Inplaces.Arity4_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - } - - /** - * Builder with arity 4, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - */ - public final class Arity4_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - - public Arity4_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - } - - public Arity4_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity4_IT_OT outType(final Nil outType) { - return new Arity4_IT_OT<>(in1Type, in2Type, in3Type, in4Type, outType); - } - - public Functions.Arity4 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, Nil.of(Object.class)); - } - - public Functions.Arity4 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity4_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - public Inplaces.Arity4_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - public Inplaces.Arity4_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - public Inplaces.Arity4_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type); - } - - } - - /** - * Builder with arity 4, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of the output. - */ - public final class Arity4_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final Nil outType; - - public Arity4_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.outType = outType; - } - - public Functions.Arity4 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), outType); - } - - public Functions.Arity4 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), outType, hints); - } - - public Computers.Arity4 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), outType); - } - - public Computers.Arity4 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4); - } - } - - /** - * Builder with arity 4, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - */ - public final class Arity4_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - - public Arity4_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - } - - public Arity4_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, out); - return new Arity4_IV_OV<>(in1, in2, in3, in4, out); - } - - public Arity4_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity4_IV_OT outType(final Nil outType) { - return new Arity4_IV_OT<>(in1, in2, in3, in4, outType); - } - - public Functions.Arity4 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), Nil.of(Object.class)); - } - - public Functions.Arity4 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), Nil.of(Object.class), hints); - } - - public Inplaces.Arity4_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4)); - } - - public Inplaces.Arity4_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4)); - } - - public Inplaces.Arity4_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4)); - } - - public Inplaces.Arity4_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4)); - } - - public Inplaces.Arity4_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), hints); - } - - public Inplaces.Arity4_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), hints); - } - - public Inplaces.Arity4_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), hints); - } - - public Inplaces.Arity4_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4); - } - - } - - /** - * Builder with arity 4, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - */ - public final class Arity4_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final O out; - - public Arity4_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.out = out; - } - - public Computers.Arity4 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, out); - } - - public Computers.Arity4 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, out); - } - - } - - /** - * Builder with arity 5, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of the output. - */ - public final class Arity5_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil outType; - - public Arity5_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.outType = outType; - } - - public Functions.Arity5 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType); - } - - public Functions.Arity5 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType, hints); - } - - public Computers.Arity5 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType); - } - - public Computers.Arity5 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, outType, hints); - } - - public Inplaces.Arity5_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - } - - /** - * Builder with arity 5, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - */ - public final class Arity5_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - - public Arity5_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - } - - public Arity5_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity5_IT_OT outType(final Nil outType) { - return new Arity5_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, outType); - } - - public Functions.Arity5 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, Nil.of(Object.class)); - } - - public Functions.Arity5 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity5_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - public Inplaces.Arity5_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - } - - /** - * Builder with arity 5, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of the output. - */ - public final class Arity5_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final Nil outType; - - public Arity5_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.outType = outType; - } - - public Functions.Arity5 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType); - } - - public Functions.Arity5 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType, hints); - } - - public Computers.Arity5 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType); - } - - public Computers.Arity5 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5); - } - } - - /** - * Builder with arity 5, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - */ - public final class Arity5_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - - public Arity5_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - } - - public Arity5_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, out); - return new Arity5_IV_OV<>(in1, in2, in3, in4, in5, out); - } - - public Arity5_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity5_IV_OT outType(final Nil outType) { - return new Arity5_IV_OT<>(in1, in2, in3, in4, in5, outType); - } - - public Functions.Arity5 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), Nil.of(Object.class)); - } - - public Functions.Arity5 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), Nil.of(Object.class), hints); - } - - public Inplaces.Arity5_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); - } - - public Inplaces.Arity5_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); - } - - public Inplaces.Arity5_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); - } - - public Inplaces.Arity5_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); - } - - public Inplaces.Arity5_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5)); - } - - public Inplaces.Arity5_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); - } - - public Inplaces.Arity5_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); - } - - public Inplaces.Arity5_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); - } - - public Inplaces.Arity5_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); - } - - public Inplaces.Arity5_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5); - } - - } - - /** - * Builder with arity 5, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - */ - public final class Arity5_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final O out; - - public Arity5_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.out = out; - } - - public Computers.Arity5 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, out); - } - - public Computers.Arity5 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, out); - } - - } - - /** - * Builder with arity 6, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of the output. - */ - public final class Arity6_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil outType; - - public Arity6_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.outType = outType; - } - - public Functions.Arity6 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType); - } - - public Functions.Arity6 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType, hints); - } - - public Computers.Arity6 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType); - } - - public Computers.Arity6 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType, hints); - } - - public Inplaces.Arity6_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - } - - /** - * Builder with arity 6, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - */ - public final class Arity6_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - - public Arity6_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - } - - public Arity6_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity6_IT_OT outType(final Nil outType) { - return new Arity6_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, outType); - } - - public Functions.Arity6 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, Nil.of(Object.class)); - } - - public Functions.Arity6 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity6_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - public Inplaces.Arity6_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - } - - /** - * Builder with arity 6, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of the output. - */ - public final class Arity6_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final Nil outType; - - public Arity6_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.outType = outType; - } - - public Functions.Arity6 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType); - } - - public Functions.Arity6 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType, hints); - } - - public Computers.Arity6 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType); - } - - public Computers.Arity6 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6); - } - } - - /** - * Builder with arity 6, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - */ - public final class Arity6_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - - public Arity6_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - } - - public Arity6_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, out); - return new Arity6_IV_OV<>(in1, in2, in3, in4, in5, in6, out); - } - - public Arity6_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity6_IV_OT outType(final Nil outType) { - return new Arity6_IV_OT<>(in1, in2, in3, in4, in5, in6, outType); - } - - public Functions.Arity6 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), Nil.of(Object.class)); - } - - public Functions.Arity6 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), Nil.of(Object.class), hints); - } - - public Inplaces.Arity6_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); - } - - public Inplaces.Arity6_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); - } - - public Inplaces.Arity6_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); - } - - public Inplaces.Arity6_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); - } - - public Inplaces.Arity6_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); - } - - public Inplaces.Arity6_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6)); - } - - public Inplaces.Arity6_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); - } - - public Inplaces.Arity6_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); - } - - public Inplaces.Arity6_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); - } - - public Inplaces.Arity6_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); - } - - public Inplaces.Arity6_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); - } - - public Inplaces.Arity6_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6); - } - - } - - /** - * Builder with arity 6, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - */ - public final class Arity6_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final O out; - - public Arity6_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.out = out; - } - - public Computers.Arity6 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, out); - } - - public Computers.Arity6 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, out); - } - - } - - /** - * Builder with arity 7, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of the output. - */ - public final class Arity7_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil outType; - - public Arity7_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.outType = outType; - } - - public Functions.Arity7 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType); - } - - public Functions.Arity7 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType, hints); - } - - public Computers.Arity7 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType); - } - - public Computers.Arity7 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType, hints); - } - - public Inplaces.Arity7_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - } - - /** - * Builder with arity 7, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - */ - public final class Arity7_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - - public Arity7_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - } - - public Arity7_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity7_IT_OT outType(final Nil outType) { - return new Arity7_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, outType); - } - - public Functions.Arity7 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, Nil.of(Object.class)); - } - - public Functions.Arity7 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity7_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - public Inplaces.Arity7_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - } - - /** - * Builder with arity 7, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of the output. - */ - public final class Arity7_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final Nil outType; - - public Arity7_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.outType = outType; - } - - public Functions.Arity7 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType); - } - - public Functions.Arity7 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType, hints); - } - - public Computers.Arity7 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType); - } - - public Computers.Arity7 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7); - } - } - - /** - * Builder with arity 7, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - */ - public final class Arity7_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - - public Arity7_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - } - - public Arity7_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, out); - return new Arity7_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, out); - } - - public Arity7_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity7_IV_OT outType(final Nil outType) { - return new Arity7_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, outType); - } - - public Functions.Arity7 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), Nil.of(Object.class)); - } - - public Functions.Arity7 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), Nil.of(Object.class), hints); - } - - public Inplaces.Arity7_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7)); - } - - public Inplaces.Arity7_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Inplaces.Arity7_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Inplaces.Arity7_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Inplaces.Arity7_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Inplaces.Arity7_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Inplaces.Arity7_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Inplaces.Arity7_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7); - } - - } - - /** - * Builder with arity 7, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - */ - public final class Arity7_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final O out; - - public Arity7_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.out = out; - } - - public Computers.Arity7 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, out); - } - - public Computers.Arity7 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, out); - } - - } - - /** - * Builder with arity 8, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of the output. - */ - public final class Arity8_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil outType; - - public Arity8_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.outType = outType; - } - - public Functions.Arity8 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType); - } - - public Functions.Arity8 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType, hints); - } - - public Computers.Arity8 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType); - } - - public Computers.Arity8 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType, hints); - } - - public Inplaces.Arity8_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - } - - /** - * Builder with arity 8, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - */ - public final class Arity8_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - - public Arity8_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - } - - public Arity8_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity8_IT_OT outType(final Nil outType) { - return new Arity8_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, outType); - } - - public Functions.Arity8 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, Nil.of(Object.class)); - } - - public Functions.Arity8 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity8_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - public Inplaces.Arity8_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - } - - /** - * Builder with arity 8, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of the output. - */ - public final class Arity8_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final Nil outType; - - public Arity8_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.outType = outType; - } - - public Functions.Arity8 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType); - } - - public Functions.Arity8 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType, hints); - } - - public Computers.Arity8 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType); - } - - public Computers.Arity8 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8); - } - } - - /** - * Builder with arity 8, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - */ - public final class Arity8_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - - public Arity8_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - } - - public Arity8_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, out); - return new Arity8_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, out); - } - - public Arity8_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity8_IV_OT outType(final Nil outType) { - return new Arity8_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, outType); - } - - public Functions.Arity8 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), Nil.of(Object.class)); - } - - public Functions.Arity8 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), Nil.of(Object.class), hints); - } - - public Inplaces.Arity8_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8)); - } - - public Inplaces.Arity8_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Inplaces.Arity8_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8); - } - - } - - /** - * Builder with arity 8, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - */ - public final class Arity8_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final O out; - - public Arity8_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.out = out; - } - - public Computers.Arity8 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, out); - } - - public Computers.Arity8 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, out); - } - - } - - /** - * Builder with arity 9, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of the output. - */ - public final class Arity9_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil outType; - - public Arity9_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.outType = outType; - } - - public Functions.Arity9 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType); - } - - public Functions.Arity9 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType, hints); - } - - public Computers.Arity9 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType); - } - - public Computers.Arity9 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType, hints); - } - - public Inplaces.Arity9_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - } - - /** - * Builder with arity 9, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - */ - public final class Arity9_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - - public Arity9_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - } - - public Arity9_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity9_IT_OT outType(final Nil outType) { - return new Arity9_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, outType); - } - - public Functions.Arity9 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, Nil.of(Object.class)); - } - - public Functions.Arity9 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity9_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - public Inplaces.Arity9_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - } - - /** - * Builder with arity 9, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of the output. - */ - public final class Arity9_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final Nil outType; - - public Arity9_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.outType = outType; - } - - public Functions.Arity9 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType); - } - - public Functions.Arity9 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType, hints); - } - - public Computers.Arity9 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType); - } - - public Computers.Arity9 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - } - - /** - * Builder with arity 9, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - */ - public final class Arity9_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - - public Arity9_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - } - - public Arity9_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); - return new Arity9_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); - } - - public Arity9_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity9_IV_OT outType(final Nil outType) { - return new Arity9_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, outType); - } - - public Functions.Arity9 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), Nil.of(Object.class)); - } - - public Functions.Arity9 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), Nil.of(Object.class), hints); - } - - public Inplaces.Arity9_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9)); - } - - public Inplaces.Arity9_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Inplaces.Arity9_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9); - } - - } - - /** - * Builder with arity 9, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - */ - public final class Arity9_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final O out; - - public Arity9_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.out = out; - } - - public Computers.Arity9 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); - } - - public Computers.Arity9 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, out); - } - - } - - /** - * Builder with arity 10, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of the output. - */ - public final class Arity10_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil outType; - - public Arity10_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.outType = outType; - } - - public Functions.Arity10 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType); - } - - public Functions.Arity10 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType, hints); - } - - public Computers.Arity10 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType); - } - - public Computers.Arity10 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType, hints); - } - - public Inplaces.Arity10_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - } - - /** - * Builder with arity 10, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - */ - public final class Arity10_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - - public Arity10_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - } - - public Arity10_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity10_IT_OT outType(final Nil outType) { - return new Arity10_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, outType); - } - - public Functions.Arity10 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, Nil.of(Object.class)); - } - - public Functions.Arity10 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity10_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - public Inplaces.Arity10_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - } - - /** - * Builder with arity 10, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of the output. - */ - public final class Arity10_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final Nil outType; - - public Arity10_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.outType = outType; - } - - public Functions.Arity10 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType); - } - - public Functions.Arity10 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType, hints); - } - - public Computers.Arity10 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType); - } - - public Computers.Arity10 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - } - - /** - * Builder with arity 10, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - */ - public final class Arity10_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - - public Arity10_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - } - - public Arity10_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); - return new Arity10_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); - } - - public Arity10_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity10_IV_OT outType(final Nil outType) { - return new Arity10_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, outType); - } - - public Functions.Arity10 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), Nil.of(Object.class)); - } - - public Functions.Arity10 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), Nil.of(Object.class), hints); - } - - public Inplaces.Arity10_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10)); - } - - public Inplaces.Arity10_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Inplaces.Arity10_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10); - } - - } - - /** - * Builder with arity 10, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - */ - public final class Arity10_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final O out; - - public Arity10_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.out = out; - } - - public Computers.Arity10 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); - } - - public Computers.Arity10 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, out); - } - - } - - /** - * Builder with arity 11, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of the output. - */ - public final class Arity11_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil outType; - - public Arity11_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.outType = outType; - } - - public Functions.Arity11 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType); - } - - public Functions.Arity11 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType, hints); - } - - public Computers.Arity11 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType); - } - - public Computers.Arity11 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType, hints); - } - - public Inplaces.Arity11_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - } - - /** - * Builder with arity 11, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - */ - public final class Arity11_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - - public Arity11_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - } - - public Arity11_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity11_IT_OT outType(final Nil outType) { - return new Arity11_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, outType); - } - - public Functions.Arity11 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, Nil.of(Object.class)); - } - - public Functions.Arity11 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity11_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - public Inplaces.Arity11_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - } - - /** - * Builder with arity 11, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of the output. - */ - public final class Arity11_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final Nil outType; - - public Arity11_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.outType = outType; - } - - public Functions.Arity11 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType); - } - - public Functions.Arity11 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType, hints); - } - - public Computers.Arity11 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType); - } - - public Computers.Arity11 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - } - - /** - * Builder with arity 11, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - */ - public final class Arity11_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - - public Arity11_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - } - - public Arity11_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); - return new Arity11_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); - } - - public Arity11_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity11_IV_OT outType(final Nil outType) { - return new Arity11_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, outType); - } - - public Functions.Arity11 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), Nil.of(Object.class)); - } - - public Functions.Arity11 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), Nil.of(Object.class), hints); - } - - public Inplaces.Arity11_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_11 inplace11() { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11)); - } - - public Inplaces.Arity11_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Inplaces.Arity11_11 inplace11(final Hints hints) { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate11() { - inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - public void mutate11(final Hints hints) { - inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11); - } - - } - - /** - * Builder with arity 11, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - */ - public final class Arity11_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final O out; - - public Arity11_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.out = out; - } - - public Computers.Arity11 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); - } - - public Computers.Arity11 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, out); - } - - } - - /** - * Builder with arity 12, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of the output. - */ - public final class Arity12_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil outType; - - public Arity12_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.outType = outType; - } - - public Functions.Arity12 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType); - } - - public Functions.Arity12 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType, hints); - } - - public Computers.Arity12 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType); - } - - public Computers.Arity12 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType, hints); - } - - public Inplaces.Arity12_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - } - - /** - * Builder with arity 12, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - */ - public final class Arity12_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - - public Arity12_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - } - - public Arity12_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity12_IT_OT outType(final Nil outType) { - return new Arity12_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, outType); - } - - public Functions.Arity12 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, Nil.of(Object.class)); - } - - public Functions.Arity12 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity12_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - public Inplaces.Arity12_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - } - - /** - * Builder with arity 12, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of the output. - */ - public final class Arity12_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final Nil outType; - - public Arity12_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.outType = outType; - } - - public Functions.Arity12 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType); - } - - public Functions.Arity12 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType, hints); - } - - public Computers.Arity12 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType); - } - - public Computers.Arity12 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - } - - /** - * Builder with arity 12, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - */ - public final class Arity12_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - - public Arity12_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - } - - public Arity12_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); - return new Arity12_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); - } - - public Arity12_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity12_IV_OT outType(final Nil outType) { - return new Arity12_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, outType); - } - - public Functions.Arity12 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), Nil.of(Object.class)); - } - - public Functions.Arity12 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), Nil.of(Object.class), hints); - } - - public Inplaces.Arity12_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_11 inplace11() { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_12 inplace12() { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12)); - } - - public Inplaces.Arity12_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_11 inplace11(final Hints hints) { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Inplaces.Arity12_12 inplace12(final Hints hints) { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate11() { - inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate12() { - inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate11(final Hints hints) { - inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - public void mutate12(final Hints hints) { - inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12); - } - - } - - /** - * Builder with arity 12, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - */ - public final class Arity12_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final O out; - - public Arity12_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.out = out; - } - - public Computers.Arity12 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); - } - - public Computers.Arity12 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, out); - } - - } - - /** - * Builder with arity 13, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of the output. - */ - public final class Arity13_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil outType; - - public Arity13_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.outType = outType; - } - - public Functions.Arity13 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType); - } - - public Functions.Arity13 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType, hints); - } - - public Computers.Arity13 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType); - } - - public Computers.Arity13 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType, hints); - } - - public Inplaces.Arity13_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - } - - /** - * Builder with arity 13, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - */ - public final class Arity13_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - - public Arity13_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - } - - public Arity13_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity13_IT_OT outType(final Nil outType) { - return new Arity13_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, outType); - } - - public Functions.Arity13 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, Nil.of(Object.class)); - } - - public Functions.Arity13 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity13_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - public Inplaces.Arity13_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - } - - /** - * Builder with arity 13, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of the output. - */ - public final class Arity13_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final Nil outType; - - public Arity13_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.outType = outType; - } - - public Functions.Arity13 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType); - } - - public Functions.Arity13 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType, hints); - } - - public Computers.Arity13 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType); - } - - public Computers.Arity13 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - } - - /** - * Builder with arity 13, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - */ - public final class Arity13_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - - public Arity13_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - } - - public Arity13_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); - return new Arity13_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); - } - - public Arity13_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity13_IV_OT outType(final Nil outType) { - return new Arity13_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, outType); - } - - public Functions.Arity13 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), Nil.of(Object.class)); - } - - public Functions.Arity13 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), Nil.of(Object.class), hints); - } - - public Inplaces.Arity13_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_11 inplace11() { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_12 inplace12() { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_13 inplace13() { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13)); - } - - public Inplaces.Arity13_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_11 inplace11(final Hints hints) { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_12 inplace12(final Hints hints) { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Inplaces.Arity13_13 inplace13(final Hints hints) { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate11() { - inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate12() { - inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate13() { - inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate11(final Hints hints) { - inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate12(final Hints hints) { - inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - public void mutate13(final Hints hints) { - inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13); - } - - } - - /** - * Builder with arity 13, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - */ - public final class Arity13_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final O out; - - public Arity13_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.out = out; - } - - public Computers.Arity13 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); - } - - public Computers.Arity13 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, out); - } - - } - - /** - * Builder with arity 14, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of the output. - */ - public final class Arity14_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil in14Type; - private final Nil outType; - - public Arity14_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.in14Type = in14Type; - this.outType = outType; - } - - public Functions.Arity14 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType); - } - - public Functions.Arity14 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType, hints); - } - - public Computers.Arity14 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType); - } - - public Computers.Arity14 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType, hints); - } - - public Inplaces.Arity14_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_14 inplace14() { - return InplaceUtils.match14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - } - - /** - * Builder with arity 14, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - */ - public final class Arity14_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil in14Type; - - public Arity14_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.in14Type = in14Type; - } - - public Arity14_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity14_IT_OT outType(final Nil outType) { - return new Arity14_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, outType); - } - - public Functions.Arity14 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, Nil.of(Object.class)); - } - - public Functions.Arity14 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity14_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - public Inplaces.Arity14_14 inplace14() { - return InplaceUtils.match14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - } - - /** - * Builder with arity 14, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of the output. - */ - public final class Arity14_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final Nil outType; - - public Arity14_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.outType = outType; - } - - public Functions.Arity14 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType); - } - - public Functions.Arity14 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType, hints); - } - - public Computers.Arity14 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType); - } - - public Computers.Arity14 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - } - - /** - * Builder with arity 14, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - */ - public final class Arity14_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - - public Arity14_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - } - - public Arity14_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); - return new Arity14_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); - } - - public Arity14_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity14_IV_OT outType(final Nil outType) { - return new Arity14_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, outType); - } - - public Functions.Arity14 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), Nil.of(Object.class)); - } - - public Functions.Arity14 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), Nil.of(Object.class), hints); - } - - public Inplaces.Arity14_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_11 inplace11() { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_12 inplace12() { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_13 inplace13() { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_14 inplace14() { - checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14)); - } - - public Inplaces.Arity14_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_11 inplace11(final Hints hints) { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_12 inplace12(final Hints hints) { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_13 inplace13(final Hints hints) { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Inplaces.Arity14_14 inplace14(final Hints hints) { - checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - return InplaceUtils.match14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate11() { - inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate12() { - inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate13() { - inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate14() { - inplace14().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate11(final Hints hints) { - inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate12(final Hints hints) { - inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate13(final Hints hints) { - inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - public void mutate14(final Hints hints) { - inplace14(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14); - } - - } - - /** - * Builder with arity 14, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - */ - public final class Arity14_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final O out; - - public Arity14_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.out = out; - } - - public Computers.Arity14 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); - } - - public Computers.Arity14 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, out); - } - - } - - /** - * Builder with arity 15, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of the output. - */ - public final class Arity15_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil in14Type; - private final Nil in15Type; - private final Nil outType; - - public Arity15_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.in14Type = in14Type; - this.in15Type = in15Type; - this.outType = outType; - } - - public Functions.Arity15 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType); - } - - public Functions.Arity15 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType, hints); - } - - public Computers.Arity15 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType); - } - - public Computers.Arity15 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType, hints); - } - - public Inplaces.Arity15_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_14 inplace14() { - return InplaceUtils.match14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_15 inplace15() { - return InplaceUtils.match15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - } - - /** - * Builder with arity 15, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - */ - public final class Arity15_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil in14Type; - private final Nil in15Type; - - public Arity15_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.in14Type = in14Type; - this.in15Type = in15Type; - } - - public Arity15_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity15_IT_OT outType(final Nil outType) { - return new Arity15_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, outType); - } - - public Functions.Arity15 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, Nil.of(Object.class)); - } - - public Functions.Arity15 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity15_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_14 inplace14() { - return InplaceUtils.match14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - public Inplaces.Arity15_15 inplace15() { - return InplaceUtils.match15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - } - - /** - * Builder with arity 15, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of the output. - */ - public final class Arity15_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final I15 in15; - private final Nil outType; - - public Arity15_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.in15 = in15; - this.outType = outType; - } - - public Functions.Arity15 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType); - } - - public Functions.Arity15 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType, hints); - } - - public Computers.Arity15 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType); - } - - public Computers.Arity15 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - } - - /** - * Builder with arity 15, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - */ - public final class Arity15_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final I15 in15; - - public Arity15_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.in15 = in15; - } - - public Arity15_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); - return new Arity15_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); - } - - public Arity15_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity15_IV_OT outType(final Nil outType) { - return new Arity15_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, outType); - } - - public Functions.Arity15 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), Nil.of(Object.class)); - } - - public Functions.Arity15 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), Nil.of(Object.class), hints); - } - - public Inplaces.Arity15_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_11 inplace11() { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_12 inplace12() { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_13 inplace13() { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_14 inplace14() { - checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_15 inplace15() { - checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15)); - } - - public Inplaces.Arity15_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_11 inplace11(final Hints hints) { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_12 inplace12(final Hints hints) { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_13 inplace13(final Hints hints) { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_14 inplace14(final Hints hints) { - checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Inplaces.Arity15_15 inplace15(final Hints hints) { - checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - return InplaceUtils.match15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate11() { - inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate12() { - inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate13() { - inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate14() { - inplace14().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate15() { - inplace15().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate11(final Hints hints) { - inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate12(final Hints hints) { - inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate13(final Hints hints) { - inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate14(final Hints hints) { - inplace14(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - public void mutate15(final Hints hints) { - inplace15(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15); - } - - } - - /** - * Builder with arity 15, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - */ - public final class Arity15_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final I15 in15; - private final O out; - - public Arity15_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.in15 = in15; - this.out = out; - } - - public Computers.Arity15 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); - } - - public Computers.Arity15 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, out); - } - - } - - /** - * Builder with arity 16, input type given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of input 16. - * @param The type of the output. - */ - public final class Arity16_IT_OT { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil in14Type; - private final Nil in15Type; - private final Nil in16Type; - private final Nil outType; - - public Arity16_IT_OT(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.in14Type = in14Type; - this.in15Type = in15Type; - this.in16Type = in16Type; - this.outType = outType; - } - - public Functions.Arity16 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType); - } - - public Functions.Arity16 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType, hints); - } - - public Computers.Arity16 computer() { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType); - } - - public Computers.Arity16 computer(final Hints hints) { - return ComputerUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType, hints); - } - - public Inplaces.Arity16_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_14 inplace14() { - return InplaceUtils.match14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_15 inplace15() { - return InplaceUtils.match15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_16 inplace16() { - return InplaceUtils.match16(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - } - - /** - * Builder with arity 16, input type given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of input 16. - */ - public final class Arity16_IT_OU { - - private final Nil in1Type; - private final Nil in2Type; - private final Nil in3Type; - private final Nil in4Type; - private final Nil in5Type; - private final Nil in6Type; - private final Nil in7Type; - private final Nil in8Type; - private final Nil in9Type; - private final Nil in10Type; - private final Nil in11Type; - private final Nil in12Type; - private final Nil in13Type; - private final Nil in14Type; - private final Nil in15Type; - private final Nil in16Type; - - public Arity16_IT_OU(final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - this.in1Type = in1Type; - this.in2Type = in2Type; - this.in3Type = in3Type; - this.in4Type = in4Type; - this.in5Type = in5Type; - this.in6Type = in6Type; - this.in7Type = in7Type; - this.in8Type = in8Type; - this.in9Type = in9Type; - this.in10Type = in10Type; - this.in11Type = in11Type; - this.in12Type = in12Type; - this.in13Type = in13Type; - this.in14Type = in14Type; - this.in15Type = in15Type; - this.in16Type = in16Type; - } - - public Arity16_IT_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity16_IT_OT outType(final Nil outType) { - return new Arity16_IT_OT<>(in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, outType); - } - - public Functions.Arity16 function() { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, Nil.of(Object.class)); - } - - public Functions.Arity16 function(final Hints hints) { - return FunctionUtils.match(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type, Nil.of(Object.class), hints); - } - - public Inplaces.Arity16_1 inplace1() { - return InplaceUtils.match1(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_2 inplace2() { - return InplaceUtils.match2(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_3 inplace3() { - return InplaceUtils.match3(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_4 inplace4() { - return InplaceUtils.match4(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_5 inplace5() { - return InplaceUtils.match5(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_6 inplace6() { - return InplaceUtils.match6(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_7 inplace7() { - return InplaceUtils.match7(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_8 inplace8() { - return InplaceUtils.match8(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_9 inplace9() { - return InplaceUtils.match9(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_10 inplace10() { - return InplaceUtils.match10(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_11 inplace11() { - return InplaceUtils.match11(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_12 inplace12() { - return InplaceUtils.match12(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_13 inplace13() { - return InplaceUtils.match13(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_14 inplace14() { - return InplaceUtils.match14(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_15 inplace15() { - return InplaceUtils.match15(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - public Inplaces.Arity16_16 inplace16() { - return InplaceUtils.match16(env, opName, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - } - - /** - * Builder with arity 16, input value given, output type given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of input 16. - * @param The type of the output. - */ - public final class Arity16_IV_OT { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final I15 in15; - private final I16 in16; - private final Nil outType; - - public Arity16_IV_OT(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16, final Nil outType) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.in15 = in15; - this.in16 = in16; - this.outType = outType; - } - - public Functions.Arity16 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType); - } - - public Functions.Arity16 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType, hints); - } - - public Computers.Arity16 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType); - } - - public Computers.Arity16 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), outType, hints); - } - - public O apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public O apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - } - - /** - * Builder with arity 16, input value given, output unspecified. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of input 16. - */ - public final class Arity16_IV_OU { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final I15 in15; - private final I16 in16; - - public Arity16_IV_OU(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.in15 = in15; - this.in16 = in16; - } - - public Arity16_IV_OV output(final O out) { - checkComputerRefs(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); - return new Arity16_IV_OV<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); - } - - public Arity16_IV_OT outType(final Class outType) { - return outType(Nil.of(outType)); - } - - public Arity16_IV_OT outType(final Nil outType) { - return new Arity16_IV_OT<>(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, outType); - } - - public Functions.Arity16 function() { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), Nil.of(Object.class)); - } - - public Functions.Arity16 function(final Hints hints) { - return FunctionUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), Nil.of(Object.class), hints); - } - - public Inplaces.Arity16_1 inplace1() { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_2 inplace2() { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_3 inplace3() { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_4 inplace4() { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_5 inplace5() { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_6 inplace6() { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_7 inplace7() { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_8 inplace8() { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_9 inplace9() { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_10 inplace10() { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_11 inplace11() { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_12 inplace12() { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_13 inplace13() { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_14 inplace14() { - checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_15 inplace15() { - checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_16 inplace16() { - checkInplaceRefs(16, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match16(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16)); - } - - public Inplaces.Arity16_1 inplace1(final Hints hints) { - checkInplaceRefs(1, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match1(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_2 inplace2(final Hints hints) { - checkInplaceRefs(2, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match2(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_3 inplace3(final Hints hints) { - checkInplaceRefs(3, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match3(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_4 inplace4(final Hints hints) { - checkInplaceRefs(4, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match4(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_5 inplace5(final Hints hints) { - checkInplaceRefs(5, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match5(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_6 inplace6(final Hints hints) { - checkInplaceRefs(6, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match6(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_7 inplace7(final Hints hints) { - checkInplaceRefs(7, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match7(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_8 inplace8(final Hints hints) { - checkInplaceRefs(8, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match8(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_9 inplace9(final Hints hints) { - checkInplaceRefs(9, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match9(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_10 inplace10(final Hints hints) { - checkInplaceRefs(10, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match10(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_11 inplace11(final Hints hints) { - checkInplaceRefs(11, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match11(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_12 inplace12(final Hints hints) { - checkInplaceRefs(12, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match12(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_13 inplace13(final Hints hints) { - checkInplaceRefs(13, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match13(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_14 inplace14(final Hints hints) { - checkInplaceRefs(14, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match14(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_15 inplace15(final Hints hints) { - checkInplaceRefs(15, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match15(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Inplaces.Arity16_16 inplace16(final Hints hints) { - checkInplaceRefs(16, in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - return InplaceUtils.match16(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), hints); - } - - public Object apply() { - return function().apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public Object apply(final Hints hints) { - return function(hints).apply(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate1() { - inplace1().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate2() { - inplace2().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate3() { - inplace3().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate4() { - inplace4().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate5() { - inplace5().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate6() { - inplace6().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate7() { - inplace7().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate8() { - inplace8().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate9() { - inplace9().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate10() { - inplace10().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate11() { - inplace11().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate12() { - inplace12().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate13() { - inplace13().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate14() { - inplace14().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate15() { - inplace15().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate16() { - inplace16().mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate1(final Hints hints) { - inplace1(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate2(final Hints hints) { - inplace2(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate3(final Hints hints) { - inplace3(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate4(final Hints hints) { - inplace4(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate5(final Hints hints) { - inplace5(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate6(final Hints hints) { - inplace6(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate7(final Hints hints) { - inplace7(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate8(final Hints hints) { - inplace8(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate9(final Hints hints) { - inplace9(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate10(final Hints hints) { - inplace10(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate11(final Hints hints) { - inplace11(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate12(final Hints hints) { - inplace12(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate13(final Hints hints) { - inplace13(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate14(final Hints hints) { - inplace14(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate15(final Hints hints) { - inplace15(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - public void mutate16(final Hints hints) { - inplace16(hints).mutate(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16); - } - - } - - /** - * Builder with arity 16, input value given, output value given. - * - * @author Curtis Rueden - * @param The type of input 1. - * @param The type of input 2. - * @param The type of input 3. - * @param The type of input 4. - * @param The type of input 5. - * @param The type of input 6. - * @param The type of input 7. - * @param The type of input 8. - * @param The type of input 9. - * @param The type of input 10. - * @param The type of input 11. - * @param The type of input 12. - * @param The type of input 13. - * @param The type of input 14. - * @param The type of input 15. - * @param The type of input 16. - */ - public final class Arity16_IV_OV { - - private final I1 in1; - private final I2 in2; - private final I3 in3; - private final I4 in4; - private final I5 in5; - private final I6 in6; - private final I7 in7; - private final I8 in8; - private final I9 in9; - private final I10 in10; - private final I11 in11; - private final I12 in12; - private final I13 in13; - private final I14 in14; - private final I15 in15; - private final I16 in16; - private final O out; - - public Arity16_IV_OV(final I1 in1, final I2 in2, final I3 in3, final I4 in4, final I5 in5, final I6 in6, final I7 in7, final I8 in8, final I9 in9, final I10 in10, final I11 in11, final I12 in12, final I13 in13, final I14 in14, final I15 in15, final I16 in16, final O out) - { - this.in1 = in1; - this.in2 = in2; - this.in3 = in3; - this.in4 = in4; - this.in5 = in5; - this.in6 = in6; - this.in7 = in7; - this.in8 = in8; - this.in9 = in9; - this.in10 = in10; - this.in11 = in11; - this.in12 = in12; - this.in13 = in13; - this.in14 = in14; - this.in15 = in15; - this.in16 = in16; - this.out = out; - } - - public Computers.Arity16 computer() { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), type(out)); - } - - public void compute() { - computer().compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); - } - - public Computers.Arity16 computer(final Hints hints) { - return ComputerUtils.match(env, opName, type(in1), type(in2), type(in3), type(in4), type(in5), type(in6), type(in7), type(in8), type(in9), type(in10), type(in11), type(in12), type(in13), type(in14), type(in15), type(in16), type(out), hints); - } - - public void compute(final Hints hints) { - computer(hints).compute(in1, in2, in3, in4, in5, in6, in7, in8, in9, in10, in11, in12, in13, in14, in15, in16, out); - } - - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/MatchingResult.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/MatchingResult.java deleted file mode 100644 index 9bd856f94..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/MatchingResult.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.scijava.ops.matcher; - -import java.util.ArrayList; -import java.util.List; - -import org.scijava.ops.OpUtils; -import org.scijava.ops.simplify.SimplifiedOpInfo; - -/** - * Class representing the result from type matching done by the - * {@link OpMatcher}. Contains the original candidates which match - * the types specified by {@link OpRef} and the final matches that match all - * inputs, outputs, and arguments. - * - * @author David Kolb - */ -public class MatchingResult { - - private final List candidates; - private final List matches; - private final List originalQueries; - - public static MatchingResult empty(final List originalQueries) { - return new MatchingResult(new ArrayList(), new ArrayList(), originalQueries); - } - - public MatchingResult(final List candidates, final List matches, final List originalQueries) { - this.candidates = candidates; - this.matches = matches; - this.originalQueries = originalQueries; - } - - public List getOriginalQueries() { - return originalQueries; - } - - public List getCandidates() { - return candidates; - } - - public List getMatches() { - return matches; - } - - public OpCandidate singleMatch() throws OpMatchingException { - if (matches.size() == 1) { - // if (log.isDebug()) { - // log.debug("Selected '" + match.getRef().getLabel() + "' op: " + - // match.opInfo().opClass().getName()); - // } - - // TODO: DO we still need this initialization? - // // initialize the op, if appropriate - // if (m.object() instanceof Initializable) { - // ((Initializable) m.object()).initialize(); - // } - - return matches.get(0); - } - - // There is no clear matching Op - final String analysis = OpUtils.matchInfo(this); - throw new OpMatchingException(analysis); - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/Identity.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/Identity.java deleted file mode 100644 index 9ef175b35..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/simplify/Identity.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.scijava.ops.simplify; - -import java.util.function.Function; - -import org.scijava.ops.core.Op; -import org.scijava.ops.hints.BaseOpHints.Simplification; -import org.scijava.ops.hints.OpHints; -import org.scijava.param.Parameter; -import org.scijava.plugin.Plugin; -import org.scijava.struct.ItemIO; - -@OpHints(hints = { Simplification.FORBIDDEN }) -@Plugin(type = Op.class, name = "simplify, focus") -@Parameter(key = "input") -@Parameter(key = "output") -public class Identity implements Function { - - public Identity() { - } - - @Override - public T apply(T t) { - return t; - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/ComputerUtils.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/util/ComputerUtils.java deleted file mode 100644 index 0f65080b2..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/ComputerUtils.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * This is autogenerated source code -- DO NOT EDIT. Instead, edit the - * corresponding template in templates/ and rerun bin/generate.groovy. - */ - -package org.scijava.ops.util; - -import com.google.common.collect.BiMap; -import com.google.common.collect.ImmutableBiMap; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Consumer; - -import org.scijava.function.Computers; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Container class for computer-style functional interfaces at various - * arities. - *

- * A computer has functional method {@code compute} with a number of arguments - * corresponding to the arity, plus an additional argument for the preallocated - * output to be populated by the computation. - *

- *

- * Each computer interface implements a corresponding {@link Consumer}-style - * interface (see {@link Consumers}) with arity+1; the consumer's {@code accept} - * method simply delegates to {@code compute}. This pattern allows computer ops - * to be used directly as consumers as needed. - *

- * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public final class ComputerUtils { - - private ComputerUtils() { - // NB: Prevent instantiation of utility class. - } - - /** - * All known computer types and their arities. The entries are sorted by - * arity, i.e., the {@code i}-th entry has an arity of {@code i}. - */ - public static final BiMap, Integer> ALL_COMPUTERS; - - static { - final Map, Integer> computers = new HashMap<>(); - computers.put(Computers.Arity0.class, 0); - computers.put(Computers.Arity1.class, 1); - computers.put(Computers.Arity2.class, 2); - computers.put(Computers.Arity3.class, 3); - computers.put(Computers.Arity4.class, 4); - computers.put(Computers.Arity5.class, 5); - computers.put(Computers.Arity6.class, 6); - computers.put(Computers.Arity7.class, 7); - computers.put(Computers.Arity8.class, 8); - computers.put(Computers.Arity9.class, 9); - computers.put(Computers.Arity10.class, 10); - computers.put(Computers.Arity11.class, 11); - computers.put(Computers.Arity12.class, 12); - computers.put(Computers.Arity13.class, 13); - computers.put(Computers.Arity14.class, 14); - computers.put(Computers.Arity15.class, 15); - computers.put(Computers.Arity16.class, 16); - ALL_COMPUTERS = ImmutableBiMap.copyOf(computers); - } - - /** - * @return {@code true} if the given type is a {@link #ALL_COMPUTERS known} - * computer type, {@code false} otherwise.
- * Note that only the type itself and not its type hierarchy is - * considered. - * @throws NullPointerException If {@code type} is {@code null}. - */ - public static boolean isComputer(Type type) { - return ALL_COMPUTERS.containsKey(Types.raw(type)); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity0 match(final OpEnvironment env, final String opName, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity0.class, outType); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity1 match(final OpEnvironment env, final String opName, final Nil inType, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity1.class, outType, inType); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity2 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity2.class, outType, in1Type, in2Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity3 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity3.class, outType, in1Type, in2Type, in3Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity4 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity5 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity6 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity7 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity8 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity9 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity10 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity11 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity12 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity13 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity14 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity15 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity16 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType) - { - return matchHelper(env, opName, Computers.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity0 match(final OpEnvironment env, final String opName, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity0.class, outType); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity1 match(final OpEnvironment env, final String opName, final Nil inType, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity1.class, outType, inType); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity2 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity2.class, outType, in1Type, in2Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity3 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity3.class, outType, in1Type, in2Type, in3Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity4 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity5 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity6 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity7 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity8 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity9 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity10 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity11 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity12 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity13 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity14 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity15 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - @SuppressWarnings("unchecked") - public static Computers.Arity16 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Computers.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - final Nil[] nils = new Nil[inTypes.length + 1]; - System.arraycopy(inTypes, 0, nils, 0, inTypes.length); - nils[nils.length - 1] = outType; - return (T) env.op(opName, Nil.of(specialType), nils, outType); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Hints hints, final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - final Nil[] nils = new Nil[inTypes.length + 1]; - System.arraycopy(inTypes, 0, nils, 0, inTypes.length); - nils[nils.length - 1] = outType; - return (T) env.op(opName, Nil.of(specialType), nils, outType, hints); - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/FunctionUtils.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/util/FunctionUtils.java deleted file mode 100644 index ca6b34954..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/FunctionUtils.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * This is autogenerated source code -- DO NOT EDIT. Instead, edit the - * corresponding template in templates/ and rerun bin/generate.groovy. - */ - -package org.scijava.ops.util; - -import com.google.common.collect.BiMap; -import com.google.common.collect.ImmutableBiMap; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.Map; -import java.util.function.BiFunction; -import java.util.function.Function; - -import org.scijava.function.Functions; -import org.scijava.function.Producer; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Utility class designed to match {@code Function}s of various arities. - * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public final class FunctionUtils { - - private FunctionUtils() { - // NB: Prevent instantiation of utility class. - } - - /** - * All known function types and their arities. The entries are sorted by - * arity, i.e., the {@code i}-th entry has an arity of {@code i}. - */ - public static final BiMap> ALL_FUNCTIONS; - - static { - final Map> functions = new HashMap<>(10); - functions.put(0, Producer.class); - functions.put(1, Function.class); - functions.put(2, BiFunction.class); - functions.put(3, Functions.Arity3.class); - functions.put(4, Functions.Arity4.class); - functions.put(5, Functions.Arity5.class); - functions.put(6, Functions.Arity6.class); - functions.put(7, Functions.Arity7.class); - functions.put(8, Functions.Arity8.class); - functions.put(9, Functions.Arity9.class); - functions.put(10, Functions.Arity10.class); - functions.put(11, Functions.Arity11.class); - functions.put(12, Functions.Arity12.class); - functions.put(13, Functions.Arity13.class); - functions.put(14, Functions.Arity14.class); - functions.put(15, Functions.Arity15.class); - functions.put(16, Functions.Arity16.class); - ALL_FUNCTIONS = ImmutableBiMap.copyOf(functions); - } - - /** - * @return {@code true} if the given type is a {@link #ALL_FUNCTIONS known} - * function type, {@code false} otherwise.
- * Note that only the type itself and not its type hierarchy is - * considered. - * @throws NullPointerException If {@code type} is {@code null}. - */ - public static boolean isFunction(Type type) { - return ALL_FUNCTIONS.containsValue(Types.raw(type)); - } - - @SuppressWarnings({ "unchecked" }) - public static Producer match(final OpEnvironment env, final String opName, final Nil outType) - { - return matchHelper(env, opName, Producer.class, outType); - } - - @SuppressWarnings({ "unchecked" }) - public static Function match(final OpEnvironment env, final String opName, final Nil inType, final Nil outType) - { - return matchHelper(env, opName, Function.class, outType, inType); - } - - @SuppressWarnings({ "unchecked" }) - public static BiFunction match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType) - { - return matchHelper(env, opName, BiFunction.class, outType, in1Type, in2Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity3 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity3.class, outType, in1Type, in2Type, in3Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity4 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity5 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity6 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity7 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity8 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity9 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity10 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity11 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity12 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity13 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity14 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity15 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity16 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType) - { - return matchHelper(env, opName, Functions.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Producer match(final OpEnvironment env, final String opName, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Producer.class, outType); - } - - @SuppressWarnings({ "unchecked" }) - public static Function match(final OpEnvironment env, final String opName, final Nil inType, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Function.class, outType, inType); - } - - @SuppressWarnings({ "unchecked" }) - public static BiFunction match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, BiFunction.class, outType, in1Type, in2Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity3 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity3.class, outType, in1Type, in2Type, in3Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity4 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity4.class, outType, in1Type, in2Type, in3Type, in4Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity5 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity5.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity6 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity6.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity7 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity7.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity8 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity8.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity9 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity9.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity10 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity10.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity11 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity11.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity12 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity12.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity13 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity13.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity14 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity14.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity15 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity15.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.Arity16 match(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Nil outType, final Hints hints) - { - return matchHelper(env, opName, hints, Functions.Arity16.class, outType, in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type); - } - - @SuppressWarnings({ "unchecked" }) - public static Functions.ArityN matchN(final OpEnvironment env, - final String opName, final Nil outType, final Nil... inTypes) - { - Object op = matchHelper(env, opName, ALL_FUNCTIONS.get(inTypes.length), - outType, inTypes); - if (op instanceof Producer) { - return Functions.nary((Producer) op); - } - else if (op instanceof Function) { - return Functions.nary((Function) op); - } - else if (op instanceof BiFunction) { - return Functions.nary((BiFunction) op); - } - else if (op instanceof Functions.Arity3) { - return Functions.nary((Functions.Arity3) op); - } - else if (op instanceof Functions.Arity4) { - return Functions.nary((Functions.Arity4) op); - } - else if (op instanceof Functions.Arity5) { - return Functions.nary((Functions.Arity5) op); - } - else if (op instanceof Functions.Arity6) { - return Functions.nary((Functions.Arity6) op); - } - else if (op instanceof Functions.Arity7) { - return Functions.nary((Functions.Arity7) op); - } - else if (op instanceof Functions.Arity8) { - return Functions.nary((Functions.Arity8) op); - } - else if (op instanceof Functions.Arity9) { - return Functions.nary((Functions.Arity9) op); - } - else if (op instanceof Functions.Arity10) { - return Functions.nary((Functions.Arity10) op); - } - else if (op instanceof Functions.Arity11) { - return Functions.nary((Functions.Arity11) op); - } - else if (op instanceof Functions.Arity12) { - return Functions.nary((Functions.Arity12) op); - } - else if (op instanceof Functions.Arity13) { - return Functions.nary((Functions.Arity13) op); - } - else if (op instanceof Functions.Arity14) { - return Functions.nary((Functions.Arity14) op); - } - else if (op instanceof Functions.Arity15) { - return Functions.nary((Functions.Arity15) op); - } - return Functions.nary((Functions.Arity16) op); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Hints hints, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/InplaceUtils.java b/scijava/scijava-ops/src/main/java/org/scijava/ops/util/InplaceUtils.java deleted file mode 100644 index 329ece2af..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/util/InplaceUtils.java +++ /dev/null @@ -1,1898 +0,0 @@ -/* - * This is autogenerated source code -- DO NOT EDIT. Instead, edit the - * corresponding template in templates/ and rerun bin/generate.groovy. - */ - -package org.scijava.ops.util; - -import java.lang.reflect.Type; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.function.Consumer; -import java.util.stream.Collectors; - -import org.scijava.function.Inplaces; -import org.scijava.function.Mutable; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Container class for inplace-style functional interfaces at various - * arities. - *

- * An inplace has functional method {@code mutate} with a number of arguments - * corresponding to the arity. Any of the arguments annotated - * with @{@link Mutable} may be mutated during execution. Some interfaces narrow - * this behavior to only a specific argument; most ops in practice will - * implement one of these narrowed interfaces. For example, - * {@link Inplaces.Arity2_1} is a binary inplace op that mutates the first of - * two arguments—e.g., an {@code a /= b} division operation would be an - * {@link Inplaces.Arity2_1}, whereas {@code b = a / b} would be an - * {@link Inplaces.Arity2_2}. - *

- *

- * Each inplace interface implements a corresponding {@link Consumer}-style - * interface (see {@link Consumers}) with same arity; the consumer's - * {@code accept} method simply delegates to {@code mutate}. This pattern allows - * inplace ops to be used directly as consumers as needed. - *

- *

- * Note that there is no nullary (arity 0) inplace interface, because there - * would be no arguments to mutate; see also {@link Consumers.Arity0}, - * {@link Computers.Arity0} and {@link Producer}. - *

- * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public final class InplaceUtils { - - private InplaceUtils() { - // NB: Prevent instantiation of container class. - } - - /** - * All known inplace types and their arities and mutable positions. The - * entries are sorted by arity and mutable position. - */ - public static final Map, InplaceInfo> ALL_INPLACES; - - static { - final Map, InplaceInfo> inplaces = new LinkedHashMap<>(22); - inplaces.put(Inplaces.Arity1.class, new InplaceInfo(1, 0)); - inplaces.put(Inplaces.Arity2_1.class, new InplaceInfo(2, 0)); - inplaces.put(Inplaces.Arity2_2.class, new InplaceInfo(2, 1)); - inplaces.put(Inplaces.Arity3_1.class, new InplaceInfo(3, 0)); - inplaces.put(Inplaces.Arity3_2.class, new InplaceInfo(3, 1)); - inplaces.put(Inplaces.Arity3_3.class, new InplaceInfo(3, 2)); - inplaces.put(Inplaces.Arity4_1.class, new InplaceInfo(4, 0)); - inplaces.put(Inplaces.Arity4_2.class, new InplaceInfo(4, 1)); - inplaces.put(Inplaces.Arity4_3.class, new InplaceInfo(4, 2)); - inplaces.put(Inplaces.Arity4_4.class, new InplaceInfo(4, 3)); - inplaces.put(Inplaces.Arity5_1.class, new InplaceInfo(5, 0)); - inplaces.put(Inplaces.Arity5_2.class, new InplaceInfo(5, 1)); - inplaces.put(Inplaces.Arity5_3.class, new InplaceInfo(5, 2)); - inplaces.put(Inplaces.Arity5_4.class, new InplaceInfo(5, 3)); - inplaces.put(Inplaces.Arity5_5.class, new InplaceInfo(5, 4)); - inplaces.put(Inplaces.Arity6_1.class, new InplaceInfo(6, 0)); - inplaces.put(Inplaces.Arity6_2.class, new InplaceInfo(6, 1)); - inplaces.put(Inplaces.Arity6_3.class, new InplaceInfo(6, 2)); - inplaces.put(Inplaces.Arity6_4.class, new InplaceInfo(6, 3)); - inplaces.put(Inplaces.Arity6_5.class, new InplaceInfo(6, 4)); - inplaces.put(Inplaces.Arity6_6.class, new InplaceInfo(6, 5)); - inplaces.put(Inplaces.Arity7_1.class, new InplaceInfo(7, 0)); - inplaces.put(Inplaces.Arity7_2.class, new InplaceInfo(7, 1)); - inplaces.put(Inplaces.Arity7_3.class, new InplaceInfo(7, 2)); - inplaces.put(Inplaces.Arity7_4.class, new InplaceInfo(7, 3)); - inplaces.put(Inplaces.Arity7_5.class, new InplaceInfo(7, 4)); - inplaces.put(Inplaces.Arity7_6.class, new InplaceInfo(7, 5)); - inplaces.put(Inplaces.Arity7_7.class, new InplaceInfo(7, 6)); - inplaces.put(Inplaces.Arity8_1.class, new InplaceInfo(8, 0)); - inplaces.put(Inplaces.Arity8_2.class, new InplaceInfo(8, 1)); - inplaces.put(Inplaces.Arity8_3.class, new InplaceInfo(8, 2)); - inplaces.put(Inplaces.Arity8_4.class, new InplaceInfo(8, 3)); - inplaces.put(Inplaces.Arity8_5.class, new InplaceInfo(8, 4)); - inplaces.put(Inplaces.Arity8_6.class, new InplaceInfo(8, 5)); - inplaces.put(Inplaces.Arity8_7.class, new InplaceInfo(8, 6)); - inplaces.put(Inplaces.Arity8_8.class, new InplaceInfo(8, 7)); - inplaces.put(Inplaces.Arity9_1.class, new InplaceInfo(9, 0)); - inplaces.put(Inplaces.Arity9_2.class, new InplaceInfo(9, 1)); - inplaces.put(Inplaces.Arity9_3.class, new InplaceInfo(9, 2)); - inplaces.put(Inplaces.Arity9_4.class, new InplaceInfo(9, 3)); - inplaces.put(Inplaces.Arity9_5.class, new InplaceInfo(9, 4)); - inplaces.put(Inplaces.Arity9_6.class, new InplaceInfo(9, 5)); - inplaces.put(Inplaces.Arity9_7.class, new InplaceInfo(9, 6)); - inplaces.put(Inplaces.Arity9_8.class, new InplaceInfo(9, 7)); - inplaces.put(Inplaces.Arity9_9.class, new InplaceInfo(9, 8)); - inplaces.put(Inplaces.Arity10_1.class, new InplaceInfo(10, 0)); - inplaces.put(Inplaces.Arity10_2.class, new InplaceInfo(10, 1)); - inplaces.put(Inplaces.Arity10_3.class, new InplaceInfo(10, 2)); - inplaces.put(Inplaces.Arity10_4.class, new InplaceInfo(10, 3)); - inplaces.put(Inplaces.Arity10_5.class, new InplaceInfo(10, 4)); - inplaces.put(Inplaces.Arity10_6.class, new InplaceInfo(10, 5)); - inplaces.put(Inplaces.Arity10_7.class, new InplaceInfo(10, 6)); - inplaces.put(Inplaces.Arity10_8.class, new InplaceInfo(10, 7)); - inplaces.put(Inplaces.Arity10_9.class, new InplaceInfo(10, 8)); - inplaces.put(Inplaces.Arity10_10.class, new InplaceInfo(10, 9)); - inplaces.put(Inplaces.Arity11_1.class, new InplaceInfo(11, 0)); - inplaces.put(Inplaces.Arity11_2.class, new InplaceInfo(11, 1)); - inplaces.put(Inplaces.Arity11_3.class, new InplaceInfo(11, 2)); - inplaces.put(Inplaces.Arity11_4.class, new InplaceInfo(11, 3)); - inplaces.put(Inplaces.Arity11_5.class, new InplaceInfo(11, 4)); - inplaces.put(Inplaces.Arity11_6.class, new InplaceInfo(11, 5)); - inplaces.put(Inplaces.Arity11_7.class, new InplaceInfo(11, 6)); - inplaces.put(Inplaces.Arity11_8.class, new InplaceInfo(11, 7)); - inplaces.put(Inplaces.Arity11_9.class, new InplaceInfo(11, 8)); - inplaces.put(Inplaces.Arity11_10.class, new InplaceInfo(11, 9)); - inplaces.put(Inplaces.Arity11_11.class, new InplaceInfo(11, 10)); - inplaces.put(Inplaces.Arity12_1.class, new InplaceInfo(12, 0)); - inplaces.put(Inplaces.Arity12_2.class, new InplaceInfo(12, 1)); - inplaces.put(Inplaces.Arity12_3.class, new InplaceInfo(12, 2)); - inplaces.put(Inplaces.Arity12_4.class, new InplaceInfo(12, 3)); - inplaces.put(Inplaces.Arity12_5.class, new InplaceInfo(12, 4)); - inplaces.put(Inplaces.Arity12_6.class, new InplaceInfo(12, 5)); - inplaces.put(Inplaces.Arity12_7.class, new InplaceInfo(12, 6)); - inplaces.put(Inplaces.Arity12_8.class, new InplaceInfo(12, 7)); - inplaces.put(Inplaces.Arity12_9.class, new InplaceInfo(12, 8)); - inplaces.put(Inplaces.Arity12_10.class, new InplaceInfo(12, 9)); - inplaces.put(Inplaces.Arity12_11.class, new InplaceInfo(12, 10)); - inplaces.put(Inplaces.Arity12_12.class, new InplaceInfo(12, 11)); - inplaces.put(Inplaces.Arity13_1.class, new InplaceInfo(13, 0)); - inplaces.put(Inplaces.Arity13_2.class, new InplaceInfo(13, 1)); - inplaces.put(Inplaces.Arity13_3.class, new InplaceInfo(13, 2)); - inplaces.put(Inplaces.Arity13_4.class, new InplaceInfo(13, 3)); - inplaces.put(Inplaces.Arity13_5.class, new InplaceInfo(13, 4)); - inplaces.put(Inplaces.Arity13_6.class, new InplaceInfo(13, 5)); - inplaces.put(Inplaces.Arity13_7.class, new InplaceInfo(13, 6)); - inplaces.put(Inplaces.Arity13_8.class, new InplaceInfo(13, 7)); - inplaces.put(Inplaces.Arity13_9.class, new InplaceInfo(13, 8)); - inplaces.put(Inplaces.Arity13_10.class, new InplaceInfo(13, 9)); - inplaces.put(Inplaces.Arity13_11.class, new InplaceInfo(13, 10)); - inplaces.put(Inplaces.Arity13_12.class, new InplaceInfo(13, 11)); - inplaces.put(Inplaces.Arity13_13.class, new InplaceInfo(13, 12)); - inplaces.put(Inplaces.Arity14_1.class, new InplaceInfo(14, 0)); - inplaces.put(Inplaces.Arity14_2.class, new InplaceInfo(14, 1)); - inplaces.put(Inplaces.Arity14_3.class, new InplaceInfo(14, 2)); - inplaces.put(Inplaces.Arity14_4.class, new InplaceInfo(14, 3)); - inplaces.put(Inplaces.Arity14_5.class, new InplaceInfo(14, 4)); - inplaces.put(Inplaces.Arity14_6.class, new InplaceInfo(14, 5)); - inplaces.put(Inplaces.Arity14_7.class, new InplaceInfo(14, 6)); - inplaces.put(Inplaces.Arity14_8.class, new InplaceInfo(14, 7)); - inplaces.put(Inplaces.Arity14_9.class, new InplaceInfo(14, 8)); - inplaces.put(Inplaces.Arity14_10.class, new InplaceInfo(14, 9)); - inplaces.put(Inplaces.Arity14_11.class, new InplaceInfo(14, 10)); - inplaces.put(Inplaces.Arity14_12.class, new InplaceInfo(14, 11)); - inplaces.put(Inplaces.Arity14_13.class, new InplaceInfo(14, 12)); - inplaces.put(Inplaces.Arity14_14.class, new InplaceInfo(14, 13)); - inplaces.put(Inplaces.Arity15_1.class, new InplaceInfo(15, 0)); - inplaces.put(Inplaces.Arity15_2.class, new InplaceInfo(15, 1)); - inplaces.put(Inplaces.Arity15_3.class, new InplaceInfo(15, 2)); - inplaces.put(Inplaces.Arity15_4.class, new InplaceInfo(15, 3)); - inplaces.put(Inplaces.Arity15_5.class, new InplaceInfo(15, 4)); - inplaces.put(Inplaces.Arity15_6.class, new InplaceInfo(15, 5)); - inplaces.put(Inplaces.Arity15_7.class, new InplaceInfo(15, 6)); - inplaces.put(Inplaces.Arity15_8.class, new InplaceInfo(15, 7)); - inplaces.put(Inplaces.Arity15_9.class, new InplaceInfo(15, 8)); - inplaces.put(Inplaces.Arity15_10.class, new InplaceInfo(15, 9)); - inplaces.put(Inplaces.Arity15_11.class, new InplaceInfo(15, 10)); - inplaces.put(Inplaces.Arity15_12.class, new InplaceInfo(15, 11)); - inplaces.put(Inplaces.Arity15_13.class, new InplaceInfo(15, 12)); - inplaces.put(Inplaces.Arity15_14.class, new InplaceInfo(15, 13)); - inplaces.put(Inplaces.Arity15_15.class, new InplaceInfo(15, 14)); - inplaces.put(Inplaces.Arity16_1.class, new InplaceInfo(16, 0)); - inplaces.put(Inplaces.Arity16_2.class, new InplaceInfo(16, 1)); - inplaces.put(Inplaces.Arity16_3.class, new InplaceInfo(16, 2)); - inplaces.put(Inplaces.Arity16_4.class, new InplaceInfo(16, 3)); - inplaces.put(Inplaces.Arity16_5.class, new InplaceInfo(16, 4)); - inplaces.put(Inplaces.Arity16_6.class, new InplaceInfo(16, 5)); - inplaces.put(Inplaces.Arity16_7.class, new InplaceInfo(16, 6)); - inplaces.put(Inplaces.Arity16_8.class, new InplaceInfo(16, 7)); - inplaces.put(Inplaces.Arity16_9.class, new InplaceInfo(16, 8)); - inplaces.put(Inplaces.Arity16_10.class, new InplaceInfo(16, 9)); - inplaces.put(Inplaces.Arity16_11.class, new InplaceInfo(16, 10)); - inplaces.put(Inplaces.Arity16_12.class, new InplaceInfo(16, 11)); - inplaces.put(Inplaces.Arity16_13.class, new InplaceInfo(16, 12)); - inplaces.put(Inplaces.Arity16_14.class, new InplaceInfo(16, 13)); - inplaces.put(Inplaces.Arity16_15.class, new InplaceInfo(16, 14)); - inplaces.put(Inplaces.Arity16_16.class, new InplaceInfo(16, 15)); - ALL_INPLACES = Collections.unmodifiableMap(inplaces); - } - - /** - * @return {@code true} if the given type is a {@link #ALL_INPLACES known} - * inplace type, {@code false} otherwise.
- * Note that only the type itself and not its type hierarchy is - * considered. - * @throws NullPointerException If {@code type} is {@code null}. - */ - public static boolean isInplace(Type type) { - return ALL_INPLACES.containsKey(Types.raw(type)); - } - - public static List> getInplacesOfArity(final int arity) { - return ALL_INPLACES.entrySet().stream() // - .filter(e -> e.getValue().arity() == arity) // - .map(Entry, InplaceInfo>::getKey) // - .collect(Collectors.toList()); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity1 match(final OpEnvironment env, final String opName, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity1.class, ioType, new Nil[] {ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity2_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type) - { - return matchHelper(env, opName, Inplaces.Arity2_1.class, ioType, new Nil[] {ioType, in2Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity2_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity2_2.class, ioType, new Nil[] {in1Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity3_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type) - { - return matchHelper(env, opName, Inplaces.Arity3_1.class, ioType, new Nil[] {ioType, in2Type, in3Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity3_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type) - { - return matchHelper(env, opName, Inplaces.Arity3_2.class, ioType, new Nil[] {in1Type, ioType, in3Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity3_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity3_3.class, ioType, new Nil[] {in1Type, in2Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type) - { - return matchHelper(env, opName, Inplaces.Arity4_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type) - { - return matchHelper(env, opName, Inplaces.Arity4_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type) - { - return matchHelper(env, opName, Inplaces.Arity4_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity4_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type) - { - return matchHelper(env, opName, Inplaces.Arity5_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type) - { - return matchHelper(env, opName, Inplaces.Arity5_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type) - { - return matchHelper(env, opName, Inplaces.Arity5_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type) - { - return matchHelper(env, opName, Inplaces.Arity5_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity5_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) - { - return matchHelper(env, opName, Inplaces.Arity6_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type) - { - return matchHelper(env, opName, Inplaces.Arity6_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type) - { - return matchHelper(env, opName, Inplaces.Arity6_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type) - { - return matchHelper(env, opName, Inplaces.Arity6_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type) - { - return matchHelper(env, opName, Inplaces.Arity6_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity6_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) - { - return matchHelper(env, opName, Inplaces.Arity7_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) - { - return matchHelper(env, opName, Inplaces.Arity7_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type) - { - return matchHelper(env, opName, Inplaces.Arity7_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type) - { - return matchHelper(env, opName, Inplaces.Arity7_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type) - { - return matchHelper(env, opName, Inplaces.Arity7_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type) - { - return matchHelper(env, opName, Inplaces.Arity7_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity7_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type) - { - return matchHelper(env, opName, Inplaces.Arity8_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity8_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type) - { - return matchHelper(env, opName, Inplaces.Arity9_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity9_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type) - { - return matchHelper(env, opName, Inplaces.Arity10_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity10_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type) - { - return matchHelper(env, opName, Inplaces.Arity11_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity11_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type) - { - return matchHelper(env, opName, Inplaces.Arity12_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity12_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type) - { - return matchHelper(env, opName, Inplaces.Arity13_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity13_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type) - { - return matchHelper(env, opName, Inplaces.Arity14_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_14 match14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity14_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_14 match14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type) - { - return matchHelper(env, opName, Inplaces.Arity15_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_15 match15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity15_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_14 match14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_15 match15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType, final Nil in16Type) - { - return matchHelper(env, opName, Inplaces.Arity16_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_16 match16(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil ioType) - { - return matchHelper(env, opName, Inplaces.Arity16_16.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, ioType}); - } - - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity1 match(final OpEnvironment env, final String opName, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity1.class, ioType, new Nil[] {ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity2_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity2_1.class, ioType, new Nil[] {ioType, in2Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity2_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity2_2.class, ioType, new Nil[] {in1Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity3_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity3_1.class, ioType, new Nil[] {ioType, in2Type, in3Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity3_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity3_2.class, ioType, new Nil[] {in1Type, ioType, in3Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity3_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity3_3.class, ioType, new Nil[] {in1Type, in2Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity4_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity4_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity4_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity4_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity4_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity5_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity5_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity5_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity5_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity5_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity5_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity6_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity6_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity6_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity6_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity6_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity6_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity6_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity7_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity7_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity8_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity8_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity9_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity9_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity10_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity10_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity11_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity11_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity12_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity12_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity13_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity13_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity14_14 match14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity14_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_14 match14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity15_15 match15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity15_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_1 match1(final OpEnvironment env, final String opName, final Nil ioType, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_1.class, ioType, new Nil[] {ioType, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_2 match2(final OpEnvironment env, final String opName, final Nil in1Type, final Nil ioType, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_2.class, ioType, new Nil[] {in1Type, ioType, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_3 match3(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil ioType, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_3.class, ioType, new Nil[] {in1Type, in2Type, ioType, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_4 match4(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil ioType, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_4.class, ioType, new Nil[] {in1Type, in2Type, in3Type, ioType, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_5 match5(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil ioType, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_5.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, ioType, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_6 match6(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil ioType, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_6.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, ioType, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_7 match7(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil ioType, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_7.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, ioType, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_8 match8(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil ioType, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_8.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, ioType, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_9 match9(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil ioType, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_9.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, ioType, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_10 match10(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil ioType, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_10.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, ioType, in11Type, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_11 match11(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil ioType, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_11.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, ioType, in12Type, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_12 match12(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil ioType, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_12.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, ioType, in13Type, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_13 match13(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil ioType, final Nil in14Type, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_13.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, ioType, in14Type, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_14 match14(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil ioType, final Nil in15Type, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_14.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, ioType, in15Type, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_15 match15(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil ioType, final Nil in16Type, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_15.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, ioType, in16Type}); - } - - @SuppressWarnings({ "unchecked" }) - public static Inplaces.Arity16_16 match16(final OpEnvironment env, final String opName, final Nil in1Type, final Nil in2Type, final Nil in3Type, final Nil in4Type, final Nil in5Type, final Nil in6Type, final Nil in7Type, final Nil in8Type, final Nil in9Type, final Nil in10Type, final Nil in11Type, final Nil in12Type, final Nil in13Type, final Nil in14Type, final Nil in15Type, final Nil ioType, final Hints hints) - { - return matchHelper(env, opName, hints, Inplaces.Arity16_16.class, ioType, new Nil[] {in1Type, in2Type, in3Type, in4Type, in5Type, in6Type, in7Type, in8Type, in9Type, in10Type, in11Type, in12Type, in13Type, in14Type, in15Type, ioType}); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Hints hints, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); - } - - public static class InplaceInfo { - - private final int arity; - private final int mutablePosition; - - public InplaceInfo(final int arity, final int mutablePosition) { - this.arity = arity; - this.mutablePosition = mutablePosition; - } - - public int arity() { - return arity; - } - - public int mutablePosition() { - return mutablePosition; - } - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/AnnotatedParameterMember.java b/scijava/scijava-ops/src/main/java/org/scijava/param/AnnotatedParameterMember.java deleted file mode 100644 index d65b907ff..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/AnnotatedParameterMember.java +++ /dev/null @@ -1,135 +0,0 @@ - -package org.scijava.param; - -import java.lang.reflect.Field; -import java.lang.reflect.Type; -import java.util.Arrays; -import java.util.List; - -import org.scijava.struct.ItemIO; -import org.scijava.struct.Member; - -/** - * {@link Member} backed by a {@link Field} annotated by {@link Parameter}. - * - * @author Curtis Rueden - * @param - */ -public abstract class AnnotatedParameterMember implements ParameterMember { - - /** Type, or a subtype thereof, which houses the field. */ - private final Type itemType; - - /** Annotation describing the item. */ - private final Parameter annotation; - - private ItemIO itemIO; - - public AnnotatedParameterMember(final Type itemType, - final Parameter annotation) - { - this.itemType = itemType; - this.annotation = annotation; - } - - // -- AnnotatedParameterMember methods -- - - public Parameter getAnnotation() { - return annotation; - } - - // -- ParameterMember methods -- - - @Override - public ItemVisibility getVisibility() { - return getAnnotation().visibility(); - } - - @Override - public boolean isAutoFill() { - return getAnnotation().autoFill(); - } - - @Override - public boolean isRequired() { - return getAnnotation().required(); - } - - @Override - public boolean isPersisted() { - return getAnnotation().persist(); - } - - @Override - public String getPersistKey() { - return getAnnotation().persistKey(); - } - - @Override - public String getInitializer() { - return getAnnotation().initializer(); - } - - @Override - public String getValidater() { - return getAnnotation().validater(); - } - - @Override - public String getCallback() { - return getAnnotation().callback(); - } - - @Override - public String getWidgetStyle() { - return getAnnotation().style(); - } - - @Override - public Object getMinimumValue() { - return getAnnotation().min(); - } - - @Override - public Object getMaximumValue() { - return getAnnotation().max(); - } - - @Override - public Object getStepSize() { - return getAnnotation().stepSize(); - } - - @Override - public List getChoices() { - final String[] choices = getAnnotation().choices(); - if (choices.length == 0) return ParameterMember.super.getChoices(); - return Arrays.asList((Object[]) choices); - } - - // -- Member methods -- - - @Override - public String getKey() { - return getAnnotation().key(); - } - - @Override - public Type getType() { - return itemType; - } - - @Override - public ItemIO getIOType() { - if (itemIO == null) { - // CTR START HERE: if AUTO here, compute what it actually is and cache. - itemIO = getAnnotation().itemIO(); - } - return itemIO; - } - - @Override - public boolean isStruct() { - return getAnnotation().struct(); - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/ConvertedParameterMember.java b/scijava/scijava-ops/src/main/java/org/scijava/param/ConvertedParameterMember.java deleted file mode 100644 index ea19ee9aa..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/ConvertedParameterMember.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.scijava.param; - -import java.lang.reflect.Type; - -import org.scijava.struct.ItemIO; -import org.scijava.struct.Member; - -/** - * {@link Member} whose {@link Type} has been converted into another {@link Type} - * - * @author Gabriel Selzer - * - * @param - */ -public class ConvertedParameterMember implements Member{ - - final Member original; - final Type newType; - - public ConvertedParameterMember(Member original, Type newType) { - this.original = original; - this.newType = newType; - } - - @Override - public String getKey() { - return original.getKey(); - } - - @Override - public Type getType() { - return newType; - } - - @Override - public ItemIO getIOType() { - return original.getIOType(); - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/DefaultMutableParameterMember.java b/scijava/scijava-ops/src/main/java/org/scijava/param/DefaultMutableParameterMember.java deleted file mode 100644 index b7d0abce8..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/DefaultMutableParameterMember.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * #%L - * SciJava Common shared library for SciJava software. - * %% - * Copyright (C) 2009 - 2017 Board of Regents of the University of - * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck - * Institute of Molecular Cell Biology and Genetics. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.param; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.scijava.struct.ItemIO; - -/** - * Default {@link MutableParameterMember} implementation. - * - * @author Curtis Rueden - */ -public class DefaultMutableParameterMember implements - MutableParameterMember -{ - - private final String key; - private final Type type; - private final ItemIO ioType; - - private ItemVisibility visibility; - private boolean required; - private boolean persisted; - private String persistKey; - private String initializer; - private String validater; - private String callback; - private String widgetStyle; - private Object defaultValue; - private Object minimumValue; - private Object maximumValue; - private Object softMinimum; - private Object softMaximum; - private Object stepSize; - private final List choices = new ArrayList<>(); - private String label; - private String description; - - /** Table of extra key/value pairs. */ - private final Map values = new HashMap<>(); - - public DefaultMutableParameterMember(final String key, final Class type, final ItemIO ioType) { - this(key, (Type) type, ioType); - } - public DefaultMutableParameterMember(final String key, final Type type, final ItemIO ioType) { - this.key = key; - this.type = type; - this.ioType = ioType; - visibility = MutableParameterMember.super.getVisibility(); - required = MutableParameterMember.super.isRequired(); - persisted = MutableParameterMember.super.isPersisted(); - persistKey = MutableParameterMember.super.getPersistKey(); - initializer = MutableParameterMember.super.getInitializer(); - callback = MutableParameterMember.super.getCallback(); - widgetStyle = MutableParameterMember.super.getWidgetStyle(); - minimumValue = MutableParameterMember.super.getMinimumValue(); - maximumValue = MutableParameterMember.super.getMaximumValue(); - stepSize = MutableParameterMember.super.getStepSize(); - final List superChoices = MutableParameterMember.super.getChoices(); - if (superChoices != null) choices.addAll(superChoices); - label = MutableParameterMember.super.getLabel(); - description = MutableParameterMember.super.getDescription(); - } - - /** Creates a new parameter with the same values as the given one. */ - public DefaultMutableParameterMember(final ParameterMember member) { - key = member.getKey(); - type = member.getType(); - ioType = member.getIOType(); - visibility = member.getVisibility(); - required = member.isRequired(); - persisted = member.isPersisted(); - persistKey = member.getPersistKey(); - initializer = member.getInitializer(); - callback = member.getCallback(); - widgetStyle = member.getWidgetStyle(); - minimumValue = member.getMinimumValue(); - maximumValue = member.getMaximumValue(); - softMinimum = member.getSoftMinimum(); - softMaximum = member.getSoftMaximum(); - stepSize = member.getStepSize(); - final List memberChoices = member.getChoices(); - if (memberChoices != null) choices.addAll(memberChoices); - label = member.getLabel(); - description = member.getDescription(); - } - - // -- MutableParameterMember methods -- - - @Override - public void setVisibility(final ItemVisibility visibility) { - this.visibility = visibility; - } - - @Override - public void setRequired(final boolean required) { - this.required = required; - } - - @Override - public void setPersisted(final boolean persisted) { - this.persisted = persisted; - } - - @Override - public void setPersistKey(final String persistKey) { - this.persistKey = persistKey; - } - - @Override - public void setInitializer(final String initializer) { - this.initializer = initializer; - } - - @Override - public void setValidater(final String validater) { - this.validater = validater; - } - - @Override - public void setCallback(final String callback) { - this.callback = callback; - } - - @Override - public void setWidgetStyle(final String widgetStyle) { - this.widgetStyle = widgetStyle; - } - - @Override - public void setDefaultValue(final Object defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - public void setMinimumValue(final Object minimumValue) { - this.minimumValue = minimumValue; - } - - @Override - public void setMaximumValue(final Object maximumValue) { - this.maximumValue = maximumValue; - } - - @Override - public void setSoftMinimum(final Object softMinimum) { - this.softMinimum = softMinimum; - } - - @Override - public void setSoftMaximum(final Object softMaximum) { - this.softMaximum = softMaximum; - } - - @Override - public void setStepSize(final Object stepSize) { - this.stepSize = stepSize; - } - - @Override - public void setChoices(final List choices) { - this.choices.clear(); - this.choices.addAll(choices); - } - - @Override - public void set(final String key, final String value) { - values.put(key, value); - } - - // -- MutableBasicDetails methods -- - - @Override - public void setLabel(final String label) { - this.label = label; - } - - @Override - public void setDescription(final String description) { - this.description = description; - } - - // -- ParameterMember methods -- - - @Override - public ItemVisibility getVisibility() { - return visibility; - } - - @Override - public boolean isRequired() { - return required; - } - - @Override - public boolean isPersisted() { - return persisted; - } - - @Override - public String getPersistKey() { - return persistKey; - } - - @Override - public String getInitializer() { - return initializer; - } - - @Override - public String getValidater() { - return validater; - } - - @Override - public String getCallback() { - return callback; - } - - @Override - public String getWidgetStyle() { - return widgetStyle; - } - - @Override - public Object getDefaultValue() { - return defaultValue; - } - - @Override - public Object getMinimumValue() { - return minimumValue; - } - - @Override - public Object getMaximumValue() { - return maximumValue; - } - - @Override - public Object getSoftMinimum() { - return softMinimum; - } - - @Override - public Object getSoftMaximum() { - return softMaximum; - } - - @Override - public Object getStepSize() { - return stepSize; - } - - @Override - public List getChoices() { - return Collections.unmodifiableList(choices); - } - - // -- BasicDetails methods -- - - @Override - public String getLabel() { - return label; - } - - @Override - public String getDescription() { - return description; - } - - // -- Member methods -- - - @Override - public String getKey() { - return key; - } - - @Override - public Type getType() { - return type; - } - - @Override - public ItemIO getIOType() { - return ioType; - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/FieldParameterMember.java b/scijava/scijava-ops/src/main/java/org/scijava/param/FieldParameterMember.java deleted file mode 100644 index 790446819..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/FieldParameterMember.java +++ /dev/null @@ -1,123 +0,0 @@ - -package org.scijava.param; - -import java.lang.reflect.Field; - -import org.scijava.struct.Member; -import org.scijava.struct.MemberInstance; -import org.scijava.struct.Struct; -import org.scijava.struct.ValueAccessible; -import org.scijava.struct.ValueAccessibleMemberInstance; -import org.scijava.types.Types; - -/** - * {@link Member} backed by a {@link Field} annotated by {@link Parameter}. - * - * @author Curtis Rueden - * @param - */ -public class FieldParameterMember extends AnnotatedParameterMember - implements ValueAccessible -{ - - private final Field field; - private final Class structType; - private final Struct struct; - - public FieldParameterMember(final Field field, final Class structType, Parameter parameterAnnotation) - throws ValidityException - { - super(Types.fieldType(field, structType), parameterAnnotation); - this.field = field; - this.structType = structType; - struct = isStruct() ? ParameterStructs.structOf(getRawType()) : null; - } - - // -- FieldParameterItem methods -- - - public Field getField() { - return field; - } - - // -- ValueAccessible methods -- - - @Override - public T get(final Object o) { - try { - @SuppressWarnings("unchecked") - final T value = (T) field(this).get(o); - return value; - } - catch (final IllegalAccessException exc) { - return null; // FIXME - } - } - - @Override - public void set(final T value, final Object o) { - try { - field(this).set(o, value); - } - catch (final IllegalAccessException exc) { - // FIXME - } - } - - // -- ParameterItem methods -- - - @Override - public T getDefaultValue() { - // NB: The default value is the initial field value. - // E.g.: - // - // @Parameter - // private int weekdays = 5; - // - // To obtain this information, we need to instantiate the object, then - // extract the value of the associated field. - // - // Of course, the command might do evil things like: - // - // @Parameter - // private long time = System.currentTimeMillis(); - // - // In which case the default value will vary by instance. But there is - // nothing we can really do about that. This is only a best effort. - - try { - final Object dummy = structType.newInstance(); - @SuppressWarnings("unchecked") - final T value = (T) getField().get(dummy); - return value; - } - catch (final InstantiationException | IllegalAccessException exc) { - throw new IllegalStateException("Missing no-args constructor", exc); - } - } - - // -- Member methods -- - - public static Field field(final Member item) { - if (item instanceof FieldParameterMember) { - final FieldParameterMember fpItem = (FieldParameterMember) item; - return fpItem.getField(); - } - return null; - } - - @Override - public String getKey() { - final String key = getAnnotation().key(); - return key == null || key.isEmpty() ? field.getName() : key; - } - - @Override - public Struct childStruct() { - return struct; - } - - @Override - public MemberInstance createInstance(final Object o) { - return new ValueAccessibleMemberInstance<>(this, o); - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/FunctionalParameterMember.java b/scijava/scijava-ops/src/main/java/org/scijava/param/FunctionalParameterMember.java deleted file mode 100644 index f00737275..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/FunctionalParameterMember.java +++ /dev/null @@ -1,39 +0,0 @@ - -package org.scijava.param; - -import java.lang.reflect.Type; - -import org.scijava.struct.Member; -import org.scijava.struct.Struct; - -/** - * {@link Member} backed by a generic parameter of a - * {@link FunctionalInterface}-annotated interface. - *

- * The generic parameter in question is indicated by annotating a {@link Class} - * with {@link Parameter}. - *

- * - * @author Curtis Rueden - * @param - */ -public class FunctionalParameterMember extends AnnotatedParameterMember { - - private Struct struct; - - public FunctionalParameterMember(final Type itemType, - final Parameter annotation) throws ValidityException - { - super(itemType, annotation); - final String key = getKey(); - if (key == null || key.isEmpty()) { - throw new ValidityException("Functional parameter must specify key"); - } - struct = isStruct() ? ParameterStructs.structOf(getRawType()) : null; - } - - @Override - public Struct childStruct() { - return struct; - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/ItemVisibility.java b/scijava/scijava-ops/src/main/java/org/scijava/param/ItemVisibility.java deleted file mode 100644 index fdd6d0f3d..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/ItemVisibility.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * #%L - * SciJava Common shared library for SciJava software. - * %% - * Copyright (C) 2009 - 2017 Board of Regents of the University of - * Wisconsin-Madison, Broad Institute of MIT and Harvard, Max Planck - * Institute of Molecular Cell Biology and Genetics, University of - * Konstanz, and KNIME GmbH. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.param; - -/** - * Defines the "visibility" of a parameter. - * - * @author Curtis Rueden - */ -public enum ItemVisibility { - - /** - * Item is included in the history for purposes of data provenance, and - * included as a parameter when recording scripts. - */ - NORMAL, - - /** - * Item is excluded from the history for the purposes of data provenance, but - * still included as a parameter when recording scripts. - */ - TRANSIENT, - - /** - * Item is excluded from the history for the purposes of data provenance, and - * also excluded as a parameter when recording scripts. This option should - * only be used for items with no effect on the final output, such as a - * "verbose" flag. - */ - INVISIBLE, - - /** - * As {@link #INVISIBLE}, and further indicating that the item's value is - * intended as a message to the user (e.g., in the input harvester panel) - * rather than an actual parameter to the module execution. - */ - MESSAGE - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/MutableParameterMember.java b/scijava/scijava-ops/src/main/java/org/scijava/param/MutableParameterMember.java deleted file mode 100644 index 576adfcfb..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/MutableParameterMember.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.scijava.param; - -import java.util.List; - -/** - * A {@link ParameterMember} whose metadata can be changed. - * - * @author Curtis Rueden - */ -public interface MutableParameterMember extends ParameterMember { - - void setVisibility(ItemVisibility visibility); - - void setRequired(boolean required); - - void setPersisted(boolean persisted); - - void setPersistKey(String persistKey); - - void setInitializer(String initializer); - - void setValidater(String validater); - - void setCallback(String callback); - - void setWidgetStyle(String widgetStyle); - - void setDefaultValue(Object defaultValue); - - void setMinimumValue(Object minimumValue); - - void setMaximumValue(Object maximumValue); - - void setSoftMinimum(Object softMinimum); - - void setSoftMaximum(Object softMaximum); - - void setStepSize(Object stepSize); - - void setChoices(List choices); - - // -- MutableBasicDetails methods -- - - // TODO: Factor out to MutableBasicDetails. - - void setLabel(String label); - - void setDescription(String description); - - default void set(final String key) { - set(key, null); - } - - void set(String key, String value); -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/Parameter.java b/scijava/scijava-ops/src/main/java/org/scijava/param/Parameter.java deleted file mode 100644 index b985c685c..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/Parameter.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * #%L - * SciJava Common shared library for SciJava software. - * %% - * Copyright (C) 2009 - 2017 Board of Regents of the University of - * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck - * Institute of Molecular Cell Biology and Genetics. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.param; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Repeatable; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.scijava.plugin.Attr; -import org.scijava.struct.ItemIO; -import org.scijava.struct.MemberInstance; - -/** - * An annotation for indicating a field is an input or output parameter. This - * annotation is a useful way for plugins to declare their inputs and outputs - * simply. - * - * @author Johannes Schindelin - * @author Grant Harris - * @author Curtis Rueden - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.FIELD, ElementType.TYPE, ElementType.METHOD }) -@Repeatable(Parameters.class) -public @interface Parameter { - - /** - * IMPORTANT: Parameter annotation instances are mutated using reflections - * in order to resolve {@link ItemIO#AUTO} which accesses this field - * by name. If the name is changed, this has to be changed accordingly. - */ - public static final String ITEMIO_FIELD_NAME = "itemIO"; - - /** - * IMPORTANT: Parameter annotation instances are mutated using reflections - * in order to resolve {@link ItemIO#AUTO} which accesses this field - * by name. If the name is changed, this has to be changed accordingly. - */ - public static final String KEY_FIELD_NAME = "key"; - - /** Defines a key for the parameter. */ - String key() default ""; - - /** Defines a label for the parameter. */ - String label() default ""; - - /** Defines a description for the parameter. */ - String description() default ""; - - /** - * Defines the input/output type of the parameter. - * - * @see ItemIO - */ - ItemIO itemIO() default ItemIO.AUTO; - - /** - * Defines whether the parameter references an object which itself has - * parameters. This allows for nested structures to be created. - */ - boolean struct() default false; - - /** - * Defines the "visibility" of the parameter. - *

- * Choices are: - *

- *
    - *
  • NORMAL: parameter is included in the history for purposes of data - * provenance, and included as a parameter when recording scripts.
  • - *
  • TRANSIENT: parameter is excluded from the history for the purposes of - * data provenance, but still included as a parameter when recording scripts.
  • - *
  • INVISIBLE: parameter is excluded from the history for the purposes of - * data provenance, and also excluded as a parameter when recording scripts. - * This option should only be used for parameters with no effect on the final - * output, such as a "verbose" flag.
  • - *
  • MESSAGE: parameter value is intended as a message only, not editable by - * the user nor included as an input or output parameter.
  • - *
- */ - ItemVisibility visibility() default ItemVisibility.NORMAL; - - /** - * Defines whether the parameter value should be filled programmatically, if - * possible. - */ - boolean autoFill() default true; - - /** Defines whether the parameter value must be non-null. */ - boolean required() default true; - - /** Defines whether to remember the most recent value of the parameter. */ - boolean persist() default true; - - /** Defines a key to use for saving the value persistently. */ - String persistKey() default ""; - - /** Defines a function that is called to initialize the parameter. */ - String initializer() default ""; - - /** - * Defines a function that is called to validate the parameter value after it - * is marked as resolved. - * - * @see MemberInstance#resolve() - */ - String validater() default ""; - - /** - * Defines a function that is called whenever this parameter changes. - *

- * This mechanism enables interdependent parameters of various types. For - * example, two {@code int} parameters "width" and "height" could update each - * other when another {@code boolean} "Preserve aspect ratio" flag is set. - *

- */ - String callback() default ""; - - /** - * Defines the preferred widget style. - *

- * We do not use an {@code enum} because the styles need to be extensible. And - * we cannot use an interface-driven extensible enum pattern, because - * interfaces cannot be used as attributes within a Java annotation interface. - * So we fall back to strings! - *

- */ - String style() default ""; - - /** Defines the minimum allowed value (numeric parameters only). */ - String min() default ""; - - /** Defines the maximum allowed value (numeric parameters only). */ - String max() default ""; - - /** Defines the step size to use (numeric parameters only). */ - String stepSize() default ""; - - /** Defines the list of possible values (multiple choice text fields only). */ - String[] choices() default {}; - - /** - * A list of additional attributes which can be used to extend this annotation - * beyond its built-in capabilities. - */ - Attr[] attrs() default {}; -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/ParameterStructs.java b/scijava/scijava-ops/src/main/java/org/scijava/param/ParameterStructs.java deleted file mode 100644 index 0be9cee49..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/ParameterStructs.java +++ /dev/null @@ -1,697 +0,0 @@ - -package org.scijava.param; - -import io.leangen.geantyref.AnnotationFormatException; -import io.leangen.geantyref.TypeFactory; - -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.Type; -import java.lang.reflect.TypeVariable; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Deque; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Function; -import java.util.stream.Collectors; - -import org.scijava.function.Container; -import org.scijava.function.Mutable; -import org.scijava.ops.FieldOpDependencyMember; -import org.scijava.ops.MethodParameterOpDependencyMember; -import org.scijava.ops.OpDependency; -import org.scijava.ops.OpDependencyMember; -import org.scijava.ops.OpInfo; -import org.scijava.ops.OpMethod; -import org.scijava.ops.matcher.MatchingUtils; -import org.scijava.ops.simplify.Simplifier; -import org.scijava.ops.util.AnnotationUtils; -import org.scijava.struct.ItemIO; -import org.scijava.struct.Member; -import org.scijava.struct.Struct; -import org.scijava.struct.StructInstance; -import org.scijava.types.Types; -import org.scijava.util.ClassUtils; - -/** - * Utility functions for working with {@link org.scijava.param} classes. - * - * @author Curtis Rueden - * @author David Kolb - */ -public final class ParameterStructs { - - /** - * Convenience method to call {@link #structOf(Class)} dot {@link Struct#createInstance(Object)} - * - * @param object - * @return - * @throws ValidityException - */ - public static StructInstance create(final C object) - throws ValidityException - { - return structOf(object.getClass()).createInstance(object); - } - - /** - * Convenience method to () -> parse(type) - * - * @param type - * @return - * @throws ValidityException - */ - public static Struct structOf(final Class type) - throws ValidityException - { - final List> items = parse(type); - return () -> items; - } - - /** - * Convenience method to () -> parse(field) - * - * @param field - * @return - * @throws ValidityException - */ - public static Struct structOf(final Field field) - throws ValidityException - { - final List> items = parse(field); - return () -> items; - } - - //TODO: Javadoc - public static Struct structOf(final OpInfo opInfo, final Type newType) throws ValidityException { - final List> items = parse(opInfo, newType); - return () -> items; - } - - public static Struct structOf(final Class c, final Method m) - throws ValidityException - { - final List> items = parse(c, m); - return () -> items; - } - - /** - * Parses the specified functional class for @{@link Parameter} annotations. This consists of the following steps: - *

- * 1) First annotations on the class level are checked. These annotate the signature (parameters and return type) of - * the specified functional class (or subtype of one). The annotations re expected to be in the following order: - * parameters, return type. - *
- * E.g. a {@link Function} may be annotated with two @{@link Parameter} annotations, where the first annotation will - * annotate the parameter and the second the return type of the functional method {@link Function#apply(Object)} of - * {@link Function}. - *

- * 2) Second, annotations on the fields of the specified class are checked. - * - * @param type the class to parse, is expected to contain some functional interface in its hierarchy - * @return list of identified member instances - * @throws ValidityException if there are problems during parsing - */ - public static List> parse(final Class type) - throws ValidityException - { - if (type == null) return null; - - final ArrayList> items = new ArrayList<>(); - final ArrayList problems = new ArrayList<>(); - final Set names = new HashSet<>(); - - // NB: Reject abstract classes. - checkModifiers(type.getName() + ": ", problems, type.getModifiers(), true, Modifier.ABSTRACT); - - // Parse class level (i.e., generic) @Parameter annotations. - final Class paramsClass = findParametersDeclaration(type); - if (paramsClass != null) { - parseFunctionalParameters(items, names, problems, paramsClass, type, false); - } - - // Parse field level @OpDependency annotations. - parseFieldOpDependencies(items, problems, type); - - // Fail if there were any problems. - if (!problems.isEmpty()) throw new ValidityException(problems); - - return items; - } - - /** - * Parses the specified field for @{@link Parameter} annotations. Has the same behavior as the first parsing step - * of {@link #parse(Class)}. - * - * @param field the field to parse, is expected to contain some functional interface in the hierarchy of its type - * @return list of identified member instances - * @throws ValidityException if there are problems during parsing - */ - public static List> parse(final Field field) throws ValidityException { - Class c = field.getDeclaringClass(); - if (c == null || field == null) return null; - - field.setAccessible(true); - - final ArrayList> items = new ArrayList<>(); - final ArrayList problems = new ArrayList<>(); - final Set names = new HashSet<>(); - final Type fieldType = Types.fieldType(field, c); - - checkModifiers(field.toString() + ": ", problems, field.getModifiers(), false, Modifier.FINAL); - parseFunctionalParameters(items, names, problems, field, fieldType, false); - - // Fail if there were any problems. - if (!problems.isEmpty()) { - throw new ValidityException(problems); - } - - return items; - } - - //TODO: Javadoc - public static List> parse(final OpInfo opInfo, final Type newType) throws ValidityException { - final ArrayList> items = new ArrayList<>(); - final ArrayList problems = new ArrayList<>(); - final Set names = new HashSet<>(); - - parseFunctionalParameters(items, names, problems, opInfo.getAnnotationBearer(), newType, true); - - // Fail if there were any problems. - if (!problems.isEmpty()) { - throw new ValidityException(problems); - } - - return items; - } - - public static List> parse(final Class c, final Method method) - throws ValidityException - { - if (c == null || method == null) return null; - - method.setAccessible(true); - - final ArrayList> items = new ArrayList<>(); - final ArrayList problems = new ArrayList<>(); - final Set names = new HashSet<>(); - final OpMethod methodAnnotation = method.getAnnotation(OpMethod.class); - - // Determine functional type - Type functionalType; - try { - functionalType = getOpMethodType(methodAnnotation.type(), - method); - } - catch (IllegalArgumentException e) { - problems.add(new ValidityProblem(e.getMessage())); - functionalType = Types.parameterizeRaw(methodAnnotation.type()); - } - - // Parse method level @Parameter annotations. - parseFunctionalParameters(items, names, problems, method, functionalType, true); - - // Parse method level @OpDependency annotations. - parseMethodOpDependencies(items, problems, c, method); - - // Fail if there were any problems. - if (!problems.isEmpty()) throw new ValidityException(problems); - - return items; - } - - private static java.lang.reflect.Parameter[] getOpDependencies( - java.lang.reflect.Parameter[] methodParams) - { - return Arrays // - .stream(methodParams) // - .filter(param -> param.getAnnotation(OpDependency.class) != null) // - .toArray(java.lang.reflect.Parameter[]::new); - } - - private static java.lang.reflect.Parameter[] getOpParams( - java.lang.reflect.Parameter[] methodParams) - { - return Arrays // - .stream(methodParams) // - .filter(param -> param.getAnnotation(OpDependency.class) == null) // - .toArray(java.lang.reflect.Parameter[]::new); - - } - - private static Type[] getOpParamTypes( - java.lang.reflect.Parameter[] methodParams) - { - return Arrays // - .stream(methodParams) // - .filter(param -> param.getAnnotation(OpDependency.class) == null) // - .map(param -> param.getParameterizedType()) - .toArray(Type[]::new); - - } - - public static Type getOpMethodType(Class opClass, Method opMethod) - { - // since type is a functional interface, it has (exactly) one abstract - // declared method (the method that our OpMethod is emulating). - Method abstractMethod = singularAbstractMethod(opClass); - Type[] typeMethodParams = abstractMethod.getGenericParameterTypes(); - java.lang.reflect.Parameter[] opMethodParams = getOpParams(opMethod.getParameters()); - - if (typeMethodParams.length != opMethodParams.length) { - throw new IllegalArgumentException("Number of parameters in OpMethod" + - opMethod + - " does not match the required number of parameters for functional method of FunctionalInterface " + - opClass); - } - Map, Type> typeVarAssigns = new HashMap<>(); - - // map params of OpMethod to type variables of abstract method of functional - // interface (along with return type if applicable) - // TODO: not sure how this handles when there are type variables. - MatchingUtils.inferTypeVariables(typeMethodParams, getOpParamTypes(opMethodParams), typeVarAssigns); - if (abstractMethod.getReturnType() != void.class) { - MatchingUtils.inferTypeVariables(new Type[] {abstractMethod.getGenericReturnType()}, new Type[] {opMethod.getGenericReturnType()}, typeVarAssigns); - } - - // parameterize opClass - return Types.parameterize(opClass, typeVarAssigns); - } - - public static Method singularAbstractMethod(Class functionalInterface) { - Method[] typeMethods = Arrays.stream(functionalInterface - .getMethods()).filter(method -> Modifier.isAbstract(method - .getModifiers())).toArray(Method[]::new); - if (typeMethods.length != 1) { - throw new IllegalArgumentException(functionalInterface + - " should be a FunctionalInterface, however it has " + - typeMethods.length + " abstract declared methods"); - } - - return typeMethods[0]; - } - - //TODO: Javadoc - // TODO: We currently assume that simplifiers only exist for pure inputs - public static List> parse(final OpInfo opInfo, final List> suppliers) throws ValidityException { - final ArrayList> items = new ArrayList<>(); - final ArrayList problems = new ArrayList<>(); - - Struct srcStruct = opInfo.struct(); - for (int i = 0; i < srcStruct.members().size(); i++) { - Member member = srcStruct.members().get(i); - // FIXME: We currently assume that only pure inputs have simplifiers. - if (!member.isInput() || member.isOutput()) { - items.add(member); - continue; - } - Type newType = suppliers.get(i).simpleType(); - items.add(new ConvertedParameterMember<>(member, newType)); - } - - // Fail if there were any problems. - // TODO: can we delete this? - if (!problems.isEmpty()) { - throw new ValidityException(problems); - } - - return items; - } - - /** - * Returns a list of {@link FunctionalMethodType}s describing the input and - * output types of the functional method of the specified functional type. In - * doing so, the return type of the method will me marked as - * {@link ItemIO#OUTPUT} and the all method parameters as {@link ItemIO#OUTPUT}, - * except for parameters annotated with {@link Container} or {@link Mutable} - * which will be marked as {@link ItemIO#CONTAINER} or {@link ItemIO#MUTABLE} - * respectively. If the specified type does not have a functional method in its - * hierarchy, {@code null} will be returned.
- * The order will be the following: method parameters from left to right, then - * return type. - * - * @param functionalType - * @return - */ - public static List findFunctionalMethodTypes(Type functionalType) { - Method functionalMethod = findFunctionalMethod(Types.raw(functionalType)); - if (functionalMethod == null) throw new IllegalArgumentException("Type " + - functionalType + - " is not a functional type, thus its functional method types cannot be determined"); - - Type paramfunctionalType = functionalType; - if (functionalType instanceof Class) { - paramfunctionalType = Types.parameterizeRaw((Class) functionalType); - } - - List out = new ArrayList<>(); - int i = 0; - for (Type t : Types.getExactParameterTypes(functionalMethod, paramfunctionalType)) { - final ItemIO ioType; - if (AnnotationUtils.getMethodParameterAnnotation(functionalMethod, i, Container.class) != null) - ioType = ItemIO.CONTAINER; - else if (AnnotationUtils.getMethodParameterAnnotation(functionalMethod, i, Mutable.class) != null) - ioType = ItemIO.MUTABLE; - else - ioType = ItemIO.INPUT; - out.add(new FunctionalMethodType(t, ioType)); - i++; - } - - Type returnType = Types.getExactReturnType(functionalMethod, paramfunctionalType); - if (!returnType.equals(void.class)) { - out.add(new FunctionalMethodType(returnType, ItemIO.OUTPUT)); - } - - return out; - } - - // -- Helper methods -- - - /** - * Helper to check for several modifiers at once. - * - * @param message - * @param problems - * @param actualModifiers - * @param requiredModifiers - */ - private static void checkModifiers(String message, final ArrayList problems, - final int actualModifiers, final boolean negate, final int... requiredModifiers) { - for (int mod : requiredModifiers) { - if (negate) { - if ((actualModifiers & mod) != 0) { - problems.add( - new ValidityProblem(message + "Illegal modifier. Must not be " + Modifier.toString(mod))); - } - } else { - if ((actualModifiers & mod) == 0) { - problems.add(new ValidityProblem(message + "Illegal modifier. Must be " + Modifier.toString(mod))); - } - } - } - } - - /** - * Create new instances of {@link Parameter} annotations having default names (key) and the {@link ItemIO} - * from the specified list of {@link FunctionalMethodType}s. Default names will be:

- * 'input{index}' for {@link ItemIO#INPUT}
- * 'output{index}' for {@link ItemIO#OUTPUT}
- * 'container{index}' for {@link ItemIO#CONTAINER}
- * 'mutable{index}' for {@link ItemIO#MUTABLE}

- * with {index} being counted individually. - * - * This is used to infer the annotations for {@link FunctionalParameterMember}s if the {@link Parameter} is not - * explicitly specified by a user and should thus be inferred from the functional method type. - * - * @param fmts - * @return - */ - private static Parameter[] synthesizeParameterAnnotations(final List fmts) { - List params = new ArrayList<>(); - - int ins, outs, containers, mutables; - ins = outs = containers = mutables = 1; - for (FunctionalMethodType fmt : fmts) { - Map paramValues = new HashMap<>(); - paramValues.put(Parameter.ITEMIO_FIELD_NAME, fmt.itemIO()); - - String key; - switch (fmt.itemIO()) { - case INPUT: - key = "input" + ins++; - break; - case OUTPUT: - key = "output" + outs++; - break; - case CONTAINER: - key = "container" + containers++; - break; - case MUTABLE: - key = "mutable" + mutables++; - break; - default: - throw new RuntimeException("Unexpected ItemIO type encountered!"); - } - - paramValues.put(Parameter.KEY_FIELD_NAME, key); - - try { - params.add(TypeFactory.annotation(Parameter.class, paramValues)); - } catch (AnnotationFormatException e) { - throw new RuntimeException("Error during Parameter annotation synthetization. This is " - + "most likely an implementation error.", e); - } - } - - return params.toArray(new Parameter[params.size()]); - } - - //TODO: delete -// /** -// * Mutates {@link ItemIO#AUTO} in the specified annotations array by replacing it with the inferred {@link ItemIO} -// * from the specified {@link FunctionalMethodType}s. Also checks if the user defined {@link ItemIO} matches the -// * inferred one if its different from AUTO and logs the errors in the specified problems list. It is expected that -// * the order of annotations matches the order of specified {@link FunctionalMethodType}s. -// * -// * @param annotations the {@link Parameter} annotations to mutate -// * @param fmts inferred method types from the functional method -// * @param problems list to record problems -// * @return true if new problems got added to the problems list -// */ -// private static boolean resolveItemIOAuto(Parameter[] annotations, List fmts, final ArrayList problems) { -// boolean dirty = false; -// int i = 0; -// for (Parameter anno : annotations) { -// FunctionalMethodType fmt = fmts.get(i); -// if (anno.itemIO().equals(ItemIO.AUTO)) { -// // NB: Mutating the annotation should be fine here, as the functional signature can't change dynamically. -// // Hence, the inferred ITemIO should stay valid. (And for now we do not need information about AUTO after -// // this point) -// ItemIO io = (ItemIO) AnnotationUtils.mutateAnnotationInstance(anno, Parameter.ITEMIO_FIELD_NAME, fmt.itemIO()); -// assert io.equals(ItemIO.AUTO); -// // if the ItemIO is explicitly specified, we can check if it matches the inferred ItemIO from the functional method -// } else if (!anno.itemIO().equals(fmt.itemIO())) { -// String message = ""; -// message += "Inferred ItemIO of parameter annotation number " + i + " does not match " -// + "the specified ItemIO of the annotation: " -// + "inferred: " + fmt.itemIO() + " vs. " -// + "specified: " + anno.itemIO(); -// problems.add(new ValidityProblem(message)); -// dirty = true; -// } -// i++; -// } -// return dirty; -// } - - private static void parseFunctionalParameters(final ArrayList> items, final Set names, final ArrayList problems, - AnnotatedElement annotationBearer, Type type, final boolean synthesizeAnnotations) { - //Search for the functional method of 'type' and map its signature to ItemIO - List fmts; - try { - fmts = findFunctionalMethodTypes(type); - } - catch (IllegalArgumentException e) { - problems.add(new ValidityProblem("Could not find functional method of " + - type.getTypeName())); - return; - } - - // Get parameter annotations (may not be present) - // TODO: remove Parameter annotations from all ops and remove logic below. - // TODO: grab names from OpClass/OpField annotations. - Parameter[] annotations = synthesizeParameterAnnotations(fmts); -// // 'type' is annotated, resolve ItemIO.AUTO by matching it to the signature of the functional method -// if (annotations.length > 0 && !synthesizeAnnotations) { -// if (annotations.length != fmts.size()) { -// String fmtIOs = Arrays.deepToString(fmts.stream().map(fmt -> fmt.itemIO()).toArray(ItemIO[]::new)); -// problems.add(new ValidityProblem("The number of inferred functional method types does not match " -// + "the number of specified parameters annotations.\n" -// + "#inferred functional method types: " + fmts.size() + " " + fmtIOs + "\n" -// + "#specified paraeter annotations: " + annotations.length)); -// return; -// } -// // START HERE: Instead of hacking the annotation here, we need to -// if (resolveItemIOAuto(annotations, fmts, problems)) { -// // specified parameter annotations do not match functional method signature -// return; -// } -// // 'type' is not annotated, synthesize parameter annotations using defaults and ItemIO inferred from -// // the functional method -// } else { -// annotations = synthesizeParameterAnnotations(fmts); -// } - - for (int i=0; i item = // - new FunctionalParameterMember<>(itemType, annotations[i]); - names.add(key); - items.add(item); - } - catch (final ValidityException exc) { - problems.addAll(exc.problems()); - } - } - - } - - private static void parseFieldOpDependencies(final List> items, - final List problems, Class annotatedClass) - { - final List fields = ClassUtils.getAnnotatedFields(annotatedClass, - OpDependency.class); - for (final Field f : fields) { - f.setAccessible(true); - final boolean isFinal = Modifier.isFinal(f.getModifiers()); - if (isFinal) { - final String name = f.getName(); - // Final fields are bad because they cannot be modified. - final String error = "Invalid final Op dependency field: " + name; - problems.add(new ValidityProblem(error)); - // Skip invalid Op dependencies. - continue; - } - final OpDependencyMember item = new FieldOpDependencyMember<>(f, - annotatedClass); - items.add(item); - } - } - - private static void parseMethodOpDependencies(final List> items, - final List problems, final Class enclosingclass, - final Method annotatedMethod) - { - final java.lang.reflect.Parameter[] methodParams = annotatedMethod - .getParameters(); - final java.lang.reflect.Parameter[] opDependencyParams = getOpDependencies(methodParams); - - for (java.lang.reflect.Parameter param : opDependencyParams) { - final OpDependency dependency = param.getAnnotation(OpDependency.class); - final Type methodParamType = param.getParameterizedType(); - final Member item = new MethodParameterOpDependencyMember<>( - param, methodParamType, dependency); - items.add(item); - } - } - - private static boolean isImmutable(final Class type) { - // NB: All eight primitive types, as well as the boxed primitive - // wrapper classes, as well as strings, are immutable objects. - return Types.isNumber(type) || Types.isText(type) || // - Types.isBoolean(type); - } - - /** - * Finds the class declaring {@code @Parameter} annotations. They might be on - * this type, on a supertype, or an implemented interface. - */ - private static Class findParametersDeclaration(final Class type) { - if (type == null) return null; - final Deque> types = new ArrayDeque<>(); - types.add(type); - while (!types.isEmpty()) { - final Class candidate = types.pop(); - if (candidate.getAnnotation(Parameters.class) != null || - candidate.getAnnotation(Parameter.class) != null) return candidate; - final Class superType = candidate.getSuperclass() ; - if (superType != null) types.add(superType); - types.addAll(Arrays.asList(candidate.getInterfaces())); - } - return null; - } - - /** - * Searches for a {@code @FunctionalInterface} annotated interface in the - * class hierarchy of the specified type. The first one that is found will - * be returned. If no such interface can be found, null will be returned. - * - * @param type - * @return - */ - public static Class findFunctionalInterface(Class type) { - if (type == null) return null; - if (type.getAnnotation(FunctionalInterface.class) != null) return type; - for (Class iface : type.getInterfaces()) { - final Class result = findFunctionalInterface(iface); - if (result != null) return result; - } - return findFunctionalInterface(type.getSuperclass()); - } - - private static boolean checkValidity(Parameter param, String name, - Class type, boolean isFinal, Set names, - ArrayList problems) - { - boolean valid = true; - - final boolean isMessage = param.visibility() == ItemVisibility.MESSAGE; - if (isFinal && !isMessage) { - // NB: Final parameters are bad because they cannot be modified. - final String error = "Invalid final parameter: " + name; - problems.add(new ValidityProblem(error)); - valid = false; - } - - if (names.contains(name)) { - // NB: Shadowed parameters are bad because they are ambiguous. - final String error = "Invalid duplicate parameter: " + name; - problems.add(new ValidityProblem(error)); - valid = false; - } - - if ((param.itemIO() == ItemIO.MUTABLE || param.itemIO() == ItemIO.CONTAINER) && isImmutable(type)) { - // NB: The MUTABLE and CONTAINER types signify that the parameter - // will be written to, but immutable parameters cannot be changed in - // such a manner, so it makes no sense to label them as such. - final String error = "Immutable " + param.itemIO() + " parameter: " + name + " (" + type.getName() + " is immutable)"; - problems.add(new ValidityProblem(error)); - valid = false; - } - - return valid; - } - - /** - * Attempts to find the single functional method of the specified - * class, by scanning the for functional interfaces. If there - * is no functional interface, null will be returned. - * - * @param cls - * @return - */ - private static Method findFunctionalMethod(Class cls) { - Class iFace = findFunctionalInterface(cls); - if (iFace == null) { - return null; - } - - List nonDefaults = Arrays.stream(iFace.getMethods()) - .filter(m -> !m.isDefault()).collect(Collectors.toList()); - - // The single non default method must be the functional one - if (nonDefaults.size() != 1) { - for (Class i : iFace.getInterfaces()) { - final Method result = findFunctionalMethod(i); - if (result != null) return result; - } - } - - return nonDefaults.get(0); - } -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/Parameters.java b/scijava/scijava-ops/src/main/java/org/scijava/param/Parameters.java deleted file mode 100644 index 826b83874..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/Parameters.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * #%L - * SciJava Common shared library for SciJava software. - * %% - * Copyright (C) 2009 - 2017 Board of Regents of the University of - * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck - * Institute of Molecular Cell Biology and Genetics. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.param; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Container annotation type for repeated @{@link Parameter} annotations. - * - * @author Curtis Rueden - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.FIELD, ElementType.TYPE, ElementType.METHOD }) -public @interface Parameters { - Parameter[] value(); -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/ValidityProblem.java b/scijava/scijava-ops/src/main/java/org/scijava/param/ValidityProblem.java deleted file mode 100644 index 89cf665b5..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/ValidityProblem.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * #%L - * SciJava Common shared library for SciJava software. - * %% - * Copyright (C) 2009 - 2017 Board of Regents of the University of - * Wisconsin-Madison, Broad Institute of MIT and Harvard, Max Planck - * Institute of Molecular Cell Biology and Genetics, University of - * Konstanz, and KNIME GmbH. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.param; - -import org.scijava.Validated; - -/** - * An exception used to record a validity problem with a {@link Validated} - * object. - *

- * Unlike most exceptions, {@code ValidityException} is typically not thrown, - * but rather only recorded for future reference. - *

- * - * @author Curtis Rueden - */ -public class ValidityProblem extends Exception { - - public ValidityProblem() { - super(); - } - - public ValidityProblem(final String s) { - super(s); - } - - public ValidityProblem(final String s, final Throwable cause) { - super(s, cause); - } - - public ValidityProblem(final Throwable cause) { - super(cause); - } - -} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/Structs.java b/scijava/scijava-ops/src/main/java/org/scijava/struct/Structs.java deleted file mode 100644 index ce65d4171..000000000 --- a/scijava/scijava-ops/src/main/java/org/scijava/struct/Structs.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.scijava.struct; - -public final class Structs { - - private Structs() { - // NB: Prevent instantiation of utility class. - } - - public static StructInstance expand(final StructInstance parent, - final String key) - { - return expand(parent.member(key)); - } - - public static StructInstance expand( - final MemberInstance memberInstance) - { - if (!memberInstance.member().isStruct()) return null; - return memberInstance.member().childStruct().createInstance(// - memberInstance.get()); - } -} diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.list b/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.list deleted file mode 100644 index 0aec8c9c2..000000000 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/adapt/functional/FunctionsToComputers.list +++ /dev/null @@ -1,4 +0,0 @@ -.include templates/main/java/org/scijava/ops/util/Globals.list -arities = (1..maxArity).collect() - -[FunctionsToComputers.java] diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/ComputerUtils.list b/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/ComputerUtils.list deleted file mode 100644 index cbfb06e6c..000000000 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/ComputerUtils.list +++ /dev/null @@ -1,24 +0,0 @@ -.include Globals.list -arities = (0..maxArity).collect() - -[ComputerUtils.java] -nilArgs = ``` -{ arity -> - names = nilNames(arity) - outType = names.remove(names.size() - 1) - names = [outType] + names - String.join(', ', names) -} -``` -matchParams = ``` -{ arity -> - // contains "I1, I2, ..., IN, O" - generics = genericParamTypes(arity) - // contains "in1, in2, ..., inN, out" - names = nilNames(arity) - // constructing strings of the term "final Nil in1" - nilArgs = (0..arity).stream().map{a -> "final Nil<${generics[a]}> ${names[a]}"}.collect() - String.join(', ', nilArgs) -} -``` - diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/ComputerUtils.vm b/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/ComputerUtils.vm deleted file mode 100644 index cc07a76ad..000000000 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/ComputerUtils.vm +++ /dev/null @@ -1,114 +0,0 @@ -/* - * This is autogenerated source code -- DO NOT EDIT. Instead, edit the - * corresponding template in templates/ and rerun bin/generate.groovy. - */ - -package org.scijava.ops.util; - -import com.google.common.collect.BiMap; -import com.google.common.collect.ImmutableBiMap; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Consumer; - -import org.scijava.function.Computers; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Container class for computer-style functional interfaces at various - * arities. - *

- * A computer has functional method {@code compute} with a number of arguments - * corresponding to the arity, plus an additional argument for the preallocated - * output to be populated by the computation. - *

- *

- * Each computer interface implements a corresponding {@link Consumer}-style - * interface (see {@link Consumers}) with arity+1; the consumer's {@code accept} - * method simply delegates to {@code compute}. This pattern allows computer ops - * to be used directly as consumers as needed. - *

- * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public final class ComputerUtils { - - private ComputerUtils() { - // NB: Prevent instantiation of utility class. - } - - /** - * All known computer types and their arities. The entries are sorted by - * arity, i.e., the {@code i}-th entry has an arity of {@code i}. - */ - public static final BiMap, Integer> ALL_COMPUTERS; - - static { - final Map, Integer> computers = new HashMap<>(); -#foreach($arity in $arities) - computers.put(Computers.Arity${arity}.class, $arity); -#end - ALL_COMPUTERS = ImmutableBiMap.copyOf(computers); - } - - /** - * @return {@code true} if the given type is a {@link #ALL_COMPUTERS known} - * computer type, {@code false} otherwise.
- * Note that only the type itself and not its type hierarchy is - * considered. - * @throws NullPointerException If {@code type} is {@code null}. - */ - public static boolean isComputer(Type type) { - return ALL_COMPUTERS.containsKey(Types.raw(type)); - } - -#foreach($arity in [0..$maxArity]) - @SuppressWarnings("unchecked") - public static $generics.call($arity) $computerArity.call($arity)$generics.call($arity) match(final OpEnvironment env, final String opName, $matchParams.call($arity)) - { - return matchHelper(env, opName, ${computerArity.call($arity)}.class, $nilArgs.call($arity)); - } - -#end -#foreach($arity in [0..$maxArity]) - @SuppressWarnings("unchecked") - public static $generics.call($arity) $computerArity.call($arity)$generics.call($arity) match(final OpEnvironment env, final String opName, $matchParams.call($arity), final Hints hints) - { - return matchHelper(env, opName, hints, ${computerArity.call($arity)}.class, $nilArgs.call($arity)); - } - -#end - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - final Nil[] nils = new Nil[inTypes.length + 1]; - System.arraycopy(inTypes, 0, nils, 0, inTypes.length); - nils[nils.length - 1] = outType; - return (T) env.op(opName, Nil.of(specialType), nils, outType); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Hints hints, final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - final Nil[] nils = new Nil[inTypes.length + 1]; - System.arraycopy(inTypes, 0, nils, 0, inTypes.length); - nils[nils.length - 1] = outType; - return (T) env.op(opName, Nil.of(specialType), nils, outType, hints); - } -} diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/FunctionUtils.vm b/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/FunctionUtils.vm deleted file mode 100644 index af0e19b48..000000000 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/FunctionUtils.vm +++ /dev/null @@ -1,119 +0,0 @@ -/* - * This is autogenerated source code -- DO NOT EDIT. Instead, edit the - * corresponding template in templates/ and rerun bin/generate.groovy. - */ - -package org.scijava.ops.util; - -import com.google.common.collect.BiMap; -import com.google.common.collect.ImmutableBiMap; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.Map; -import java.util.function.BiFunction; -import java.util.function.Function; - -import org.scijava.function.Functions; -import org.scijava.function.Producer; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Utility class designed to match {@code Function}s of various arities. - * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public final class FunctionUtils { - - private FunctionUtils() { - // NB: Prevent instantiation of utility class. - } - - /** - * All known function types and their arities. The entries are sorted by - * arity, i.e., the {@code i}-th entry has an arity of {@code i}. - */ - public static final BiMap> ALL_FUNCTIONS; - - static { - final Map> functions = new HashMap<>(10); -#foreach($arity in [0..$maxArity]) - functions.put($arity, ${functionArity.call($arity)}.class); -#end - ALL_FUNCTIONS = ImmutableBiMap.copyOf(functions); - } - - /** - * @return {@code true} if the given type is a {@link #ALL_FUNCTIONS known} - * function type, {@code false} otherwise.
- * Note that only the type itself and not its type hierarchy is - * considered. - * @throws NullPointerException If {@code type} is {@code null}. - */ - public static boolean isFunction(Type type) { - return ALL_FUNCTIONS.containsValue(Types.raw(type)); - } - -#foreach($arity in [0..$maxArity]) - @SuppressWarnings({ "unchecked" }) - public static $generics.call($arity) $functionArity.call($arity)$generics.call($arity) match(final OpEnvironment env, final String opName, $matchParams.call($arity)) - { - return matchHelper(env, opName, ${functionArity.call($arity)}.class, $nilArgs.call($arity)); - } - -#end -#foreach($arity in [0..$maxArity]) - @SuppressWarnings({ "unchecked" }) - public static $generics.call($arity) $functionArity.call($arity)$generics.call($arity) match(final OpEnvironment env, final String opName, $matchParams.call($arity), final Hints hints) - { - return matchHelper(env, opName, hints, ${functionArity.call($arity)}.class, $nilArgs.call($arity)); - } - -#end - @SuppressWarnings({ "unchecked" }) - public static Functions.ArityN matchN(final OpEnvironment env, - final String opName, final Nil outType, final Nil... inTypes) - { - Object op = matchHelper(env, opName, ALL_FUNCTIONS.get(inTypes.length), - outType, inTypes); - if (op instanceof Producer) { - return Functions.nary((Producer) op); - } -#set($maxMinusOne = $maxArity - 1) -#foreach($arity in [1..$maxMinusOne]) - else if (op instanceof $functionArity.call($arity)) { - return Functions.nary(($functionArity.call($arity)$objectGenerics.call($arity)) op); - } -#end - return Functions.nary(($functionArity.call($maxArity)$objectGenerics.call($maxArity)) op); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Hints hints, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length + 1]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - types[types.length - 1] = outType.getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); - } - -} diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/InplaceUtils.list b/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/InplaceUtils.list deleted file mode 100644 index 0cb053054..000000000 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/InplaceUtils.list +++ /dev/null @@ -1,83 +0,0 @@ -.include Globals.list -arities = (1..maxArity).collect() - -[InplaceUtils.java] -simplifiedClass = ``` -{ arity, num -> - simplifiedInplace(arity, num) + '.class' -} -``` -inplaceClass = ``` -{ arity, num -> - inplaceType(arity, num) + '.class' -} -``` -typeVarNums = ``` -{ arity, io -> - (1..arity).subList(0, io - 1) + 'O' + (1..arity).subList(io, arity) -} -``` -genericsList = ``` -{ arity, io -> - typeVarNums(arity, io).stream().map{a -> "I$a"}.collect() -} -``` -generics = ``` -{ arity, io -> - '<' + String.join(', ', genericsList(arity, io)) + '>' -} -``` -allMutableGenericsList = ``` -{ arity -> - (1..arity).stream().map{a -> "IO$a"}.collect() -} -``` -allMutableGenerics = ``` -{ arity -> - '<' + String.join(', ', allMutableGenericsList.call(arity)) + '>' -} -``` -basicParamsList = ``` -{ arity, io -> - typeVarNums(arity, io).stream().map{a -> a == 'O' ? "ioType" : "in${a}Type"}.collect() -} -``` -basicParams = ``` -{ arity, io -> - String.join(', ', basicParamsList(arity, io)) -} -``` -matchName = ``` -{ arity, num -> - arity == 1 ? "match" : - "match${num}" -} -``` -matchParams = ``` -{ arity, io -> - String.join(', ', genericsList(arity, io).stream().map{a -> - a.charAt(1) == 'O'? - "final Nil<$a> ${a.toLowerCase()}Type" : - "final Nil<$a> in${a.substring(1)}Type"}.collect()) -} -``` -typeArgs = ``` -{ arity, io -> - String.join(', ', basicParamsList(arity, io).stream().map{a -> "${a}.getType()"}.collect()) -} -``` -allMutableMutateParams = ``` -{ arity -> - String.join(', ', allMutableGenericsList(arity).stream().map{a -> "@Mutable $a ${a.toLowerCase()}"}.collect()) -} -``` -allMutableMutateArgs = ``` -{ arity -> - String.join(', ', allMutableGenericsList(arity).stream().map{a -> "${a.toLowerCase()}"}.collect()) -} -``` -mutateArgs = ``` -{ arity, io -> - String.join(', ', genericsList(arity, io).stream().map{a -> a.substring(1) == 'O' ? "@Mutable IO io" : "$a in${a.substring(1)}"}.collect()) - } -``` diff --git a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/InplaceUtils.vm b/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/InplaceUtils.vm deleted file mode 100644 index c6dfd4bd5..000000000 --- a/scijava/scijava-ops/templates/main/java/org/scijava/ops/util/InplaceUtils.vm +++ /dev/null @@ -1,156 +0,0 @@ -/* - * This is autogenerated source code -- DO NOT EDIT. Instead, edit the - * corresponding template in templates/ and rerun bin/generate.groovy. - */ - -package org.scijava.ops.util; - -import java.lang.reflect.Type; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.function.Consumer; -import java.util.stream.Collectors; - -import org.scijava.function.Inplaces; -import org.scijava.function.Mutable; -import org.scijava.ops.OpEnvironment; -import org.scijava.ops.hints.Hints; -import org.scijava.types.Nil; -import org.scijava.types.Types; - -/** - * Container class for inplace-style functional interfaces at various - * arities. - *

- * An inplace has functional method {@code mutate} with a number of arguments - * corresponding to the arity. Any of the arguments annotated - * with @{@link Mutable} may be mutated during execution. Some interfaces narrow - * this behavior to only a specific argument; most ops in practice will - * implement one of these narrowed interfaces. For example, - * {@link Inplaces.Arity2_1} is a binary inplace op that mutates the first of - * two arguments—e.g., an {@code a /= b} division operation would be an - * {@link Inplaces.Arity2_1}, whereas {@code b = a / b} would be an - * {@link Inplaces.Arity2_2}. - *

- *

- * Each inplace interface implements a corresponding {@link Consumer}-style - * interface (see {@link Consumers}) with same arity; the consumer's - * {@code accept} method simply delegates to {@code mutate}. This pattern allows - * inplace ops to be used directly as consumers as needed. - *

- *

- * Note that there is no nullary (arity 0) inplace interface, because there - * would be no arguments to mutate; see also {@link Consumers.Arity0}, - * {@link Computers.Arity0} and {@link Producer}. - *

- * - * @author Curtis Rueden - * @author Gabriel Selzer - */ -public final class InplaceUtils { - - private InplaceUtils() { - // NB: Prevent instantiation of container class. - } - - /** - * All known inplace types and their arities and mutable positions. The - * entries are sorted by arity and mutable position. - */ - public static final Map, InplaceInfo> ALL_INPLACES; - - static { - final Map, InplaceInfo> inplaces = new LinkedHashMap<>(22); -#foreach($arity in $arities) -#foreach($a in [1..$arity]) -#set($inplaceIndex = $a - 1) - inplaces.put($inplaceClass.call($arity, $a), new InplaceInfo(${arity}, $inplaceIndex)); -#end -#end - ALL_INPLACES = Collections.unmodifiableMap(inplaces); - } - - /** - * @return {@code true} if the given type is a {@link #ALL_INPLACES known} - * inplace type, {@code false} otherwise.
- * Note that only the type itself and not its type hierarchy is - * considered. - * @throws NullPointerException If {@code type} is {@code null}. - */ - public static boolean isInplace(Type type) { - return ALL_INPLACES.containsKey(Types.raw(type)); - } - - public static List> getInplacesOfArity(final int arity) { - return ALL_INPLACES.entrySet().stream() // - .filter(e -> e.getValue().arity() == arity) // - .map(Entry, InplaceInfo>::getKey) // - .collect(Collectors.toList()); - } - -#foreach($arity in $arities) -#foreach($a in [1..$arity]) - @SuppressWarnings({ "unchecked" }) - public static $generics.call($arity, $a) $inplaceType.call($arity, $a)$generics.call($arity, $a) $matchName.call($arity, $a)(final OpEnvironment env, final String opName, $matchParams.call($arity, $a)) - { - return matchHelper(env, opName, ${inplaceClass.call($arity, $a)}, ioType, new Nil[] {${basicParams.call($arity, $a)}}); - } - -#end -#end - -#foreach($arity in $arities) -#foreach($a in [1..$arity]) - @SuppressWarnings({ "unchecked" }) - public static $generics.call($arity, $a) $inplaceType.call($arity, $a)$generics.call($arity, $a) $matchName.call($arity, $a)(final OpEnvironment env, final String opName, $matchParams.call($arity, $a), final Hints hints) - { - return matchHelper(env, opName, hints, ${inplaceType.call($arity, $a)}.class, ioType, new Nil[] {${basicParams.call($arity, $a)}}); - } - -#end -#end - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType); - } - - @SuppressWarnings({ "unchecked" }) - private static T matchHelper(final OpEnvironment env, final String opName, final Hints hints, - final Class opClass, final Nil outType, final Nil... inTypes) - { - final Type[] types = new Type[inTypes.length]; - for (int i = 0; i < inTypes.length; i++) - types[i] = inTypes[i].getType(); - final Type specialType = Types.parameterize(opClass, types); - return (T) env.op(opName, Nil.of(specialType), inTypes, outType, hints); - } - - public static class InplaceInfo { - - private final int arity; - private final int mutablePosition; - - public InplaceInfo(final int arity, final int mutablePosition) { - this.arity = arity; - this.mutablePosition = mutablePosition; - } - - public int arity() { - return arity; - } - - public int mutablePosition() { - return mutablePosition; - } - } - -} diff --git a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Circle.java b/scijava/scijava-persist/src/test/java/org/scijava/persist/Circle.java similarity index 58% rename from scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Circle.java rename to scijava/scijava-persist/src/test/java/org/scijava/persist/Circle.java index 862fc599d..b7e9735ba 100644 --- a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Circle.java +++ b/scijava/scijava-persist/src/test/java/org/scijava/persist/Circle.java @@ -1,5 +1,5 @@ -package org.scijava.persist.testobjects; +package org.scijava.persist; public class Circle implements Shape { diff --git a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/CircleAdapter.java b/scijava/scijava-persist/src/test/java/org/scijava/persist/CircleAdapter.java similarity index 90% rename from scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/CircleAdapter.java rename to scijava/scijava-persist/src/test/java/org/scijava/persist/CircleAdapter.java index 8eebecb2e..cb31e4722 100644 --- a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/CircleAdapter.java +++ b/scijava/scijava-persist/src/test/java/org/scijava/persist/CircleAdapter.java @@ -1,5 +1,5 @@ -package org.scijava.persist.testobjects; +package org.scijava.persist; import org.scijava.persist.IClassRuntimeAdapter; import org.scijava.plugin.Plugin; diff --git a/scijava/scijava-persist/src/test/java/org/scijava/persist/SerializationTests.java b/scijava/scijava-persist/src/test/java/org/scijava/persist/SerializationTests.java index ce9e95137..db89d6aa2 100644 --- a/scijava/scijava-persist/src/test/java/org/scijava/persist/SerializationTests.java +++ b/scijava/scijava-persist/src/test/java/org/scijava/persist/SerializationTests.java @@ -7,9 +7,6 @@ import org.junit.Before; import org.junit.Test; import org.scijava.Context; -import org.scijava.persist.testobjects.Circle; -import org.scijava.persist.testobjects.Shape; -import org.scijava.persist.testobjects.Shapes; public class SerializationTests { @@ -43,7 +40,7 @@ public void closeFiji() throws Exception { } /** - * Test {@link org.scijava.persist.testobjects.CircleAdapter} + * Test {@link org.scijava.persist.CircleAdapter} */ @Test public void testCircleObject() { @@ -52,7 +49,7 @@ public void testCircleObject() { } /** - * Test adapters located in {@link org.scijava.persist.testobjects.Shapes} + * Test adapters located in {@link org.scijava.persist.Shapes} */ @Test public void testDrawingObject() { diff --git a/scijava/scijava-persist/src/test/java/org/scijava/persist/Shape.java b/scijava/scijava-persist/src/test/java/org/scijava/persist/Shape.java new file mode 100644 index 000000000..d65f73755 --- /dev/null +++ b/scijava/scijava-persist/src/test/java/org/scijava/persist/Shape.java @@ -0,0 +1,4 @@ + +package org.scijava.persist; + +public interface Shape {} diff --git a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Shapes.java b/scijava/scijava-persist/src/test/java/org/scijava/persist/Shapes.java similarity index 96% rename from scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Shapes.java rename to scijava/scijava-persist/src/test/java/org/scijava/persist/Shapes.java index 3e45b8eed..d222cc4ed 100644 --- a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Shapes.java +++ b/scijava/scijava-persist/src/test/java/org/scijava/persist/Shapes.java @@ -1,5 +1,5 @@ -package org.scijava.persist.testobjects; +package org.scijava.persist; import org.scijava.persist.IClassRuntimeAdapter; import org.scijava.plugin.Plugin; diff --git a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Shape.java b/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Shape.java deleted file mode 100644 index fda4e4d18..000000000 --- a/scijava/scijava-persist/src/test/java/org/scijava/persist/testobjects/Shape.java +++ /dev/null @@ -1,4 +0,0 @@ - -package org.scijava.persist.testobjects; - -public interface Shape {} diff --git a/scijava/scijava-struct/pom.xml b/scijava/scijava-struct/pom.xml new file mode 100644 index 000000000..100837683 --- /dev/null +++ b/scijava/scijava-struct/pom.xml @@ -0,0 +1,109 @@ + + + 4.0.0 + + + org.scijava + scijava-incubator + 0-SNAPSHOT + ../.. + + + scijava-struct + + SciJava Struct + A lightweight framework for collecting Members + https://github.com/scijava/incubator + 2021 + + SciJava + https://scijava.org/ + + + + Simplified BSD License + repo + + + + + + ctrueden + Curtis Rueden + https://imagej.net/User:Rueden + + founder + lead + reviewer + support + maintainer + + + + gselzer + Gabriel Selzer + + founder + developer + debugger + reviewer + support + + + + + + + None + + + + + + Image.sc Forum + https://forum.image.sc/tags/scijava-struct + + + + + scm:git:git://github.com/scijava/incubator + scm:git:git@github.com:scijava/incubator + HEAD + https://github.com/scijava/incubator + + + GitHub Issues + https://github.com/scijava/scijava-struct/issues + + + Travis CI + https://travis-ci.com/scijava/incubator + + + + org.scijava.struct + + bsd_2 + SciJava developers. + + + + + + org.scijava + scijava-common + + + org.scijava + scijava-types + ${project.version} + + + + + + + diff --git a/scijava/scijava-struct/src/main/java/module-info.java b/scijava/scijava-struct/src/main/java/module-info.java new file mode 100644 index 000000000..aee8a31c1 --- /dev/null +++ b/scijava/scijava-struct/src/main/java/module-info.java @@ -0,0 +1,7 @@ +module org.scijava.struct { + + exports org.scijava.struct; + + requires org.scijava.types; + requires org.scijava; +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/DefaultStructInstance.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/DefaultStructInstance.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/DefaultStructInstance.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/DefaultStructInstance.java diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/FunctionalMethodType.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/FunctionalMethodType.java similarity index 89% rename from scijava/scijava-ops/src/main/java/org/scijava/param/FunctionalMethodType.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/FunctionalMethodType.java index 75b325407..7b96dcb11 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/FunctionalMethodType.java +++ b/scijava/scijava-struct/src/main/java/org/scijava/struct/FunctionalMethodType.java @@ -1,8 +1,7 @@ -package org.scijava.param; +package org.scijava.struct; import java.lang.reflect.Type; -import org.scijava.struct.ItemIO; /** * Wrapper to pair a type of a method signature with its {@link ItemIO}. diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/ItemIO.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/ItemIO.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/ItemIO.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/ItemIO.java diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/Member.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/Member.java similarity index 92% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/Member.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/Member.java index ce61ad230..1c00d547b 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/struct/Member.java +++ b/scijava/scijava-struct/src/main/java/org/scijava/struct/Member.java @@ -16,6 +16,9 @@ public interface Member { /** Unique name of the member. */ String getKey(); + /** Description of the member. */ + String getDescription(); + /** * Gets the type of the member, including Java generic parameters. * @@ -51,6 +54,10 @@ default boolean isStruct() { return false; } + default boolean isRequired() { + return true; + } + default Struct childStruct() { return null; } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/MemberInstance.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/MemberInstance.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/MemberInstance.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/MemberInstance.java diff --git a/scijava/scijava-struct/src/main/java/org/scijava/struct/MemberParser.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/MemberParser.java new file mode 100644 index 000000000..0afbb6ecc --- /dev/null +++ b/scijava/scijava-struct/src/main/java/org/scijava/struct/MemberParser.java @@ -0,0 +1,27 @@ + +package org.scijava.struct; + +import java.lang.reflect.Type; +import java.util.List; + +/** + * Parses a set of {@link Member}s from a source {@link Object} + * + * @author Gabriel Selzer + * @param The {@link Type} of {@link Object}s parsable by this parser + * @param The {@link Type} of {@link Member}s returned by this parser + */ +public interface MemberParser> { + + /** + * parses {@code source} for a {@link List} of {@link Member}s, which is then + * returned + * + * @param source the {@link Object} to parse + * @return a {@link List} of {@link Member}s parsed from {@code source} + * @throws {@link ValidityException} when the source of the {@link Member}s is + * improperly declared, formatted + */ + List parse(S source) throws ValidityException; + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/Struct.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/Struct.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/Struct.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/Struct.java diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/StructInstance.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/StructInstance.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/StructInstance.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/StructInstance.java diff --git a/scijava/scijava-struct/src/main/java/org/scijava/struct/Structs.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/Structs.java new file mode 100644 index 000000000..87797093a --- /dev/null +++ b/scijava/scijava-struct/src/main/java/org/scijava/struct/Structs.java @@ -0,0 +1,106 @@ + +package org.scijava.struct; + +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.scijava.ValidityProblem; +import org.scijava.types.Types; + +public final class Structs { + + private Structs() { + // NB: Prevent instantiation of utility class. + } + + public static StructInstance expand(final StructInstance parent, + final String key) + { + return expand(parent.member(key)); + } + + public static StructInstance expand( + final MemberInstance memberInstance) + { + if (!memberInstance.member().isStruct()) return null; + return memberInstance.member().childStruct().createInstance(// + memberInstance.get()); + } + + @SafeVarargs + public static Struct from(S source, List problems, + MemberParser>... parsers) + { + List> members = new ArrayList<>(); + for (MemberParser> p : parsers) { + try { + members.addAll(p.parse(source)); + } + catch (ValidityException e) { + problems.addAll(e.problems()); + } + } + return () -> members; + } + + /** + * Helper to check for several modifiers at once. + * + * @param message + * @param problems + * @param actualModifiers + * @param requiredModifiers + */ + public static void checkModifiers(String message, final ArrayList problems, + final int actualModifiers, final boolean negate, final int... requiredModifiers) { + for (int mod : requiredModifiers) { + if (negate) { + if ((actualModifiers & mod) != 0) { + problems.add( + new ValidityProblem(message + "Illegal modifier. Must not be " + Modifier.toString(mod))); + } + } else { + if ((actualModifiers & mod) == 0) { + problems.add(new ValidityProblem(message + "Illegal modifier. Must be " + Modifier.toString(mod))); + } + } + } + } + + public static boolean checkValidity(Member m, String name, Class type, + boolean isFinal, Set names, ArrayList problems) + { + boolean valid = true; + + if (names.contains(name)) { + // NB: Shadowed parameters are bad because they are ambiguous. + final String error = "Invalid duplicate parameter: " + name; + problems.add(new ValidityProblem(error)); + valid = false; + } + + if ((m.getIOType() == ItemIO.MUTABLE || m + .getIOType() == ItemIO.CONTAINER) && Structs.isImmutable(type)) + { + // NB: The MUTABLE and CONTAINER types signify that the parameter + // will be written to, but immutable parameters cannot be changed in + // such a manner, so it makes no sense to label them as such. + final String error = "Immutable " + m.getIOType() + " parameter: " + + name + " (" + type.getName() + " is immutable)"; + problems.add(new ValidityProblem(error)); + valid = false; + } + + return valid; + } + + public static boolean isImmutable(final Class type) { + // NB: All eight primitive types, as well as the boxed primitive + // wrapper classes, as well as strings, are immutable objects. + return Types.isNumber(type) || Types.isText(type) || // + Types.isBoolean(type); + } + +} diff --git a/scijava/scijava-ops/src/main/java/org/scijava/param/ValidityException.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/ValidityException.java similarity index 74% rename from scijava/scijava-ops/src/main/java/org/scijava/param/ValidityException.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/ValidityException.java index 01e238c8d..e19f8e9d5 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/param/ValidityException.java +++ b/scijava/scijava-struct/src/main/java/org/scijava/struct/ValidityException.java @@ -1,11 +1,14 @@ -package org.scijava.param; +package org.scijava.struct; import java.util.Collections; import java.util.List; +import org.scijava.ValidityProblem; + /** * hasdjf * + * TODO: move upstream with {@link ValidityProblem} * @author Curtis Rueden */ public final class ValidityException extends Exception { @@ -16,10 +19,11 @@ public ValidityException(final String message) { this(Collections.singletonList(new ValidityProblem(message))); } - public ValidityException(final List problems) { + public ValidityException(@SuppressWarnings("exports") final List problems) { this.problems = problems; } + @SuppressWarnings("exports") public List problems() { return problems; } diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/ValueAccessible.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/ValueAccessible.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/ValueAccessible.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/ValueAccessible.java diff --git a/scijava/scijava-ops/src/main/java/org/scijava/struct/ValueAccessibleMemberInstance.java b/scijava/scijava-struct/src/main/java/org/scijava/struct/ValueAccessibleMemberInstance.java similarity index 100% rename from scijava/scijava-ops/src/main/java/org/scijava/struct/ValueAccessibleMemberInstance.java rename to scijava/scijava-struct/src/main/java/org/scijava/struct/ValueAccessibleMemberInstance.java diff --git a/scijava/scijava-taglets/pom.xml b/scijava/scijava-taglets/pom.xml new file mode 100644 index 000000000..67c441837 --- /dev/null +++ b/scijava/scijava-taglets/pom.xml @@ -0,0 +1,80 @@ + + + 4.0.0 + + + org.scijava + scijava-incubator + 0-SNAPSHOT + ../.. + + + scijava-taglets + + SciJava Taglets + SciJava Taglets: custom javadoc taglets. + https://github.com/scijava/scijava-taglets + 2021 + + SciJava + https://scijava.org/ + + + + Simplified BSD License + repo + + + + + + ctrueden + Curtis Rueden + https://imagej.net/User:Rueden + + founder + lead + reviewer + support + maintainer + + + + + + None + + + + + + Image.sc Forum + https://forum.image.sc/tags/scijava + + + + + scm:git:git://github.com/scijava/incubator + scm:git:git@github.com:scijava/incubator + HEAD + https://github.com/scijava/incubator + + + GitHub Issues + https://github.com/scijava/scijava/issues + + + Travis CI + https://travis-ci.com/scijava/incubator + + + + org.scijava.taglets + + bsd_2 + SciJava developers. + + + + + diff --git a/scijava/scijava-taglets/src/main/java/org/scijava/taglets/ContainerTaglet.java b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/ContainerTaglet.java new file mode 100644 index 000000000..5b01c5322 --- /dev/null +++ b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/ContainerTaglet.java @@ -0,0 +1,21 @@ +package org.scijava.taglets; + +import java.util.Map; + +import jdk.javadoc.doclet.Taglet; + +/** + * A taglet handling {@code @container} tags. + * + * @author Curtis Rueden + */ +public class ContainerTaglet extends ParamTaglet { + + public static void register(Map tagletMap) { + new ContainerTaglet().registerMe(tagletMap); + } + + public ContainerTaglet() { + super("Container"); + } +} \ No newline at end of file diff --git a/scijava/scijava-taglets/src/main/java/org/scijava/taglets/InputTaglet.java b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/InputTaglet.java new file mode 100644 index 000000000..44d0b9799 --- /dev/null +++ b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/InputTaglet.java @@ -0,0 +1,21 @@ +package org.scijava.taglets; + +import java.util.Map; + +import jdk.javadoc.doclet.Taglet; + +/** + * A taglet handling {@code @input} tags. + * + * @author Curtis Rueden + */ +public class InputTaglet extends ParamTaglet { + + public static void register(Map tagletMap) { + new InputTaglet().registerMe(tagletMap); + } + + public InputTaglet() { + super("Input"); + } +} \ No newline at end of file diff --git a/scijava/scijava-taglets/src/main/java/org/scijava/taglets/MutableTaglet.java b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/MutableTaglet.java new file mode 100644 index 000000000..357c6919b --- /dev/null +++ b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/MutableTaglet.java @@ -0,0 +1,21 @@ +package org.scijava.taglets; + +import java.util.Map; + +import jdk.javadoc.doclet.Taglet; + +/** + * A taglet handling {@code @mutable} tags. + * + * @author Curtis Rueden + */ +public class MutableTaglet extends ParamTaglet { + + public static void register(Map tagletMap) { + new MutableTaglet().registerMe(tagletMap); + } + + public MutableTaglet() { + super("Mutable"); + } +} \ No newline at end of file diff --git a/scijava/scijava-taglets/src/main/java/org/scijava/taglets/OpDependencyTaglet.java b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/OpDependencyTaglet.java new file mode 100644 index 000000000..9e9ce025b --- /dev/null +++ b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/OpDependencyTaglet.java @@ -0,0 +1,21 @@ +package org.scijava.taglets; + +import java.util.Map; + +import jdk.javadoc.doclet.Taglet; + +/** + * A taglet handling {@code @dependency} tags. + * + * @author Gabriel Selzer + */ +public class OpDependencyTaglet extends ParamTaglet { + + public static void register(Map tagletMap) { + new OpDependencyTaglet().registerMe(tagletMap); + } + + public OpDependencyTaglet() { + super("Dependency"); + } +} \ No newline at end of file diff --git a/scijava/scijava-taglets/src/main/java/org/scijava/taglets/OutputTaglet.java b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/OutputTaglet.java new file mode 100644 index 000000000..ab88a1033 --- /dev/null +++ b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/OutputTaglet.java @@ -0,0 +1,21 @@ +package org.scijava.taglets; + +import java.util.Map; + +import jdk.javadoc.doclet.Taglet; + +/** + * A taglet handling {@code @output} tags. + * + * @author Curtis Rueden + */ +public class OutputTaglet extends ParamTaglet { + + public static void register(Map tagletMap) { + new OutputTaglet().registerMe(tagletMap); + } + + public OutputTaglet() { + super("Output"); + } +} \ No newline at end of file diff --git a/scijava/scijava-taglets/src/main/java/org/scijava/taglets/ParamTaglet.java b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/ParamTaglet.java new file mode 100644 index 000000000..06a55c661 --- /dev/null +++ b/scijava/scijava-taglets/src/main/java/org/scijava/taglets/ParamTaglet.java @@ -0,0 +1,69 @@ +package org.scijava.taglets; + +import com.sun.source.doctree.DocTree; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import javax.lang.model.element.Element; + +import jdk.javadoc.doclet.Taglet; + +public abstract class ParamTaglet implements Taglet { + + private final String tagName; + private final String title; + + protected ParamTaglet(final String title) { + this.tagName = title.toLowerCase(); + this.title = title; + } + + @Override + public Set getAllowedLocations() { + return Collections.singleton(Location.FIELD); + } + + @Override + public boolean isInlineTag() { + return false; + } + + @Override + public String getName() { + return tagName; + } + + @Override + public String toString(List tags, Element element) { + return "\n
" + title + " parameters:
\n" + // + String.join("", tags.stream()// + .map(tag -> "
" + tagToHTML(tag) + "
\n")// + .collect(Collectors.toList())); + } + + /** Reformats the tag content to match the HTML we want to have. */ + private String tagToHTML(final DocTree tag) { + // Strip the leading tag string. + final String text = tag.toString().trim().replaceFirst("^@" + tagName, "").trim(); + // Extract parameter name. + final String paramName = text.replaceFirst("\\s.*", ""); + // Extract parameter description, if any. + final String description = text.substring(paramName.length()).trim(); + final String separator = description.isEmpty() ? "" : " - "; + // Slap together the HTML. + return "" + paramName + "" + separator + description; + } + + // NB: It would be great if we could just add multiple different instances + // of this ParamTaglet class, which could then be concrete, to the taglet + // map in a single static register method. Unfortunately, the taglet system + // does not actually use the instances you add to the map! Instead, it + // appears to construct new instances via an assumed no-args constructor? + protected void registerMe(final Map tagletMap) { + tagletMap.put(getName(), this); + } +} diff --git a/scijava/scijava-testutil/pom.xml b/scijava/scijava-testutil/pom.xml index 38fe0ade4..20addccfb 100644 --- a/scijava/scijava-testutil/pom.xml +++ b/scijava/scijava-testutil/pom.xml @@ -105,16 +105,6 @@ junit-jupiter-api compile - - org.junit.jupiter - junit-jupiter-engine - runtime - - - org.junit.vintage - junit-vintage-engine - runtime - diff --git a/scijava/scijava-types/pom.xml b/scijava/scijava-types/pom.xml index 2ba2bd147..915ca1cba 100644 --- a/scijava/scijava-types/pom.xml +++ b/scijava/scijava-types/pom.xml @@ -102,26 +102,16 @@ com.google.guava guava - - io.leangen.geantyref - geantyref - ${geantyref.version} - - org.junit.jupiter - junit-jupiter-api + junit + junit test org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.vintage - junit-vintage-engine + junit-jupiter-api test diff --git a/scijava/scijava-types/src/main/java/module-info.java b/scijava/scijava-types/src/main/java/module-info.java index 0a51f22fc..92fa052b8 100644 --- a/scijava/scijava-types/src/main/java/module-info.java +++ b/scijava/scijava-types/src/main/java/module-info.java @@ -1,6 +1,7 @@ module org.scijava.types { exports org.scijava.types; + exports org.scijava.types.inference; opens org.scijava.types.extractors to org.scijava; opens org.scijava.types to org.scijava; diff --git a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/MatchingUtils.java b/scijava/scijava-types/src/main/java/org/scijava/types/inference/GenericAssignability.java similarity index 57% rename from scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/MatchingUtils.java rename to scijava/scijava-types/src/main/java/org/scijava/types/inference/GenericAssignability.java index 0bf89a671..33f8fd093 100644 --- a/scijava/scijava-ops/src/main/java/org/scijava/ops/matcher/MatchingUtils.java +++ b/scijava/scijava-types/src/main/java/org/scijava/types/inference/GenericAssignability.java @@ -1,1216 +1,767 @@ -/* - * #%L - * SciJava Common shared library for SciJava software. - * %% - * Copyright (C) 2009 - 2017 Board of Regents of the University of - * Wisconsin-Madison, Broad Institute of MIT and Harvard, Max Planck - * Institute of Molecular Cell Biology and Genetics, University of - * Konstanz, and KNIME GmbH. - * %% - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * #L% - */ - -package org.scijava.ops.matcher; - -import com.google.common.base.Objects; - -import java.lang.reflect.GenericArrayType; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.lang.reflect.TypeVariable; -import java.lang.reflect.WildcardType; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.scijava.types.Any; -import org.scijava.types.Nil; -import org.scijava.types.Types; -import org.scijava.types.Types.TypeVarFromParameterizedTypeInfo; -import org.scijava.types.Types.TypeVarInfo; - -public final class MatchingUtils { - - private MatchingUtils() { - // prevent instantiation of utility class - } - - /** - * Checks for raw assignability. TODO This method is not yet fully - * implemented. The correct behavior should be as follows. Suppose we have a - * generic typed method like: - * - *
-	 *public static <N> List<N> foo(N in) {
-	 *	...
-	 *}
-	 * 
- * - * This method should discern if the following assignments would be legal, - * possibly using predetermined {@link TypeVariable} assignments: - * - *
-	 *List<Integer> listOfInts = foo(new Integer(0)) //legal
-	 *List<Number> listOfNumbers = foo(new Integer(0)) //legal
-	 *List<? extends Number> listOfBoundedWildcards = foo(new Integer(0)) //legal
-	 * 
- * - * The corresponding calls to this method would be: - * - *
-	 * Nil<List<N>> nilN = new Nil<List<N>>(){}
-	 * Nil<List<Integer>> nilInteger = new Nil<List<Integer>>(){}
-	 * Nil<List<Number>> nilNumber = new Nil<List<Number>>(){}
-	 * Nil<List<? extends Number>> nilWildcardNumber = new Nil<List<? extends Number>>(){}
-	 *
-	 * checkGenericOutputsAssignability(nilN.getType(), nilInteger.getType, ...)
-	 * checkGenericOutputsAssignability(nilN.getType(), nilNumber.getType, ...)
-	 * checkGenericOutputsAssignability(nilN.getType(), nilWildcardNumber.getType, ...)
-	 * 
- * - * Using a map where N was already bound to Integer (N -> Integer.class). This - * method is useful for the following scenario: During ops matching, we first - * check if the arguments (inputs) of the requested op are applicable to the - * arguments of an op candidate. During this process, possible type variables - * may be inferred. The can then be used with this method to find out if the - * outputs of the op candidate would be assignable to the output of the - * requested op. - * - * @param froms - * @param tos - * @param typeBounds - * @return the index {@code i} such that {@code from[i]} cannot be assigned to - * {@code to[i]}, or {@code -1} iff {@code from[i]} can be assigned to - * {@code to[i]} for all {@code 0 <= i < from.length}. - */ - static int checkGenericOutputsAssignability(Type[] froms, Type[] tos, - HashMap, TypeVarInfo> typeBounds) { - for (int i = 0; i < froms.length; i++) { - Type from = froms[i]; - Type to = tos[i]; - - if (to instanceof Any) continue; - - if (from instanceof TypeVariable) { - TypeVarInfo typeVarInfo = typeBounds.get(from); - // HACK: we CAN assign, for example, a Function, O> to a - // Function, Double>, - // because in this situation O is not bounded to any other types. However - // isAssignable will fail, - // since we cannot just cast Double to O without that required knowledge that O - // can be fixed to Double. - // We get around this by recording in typeBounds that our previously unbounded - // TypeVariable (from) \ - // is now fixed to (to), then simply assigning (from) to (to), since from only - // has one bound, being to. - if (typeVarInfo == null) { - TypeVariable fromTypeVar = (TypeVariable) from; - TypeVarFromParameterizedTypeInfo fromInfo = new TypeVarFromParameterizedTypeInfo(fromTypeVar); - fromInfo.fixBounds(to, true); - typeBounds.put(fromTypeVar, fromInfo); - from = to; - } - // similar to the above, if we know that O is already bound to a Type, and that - // Type is to, then we can assign this without any issues. - else { - if(typeVarInfo.allowType(to, true)) from = to; - } - } - - if (!Types.isAssignable(Types.raw(from), Types.raw(to))) - return i; - } - return -1; - } - - /** - * Checks whether it would be legal to assign the {@link Type} source to the - * specified {@link ParameterizedType} destination (which could possibly be a - * supertype of the source type). Thereby, possible {@link TypeVariable}s - * contained in the parameters of the source are tried to be inferred in the - * sense of empty angle brackets when a new object is created: - * - *
-	 * 
-	 * List<Integer> listOfInts = new ArrayList<>();
-	 * 
- * - * Hence, the types to put between the brackets are tried to be determined. - * Inference will be done by simple matching of an encountered - * {@link TypeVariable} in the source to the corresponding type in the - * parameters of the destination. If an {@link TypeVariable} is encountered - * more than once, the corresponding type in the destination needs to - * perfectly match. Else, false will be returned.
- *
- * Examples: - *
    - * If we have a class: - *
  • - * - *
    -	 * class NumberSupplier<M extends Number> implements Supplier<M>
    -	 * 
  • - *
- *
    - * The following check will return true: - *
  • - * - *
    -	 * checkGenericAssignability(NumberSupplier.class, new
    -	 * Nil<Supplier<Double>>() {}.getType())
  • - *
- * - *
    - * Which will check if the following assignment would be legal: - *
  • - * - *
    -	 * Supplier<Double> list = new NumberSupplier<>()
  • - *
- * - *
    - * Here, the parameter {@code } can be inferred to be of - * type {@code Double} from the type {@code Supplier} - *
- *
    - * Consequently the following will return false: - *
  • - * - *
    -	 * checkGenericAssignability(NumberSupplier.class, new
    -	 * Nil<Supplier<String>>() {}.getType())
  • - *
- *
    - * {@code } can't be inferred, as type {@code String} is not - * within the bounds of {@code M}. - *
- *
    - * Furthermore, the following will return false for: - * {@code class NumberFunc implements Function}: - *
  • - * - *
    -	 * checkGenericAssignability(NumberSupplier.class, new
    -	 * Nil<Function<Double, Integer>>() {}.getType())
  • - *
- *
    - * {@code } can't be inferred, as types {@code Double} and - * {@code Integer} are ambiguous for {@code M}. - *
- * - * @param src the type for which assignment should be checked from - * @param dest the parameterized type for which assignment should be checked - * to - * @param typeVarAssigns the map of {@link TypeVariable}s to {@link Type}s to - * populate with what would occur in this scenario; must be empty or - * null - * @param safeAssignability used to determine if we want to check if the - * src->dest assignment would be safely assignable even though it - * would cause a compiler error if we explicitly tried to do this - * (useful pretty much only for Op matching) - * @return whether and assignment of source to destination would be a legal - * java statement - */ - public static boolean checkGenericAssignability(Type src, - ParameterizedType dest, Map, Type> typeVarAssigns, - boolean safeAssignability) - { - if (typeVarAssigns == null) { - typeVarAssigns = new HashMap<>(); - } - else if (!typeVarAssigns.isEmpty()) { - throw new IllegalArgumentException( - "Expected empty typeVarAssigns but contained " + typeVarAssigns.size() + - " entries"); - } - - // fail fast when raw types are not assignable - if (!Types.isAssignable(Types.raw(src), Types.raw(dest))) return false; - - // when raw types are assignable, check the type variables of src and dest - Type[] srcTypes = typeParamsAgainstClass(src, Types.raw(dest)); - Type[] destTypes = dest.getActualTypeArguments(); - - // if there are no type parameters in src (w.r.t. dest), do a basic - // assignability check. - if (srcTypes.length == 0) return Types.isAssignable(src, dest); - // if there are type parameters, do a more complicated assignability check. - boolean result = checkGenericAssignability(srcTypes, destTypes, src, dest, - typeVarAssigns, safeAssignability); - return result; - } - - /** - * Obtains the type parameters of {@link Type} {@code src} with respect - * to the {@link Class} {@code dest}. When {@code src} has no type - * parameters (or is not a subclass of {@code dest}), an empty array is - * returned. - * - * @param src - the {@code Type} whose type parameters will be returned. - * @param superclass - the {@code Class} against which we want the type parameters of {@code src} - * @return an array of {@code Type}s denoting the type - */ - private static Type[] typeParamsAgainstClass(Type src, Class superclass) { - // only classes and ParameterizedTypes can have type parameters - if (!(src instanceof Class || src instanceof ParameterizedType)) return new Type[0]; - Type superSrc = superType(src, superclass); - if (superSrc == null) return new Type[0]; - if (superSrc instanceof ParameterizedType) return ((ParameterizedType) superSrc).getActualTypeArguments(); - return getParams(Types.raw(src), superclass); - } - - /** - * This method is designed to handle edge cases when calling - * {@link Types#getExactSuperType(Type, Class)}. When - * {@code getExactSuperType} returns an error, this usually implies some funny - * business going on with the {@link Type} that was passed to it. We are not - * interested in supporting this business, since it usually results from poor - * practice in Class construction. TODO: determine some way of conveying to - * the user that GenTyRef doesn't like their inputs. - * - * @param src - * @param superClass - * @return - the supertype of {@code src} with rawtype {@code superClass}, or - * {@code null} if no such supertype exists. - */ - private static Type superType(Type src, Class superClass) { - try { - return Types.getExactSuperType(src, superClass); - } catch (AssertionError e) { - // can be thrown when - return null; - } - } - - /** - * @param src - * the type for which assignment should be checked from - * @param dest - * the parameterized type for which assignment should be checked to - * @param safeAssignability - * used to determine if we want to check if the src->dest assignment - * would be safely assignable even though it would cause a compiler - * error if we explicitly tried to do this (useful pretty much only - * for Op matching) - * @return whether and assignment of source to destination would be a legal java - * statement - */ - public static boolean checkGenericAssignability(Type src, ParameterizedType dest, boolean safeAssignability) { - return checkGenericAssignability(src, dest, null, safeAssignability); - } - - /** - * @param srcTypes the Type arguments for the source Type - * @param destTypes the Type arguments for the destination Type - * @param src the type for which assignment should be checked from - * @param dest the parameterized type for which assignment should be checked - * to - * @param typeVarAssigns the map of {@link TypeVariable}s to - * {@link TypeMapping}s that would occur in this scenario - * @param safeAssignability used to determine if we want to check if the - * src->dest assignment would be safely assignable even though it - * would cause a compiler error if we explicitly tried to do this - * (useful pretty much only for Op matching) - * @return whether and assignment of source to destination would be a legal - * java statement - */ - private static boolean checkGenericAssignability(Type[] srcTypes, Type[] destTypes, Type src, Type dest, - Map, Type> typeVarAssigns, boolean safeAssignability) { - // if the number of type arguments does not match, the types can't be - // assignable - if (srcTypes.length != destTypes.length) { - return false; - } - - try { - // Try to infer type variables contained in the type arguments of - // sry - inferTypeVariables(srcTypes, destTypes, typeVarAssigns); - } catch (IllegalArgumentException e) { - // types can't be inferred - // TODO: Consider the situations in which it is okay that the type - // variables cannot be inferred. For example, if we have a - // Function, Comparable> and we ask for a - // Function, it is okay that we cannot infer the T of - // Comparable from Object since a Comparable is an Object for any T. - // It would be nice if we could just return false any time we catch a - // TypeInferenceException, but until we sort this out, we cannot do so. - return safeAssignability && isSafeAssignable(destTypes, typeVarAssigns, src, dest); - } - - // Map TypeVariables in src to Types - Class matchingRawType = Types.raw(dest); - Type[] mappedSrcTypes = mapVarToTypes(srcTypes, typeVarAssigns); - Type inferredSrcType = Types.parameterize(matchingRawType, mappedSrcTypes); - - // Check assignability - if (Types.isAssignable(inferredSrcType, dest, typeVarAssigns)) return true; - - return safeAssignability && isSafeAssignable(destTypes, typeVarAssigns, src, - dest); - } - - /** - * We know that the special types for the Op candidate and what we asked for are - * the same (i.e. that we are trying to determine if one Function can be - * assigned to another Function). There are some situations (that are - * particularly common when using ops.run()) where the Function SHOULD NOT - * NORMALLY MATCH UP but WE KNOW IT WILL BE SAFE TO ASSIGN. This method attempts - * to tease those situations out as a last resort. - * - * @param destTypes - * - the array of Parameterized types of the OpInfo we called the - * matcher on (in the case of ops.run(), it is a Type array of the - * types of the args we passed through.) - * @param typeVarAssigns - * - a Map of all of the Type Variables already determined. - * @param dest - * - the speical type of the Op that we want to find a match for - * (determined by the user / ops.run()) - * @return boolean - true if we can safely match this Op even though the types - * do not directly match up. False otherwise. - */ - public static boolean isSafeAssignable(Type[] destTypes, Map, Type> typeVarAssigns, Type src, - Type dest) { - - Method[] destMethods = Arrays.stream(Types.raw(dest).getDeclaredMethods()) - .filter(method -> Modifier.isAbstract(method.getModifiers())).toArray(Method[]::new); - if (destMethods.length == 0) { - throw new IllegalArgumentException(src + " does not have an abstract method!"); - } - Type[] params = Types.getExactParameterTypes(destMethods[0], src); - Type returnType = Types.getExactReturnType(destMethods[0], src); - for (int i = 0; i < params.length; i++) { - if (!Types.isAssignable(destTypes[i], params[i], typeVarAssigns)) - return false; - } - - // Computers will have void as their return type, meaning that there is no - // output to check. - if (returnType == void.class) - return true; - - return Types.isAssignable(returnType, destTypes[destTypes.length - 1], typeVarAssigns); - } - - /** - * Exception indicating that type vars could not be inferred. - */ - static class TypeInferenceException extends RuntimeException { - /** - * - */ - private static final long serialVersionUID = 7147530827546663700L; - - public TypeInferenceException() { - super(); - } - - public TypeInferenceException(String message) { - super(message); - } - } - - /** - * Map type vars in specified type list to types using the specified map. In - * doing so, type vars mapping to other type vars will not be followed but - * just replaced. - * - * @param typesToMap - * @param typeAssigns - * @return a copy of {@code typesToMap} in which the {@link TypeVariable}s - * (that are present in {@code typeAssigns}) are mapped to the - * associated values within the {@code Map}. - */ - private static Type[] mapVarToTypes(Type[] typesToMap, Map, Type> typeAssigns) { - return Arrays.stream(typesToMap).map(type -> Types.unrollVariables(typeAssigns, type, false)) - .toArray(Type[]::new); - } - - /** - * Tries to infer type vars contained in types from corresponding types from - * inferFrom, putting them into the specified map. When a - * {@link TypeInferenceException} is thrown, the caller should assume that - * some of the mappings within {@code typeMappings} are incorrect. - * - * @param types - the types containing {@link TypeVariable}s - * @param inferFroms - the types used to infer the {@link TypeVariable}s - * within {@code types} - * @param typeVarAssigns - the mapping of {@link TypeVariable}s to - * {@link Type}s - */ - public static void inferTypeVariables(Type[] types, Type[] inferFroms, Map, Type> typeVarAssigns) { - Map, TypeMapping> typeMappings = new HashMap<>(); - try { - inferTypeVariables(types, inferFroms, typeMappings, true); - typeVarAssigns.putAll(new TypeVarAssigns(typeMappings)); - } - catch (TypeInferenceException e) { - throw new IllegalArgumentException(e); - } - } - - private static void inferTypeVariables(Type[] types, Type[] inferFroms, - Map, TypeMapping> typeMappings, boolean malleable) - { - // Ensure that the user has not passed a null map - if (typeMappings == null) throw new IllegalArgumentException( - "Type Variable map is null, cannot store mappings of TypeVariables to Types!"); - - if (types.length != inferFroms.length) throw new TypeInferenceException( - "Could not infer type variables: Type arrays must be of the same size"); - - for (int i = 0; i < types.length; i++) { - inferTypeVariables(types[i], inferFroms[i], typeMappings, malleable); - } - // Check if the inferred types satisfy their bounds - // TODO: can we do this in an efficient manner? - TypeVarAssigns typeVarAssigns = new TypeVarAssigns(typeMappings); - if (!Types.typesSatisfyVariables(typeVarAssigns)) { - throw new TypeInferenceException(); - } - } - - /** - * Tries to infer type vars contained in types from corresponding types from - * inferFrom, putting them into the specified map. When a - * {@link TypeInferenceException} is thrown, the caller should assume that - * some of the mappings within {@code typeMappings} are incorrect. - * - * @param type - * @param inferFrom - * @param typeMappings - */ - static void inferTypeVariablesWithTypeMappings(Type type[], Type[] inferFrom, - Map, TypeMapping> typeMappings) - { - inferTypeVariables(type, inferFrom, typeMappings, true); - } - - /** - * Tries to infer type vars contained in types from corresponding types from - * inferFrom, putting them into the specified map. When a - * {@link TypeInferenceException} is thrown, the caller should assume that - * some of the mappings within {@code typeMappings} are incorrect. - * - * @param type - * @param inferFrom - * @param typeMappings - */ - static void inferTypeVariables(Type type, Type inferFrom, Map, TypeMapping> typeMappings) { - inferTypeVariables(type, inferFrom, typeMappings, true); - } - - private static void inferTypeVariables(Type type, Type inferFrom, - Map, TypeMapping> typeMappings, boolean malleable) - { - if (type instanceof TypeVariable) { - inferTypeVariables((TypeVariable) type, inferFrom, typeMappings, malleable); - } - else if (type instanceof ParameterizedType) { - inferTypeVariables((ParameterizedType) type, inferFrom, typeMappings); - } - else if (type instanceof WildcardType) { - inferTypeVariables((WildcardType) type, inferFrom, typeMappings); - } - else if (type instanceof GenericArrayType) { - inferTypeVariables((GenericArrayType) type, inferFrom, typeMappings); - } - else if (type instanceof Class) { - inferTypeVariables((Class) type, inferFrom, typeMappings); - } - - } - - private static void inferTypeVariables(TypeVariable type, Type inferFrom, - Map, TypeMapping> typeMappings, boolean malleable) - { - TypeMapping typeData = typeMappings.get(type); - // If current is not null then we have already encountered that - // variable. If so, we require them to be exactly the same, and throw a - // TypeInferenceException if they are not. - if (typeData != null) { - typeData.refine(inferFrom, malleable); - } - else { - resolveTypeInMap(type, inferFrom, typeMappings, malleable); - // Bounds could also contain type vars, hence possibly go into - // recursion - for (Type bound : type.getBounds()) { - if (bound instanceof TypeVariable && typeMappings.get(bound) != null) { - // If the bound of the current var (let's call it A) to - // infer is also a var (let's call it B): - // If we already encountered B, we check if the current - // type to infer from is assignable to - // the already inferred type for B. In this case we do - // not require equality as one var is - // bounded by another and it is not the same. E.g. - // assume we want to infer the types of vars: - // - - - A extends Number, B extends A - // From types: - // - - - Number, Double - // First A is bound to Number, next B to Double. Then we - // check the bounds for B. We encounter A, - // for which we already inferred Number. Hence, it - // suffices to check whether Double can be assigned - // to Number, it does not have to be equal as it is just - // a transitive bound for B. - Type typeAssignForBound = typeMappings.get(bound).getType(); - if (!Types.isAssignable(inferFrom, typeAssignForBound)) { - throw new TypeInferenceException(); - } - } - else { - // Else go into recursion as we encountered a new var. - inferTypeVariables(bound, inferFrom, typeMappings); - } - } - - } - } - - private static void inferTypeVariables(ParameterizedType type, Type inferFrom, - Map, TypeMapping> typeMappings) - { - if (inferFrom instanceof WildcardType) { - inferFrom = getInferrableBound((WildcardType) inferFrom); - } - if (inferFrom instanceof Any) { - Any any = (Any) inferFrom; - mapTypeVarsToAny(type, any, typeMappings); - return; - } - // Finding the supertype here is really important. Suppose that we are - // inferring from a StrangeThing extends Thing and our - // Op requires a Thing. We need to ensure that T gets - // resolved to a Double and NOT a Long. - Type superInferFrom = Types.getExactSuperType(inferFrom, Types.raw(type)); - if (superInferFrom instanceof ParameterizedType) { - ParameterizedType paramInferFrom = (ParameterizedType) superInferFrom; - inferTypeVariables(type.getActualTypeArguments(), paramInferFrom - .getActualTypeArguments(), typeMappings, false); - } - else if (superInferFrom instanceof Class) { - TypeVarAssigns typeVarAssigns = new TypeVarAssigns(typeMappings); - Type mappedType = Types.mapVarToTypes(type, typeVarAssigns); - // Use isAssignable to attempt to infer the type variables present in type - if (!Types.isAssignable(superInferFrom, mappedType, typeVarAssigns)) { - throw new TypeInferenceException(inferFrom + - " cannot be implicitly cast to " + mappedType + - ", thus it is impossible to infer type variables for " + inferFrom); - } - // for all remaining unmapped type vars, map to Any - mapTypeVarsToAny(type, typeMappings); - } - // -- edge cases -> do our best -- // - else if (superInferFrom == null) { - // edge case 1: if inferFrom is an Object, superInferFrom will be null - // when type is some interface. - if (Object.class.equals(inferFrom)) { - mapTypeVarsToAny(type, typeMappings); - return; - } - // edge case 2: if inferFrom is a superType of type, we can get (some of) - // the types of type by finding the exact superType of type w.r.t. - // inferFrom. - Type superTypeOfType = Types.getExactSuperType(type, Types.raw( - inferFrom)); - if (superTypeOfType == null) { - throw new TypeInferenceException(inferFrom + - " cannot be implicitly cast to " + type + - ", thus it is impossible to infer type variables for " + inferFrom); - } - inferTypeVariables(superTypeOfType, inferFrom, typeMappings, false); - mapTypeVarsToAny(type, typeMappings); - } - // TODO: elaborate - else throw new IllegalStateException(superInferFrom + - " is the supertype of " + inferFrom + " with respect to " + type + - ", however this cannot be (since " + type + - " is a ParamterizedType)! (Only a ParameterizedType, Class, or null " + - "can be returned from Types.getExactSuperType when it is called with a ParameterizedType!)"); - } - - private static void mapTypeVarsToAny(Type type, - Map, TypeMapping> typeMappings) - { - mapTypeVarsToAny(type, new Any(), typeMappings); - } - - private static void mapTypeVarsToAny(Type type, Any any, - Map, TypeMapping> typeMappings) - { - if (!Types.containsTypeVars(type)) return; - - if (type instanceof TypeVariable) { - if (typeMappings.containsKey(type)) return; - TypeVariable typeVar = (TypeVariable) type; - typeMappings.put(typeVar, suitableTypeMapping(typeVar, any, true)); - } - else if (type instanceof ParameterizedType) { - ParameterizedType pType = (ParameterizedType) type; - Type[] typeParams = pType.getActualTypeArguments(); - for (Type typeParam : typeParams) { - mapTypeVarsToAny(typeParam, typeMappings); - } - } - else if (type instanceof WildcardType) { - WildcardType wildcard = (WildcardType) type; - for (Type lowerBound : wildcard.getLowerBounds()) - mapTypeVarsToAny(lowerBound, typeMappings); - for (Type upperBound : wildcard.getUpperBounds()) - mapTypeVarsToAny(upperBound, typeMappings); - } - else if (type instanceof Class) { - Class clazz = (Class) type; - for (Type typeParam : clazz.getTypeParameters()) - mapTypeVarsToAny(typeParam, typeMappings); - } - } - - private static void inferTypeVariables(WildcardType type, Type inferFrom, Map, TypeMapping> typeMappings) { - Type inferrableBound = getInferrableBound(type); - if (inferFrom instanceof WildcardType) { - // NB if both type and inferFrom are Wildcards, it doesn't really matter - // (for the purpose of Type inference) whether those Wildcards have a - // defined upper or lower bound. It is only important that we compare - // those defined bounds, even if one is an upper bound and the other is a - // lower bound. If the Wildcards are not assignable (which is (always?) - // the case when one bound is an upper bound and the other is a lower - // bound), it is still possible to infer the type variables; despite doing - // so, checkGenericAssignability will return false. - inferFrom = getInferrableBound((WildcardType) inferFrom); - } - if (inferrableBound instanceof TypeVariable) { - resolveTypeInMap((TypeVariable) inferrableBound, inferFrom, typeMappings, true); - } - else if (inferrableBound instanceof ParameterizedType) { - ParameterizedType parameterizedUpperBound = - (ParameterizedType) inferrableBound; - inferTypeVariables(parameterizedUpperBound, inferFrom, typeMappings, - true); - } - // TODO: consider checking inferrableBounds instanceof Class - } - - private static void resolveTypeInMap(TypeVariable typeVar, Type newType, - Map, TypeMapping> typeMappings, boolean malleability) - { - if (typeMappings.containsKey(typeVar)) { - typeMappings.get(typeVar).refine(newType, malleability); - } - else { - typeMappings.put(typeVar, suitableTypeMapping(typeVar, newType, - malleability)); - } - } - - private static TypeMapping suitableTypeMapping(TypeVariable typeVar, - Type newType, boolean malleability) - { - if (newType instanceof WildcardType) { - return new WildcardTypeMapping(typeVar, (WildcardType) newType, - malleability); - } - return new TypeMapping(typeVar, newType, malleability); - } - - private static void inferTypeVariables(Class type, Type inferFrom, Map, TypeMapping> typeMappings) { - if( inferFrom instanceof TypeVariable){ - TypeVarAssigns typeVarAssigns = new TypeVarAssigns(typeMappings); - // If current type var is absent put it to the map. Otherwise, - // we already encountered that var. - // Hence, we require them to be exactly the same. - if(Types.isAssignable(type, inferFrom, typeVarAssigns)) { - Type current = typeVarAssigns.putIfAbsent((TypeVariable) inferFrom, type); - if (current != null) { - if (current instanceof Any) { - typeVarAssigns.put((TypeVariable) inferFrom, type); - } - else if (!Objects.equal(type, current)) { - throw new TypeInferenceException(); - } - } - } - } - } - - private static void inferTypeVariables(GenericArrayType type, Type inferFrom, - Map, TypeMapping> typeMappings) - { - if (inferFrom instanceof Class && ((Class) inferFrom).isArray()) { - Type componentType = type.getGenericComponentType(); - Type componentInferFrom = ((Class) inferFrom).getComponentType(); - inferTypeVariables(componentType, componentInferFrom, typeMappings); - } - else if (inferFrom instanceof WildcardType) { - Type inferrableBound = getInferrableBound((WildcardType) inferFrom); - inferTypeVariables(type, inferrableBound, typeMappings); - } - else throw new TypeInferenceException(inferFrom + - " cannot be implicitly cast to " + type + - ", thus it is impossible to infer type variables for " + inferFrom); - } - - /** - * Current java language specifications allow either: - *
    - *
  • one {@code Object} upper bound and one lower bound - *
  • one (arbitrary) upper bound and no lower bounds - *
- * We rely on this fact for the purposes of inferring type variables. - * - * @param type - * @return the singular {@link Type} that bounds this - * {@link TypeVariable}. The returned {@code Type} could be - * either a lower or upper bound (we do not care for the - * sole purpose of type inference). - */ - private static Type getInferrableBound(WildcardType type) { - Type[] lBounds = type.getLowerBounds(); - Type[] uBounds = type.getUpperBounds(); - if (lBounds.length == 1 && uBounds.length == 1 && - uBounds[0] == Object.class) return lBounds[0]; - else if (lBounds.length == 0 && uBounds.length == 1) return uBounds[0]; - else throw new IllegalArgumentException( - "Illegal WildcardType: Current Java Language Specification does not allow " + - type + " to simultaneously have upper bounds " + uBounds + - " and lower bounds " + lBounds); - } - - /** - * Finds the type parameters of the most specific super type of the specified - * subType whose erasure is the specified superErasure. Hence, will return the - * type parameters of superErasure possibly narrowed down by subType. If - * superErasure is not raw or not a super type of subType, an empty array will - * be returned. - * - * @param subType - * the type to narrow down type parameters - * @param superErasure - * the erasure of an super type of subType to get the parameters from - * @return type parameters of superErasure possibly narrowed down by subType, or - * empty type array if no exists or superErasure is not a super type of - * subtype - */ - public static Type[] getParams(Class subType, Class superErasure) { - Type pt = Types.parameterizeRaw(subType); - Type superType = Types.getExactSuperType(pt, superErasure); - if (superType != null && superType instanceof ParameterizedType) { - return ((ParameterizedType) superType).getActualTypeArguments(); - } - return new Type[0]; - } - - /** - * Gets the "useful" class information carries on the given object, which - * depends on the actual type of the object. - */ - public static Class getClass(final Object obj) { - if (obj == null) - return null; - if (obj instanceof Nil) - return getClass(((Nil) obj).getType()); - if (obj instanceof Class) - return (Class) obj; - if (obj instanceof ParameterizedType) - return (Class) ((ParameterizedType) obj).getRawType(); - return obj.getClass(); - } - - /** - * Finds the levels of casting between origin and - * dest. Returns 0 if dest and origin are the same. Returns -1 if - * dest is not assignable from origin. - */ - public static int findCastLevels(final Class dest, final Class origin) { - if (dest.equals(origin)) - return 0; - - int level = 1; - Class currType = origin; - // BFS if dest is an interface - if (dest.isInterface()) { - final HashSet seen = new HashSet<>(); - final ArrayList currIfaces = new ArrayList<>(Arrays.asList(currType.getGenericInterfaces())); - do { - final ArrayList nextIfaces = new ArrayList<>(); - for (final Type iface : currIfaces) { - if (seen.contains(iface.getTypeName())) - continue; - - final Class cls = getClass(iface); - if (cls.equals(dest)) - return level; - seen.add(iface.getTypeName()); - nextIfaces.addAll(Arrays.asList(cls.getGenericInterfaces())); - } - currIfaces.clear(); - currIfaces.addAll(nextIfaces); - if (currType.getSuperclass() != null) { - currType = currType.getSuperclass(); - currIfaces.addAll(Arrays.asList(currType.getGenericInterfaces())); - } - level++; - } while (!currIfaces.isEmpty() || currType.getSuperclass() != null); - } - // otherwise dest is a class, so search the list of ancestors - else { - while (currType.getSuperclass() != null) { - currType = currType.getSuperclass(); - if (currType.equals(dest)) - return level; - level++; - } - } - return -1; - } - - /** - * A data structure retaining information about the mapping of a - * {@link TypeVariable} to a {@link Type} within a type-inferring context. - * - * @author Gabriel Selzer - */ - static class TypeMapping { - - protected final TypeVariable typeVar; - protected Type mappedType; - - /** - * A boolean describing whether {@code mappedType} can be mutated in within - * this set of {@link Type}s. The most common scenario in which a - * {@link Type} cannot be mutated is when it is a type parameter of a - * {@link ParameterizedType}. Once {@code malleable} is set to - * {@code false}, {@code mappedType} cannot change, and - * {@link TypeMapping#refine(Type, boolean)} will throw a - * {@link TypeInferenceException} so long as {@code newType} is not the - * exact same {@code Type} as {@mappedType}. - */ - boolean malleable; - - public TypeMapping(TypeVariable typeVar, Type mappedType, - boolean malleable) - { - this.typeVar = typeVar; - this.mappedType = mappedType; - this.malleable = malleable; - } - - /** - * Attempts to accommodate {@code newType} into the current mapping between - * {@code typeVar} and {@code mappedType} given the existing - * malleability of {@code mappedType} and the malleability imposed by - * {@code newType}. If {@code newType} cannot be accommodated, a - * {@link TypeInferenceException} will be thrown. Note that it is not a - * guarantee that either the existing {@code mappedType} or {@code newType} - * will become the new {@link #mappedType} after the method ends; - * {@link #mappedType} could be a supertype of these two {@link Type}s. - * - * @param otherType - the type that will be refined into {@link #mappedType} - * @param newTypeMalleability - the malleability of {@code otherType}, - * determined by the context from which {@code otherType} came. - */ - public void refine(Type otherType, boolean newTypeMalleability) - { - malleable &= newTypeMalleability; - if (mappedType instanceof Any) { - mappedType = otherType; - return; - } - if (otherType instanceof Any) { - return; - } - if (malleable) { - // TODO: consider the correct value of that boolean - Type superType = Types.greatestCommonSuperType(new Type[] { otherType, - mappedType }, false); - if (Types.isAssignable(superType, typeVar)) { - mappedType = superType; - return; - } - throw new TypeInferenceException(typeVar + - " cannot simultaneoustly be mapped to " + otherType + " and " + - mappedType); - } - if (Objects.equal(mappedType, otherType)) return; - throw new TypeInferenceException(typeVar + - " cannot simultaneoustly be mapped to " + otherType + " and " + - mappedType); - } - - /** - * @return the {@link Type} associated with this {@link TypeVariable} - */ - public Type getType() { - return mappedType; - } - - @Override - public int hashCode() { - return Objects.hashCode(typeVar, mappedType, malleable); - } - - @Override - public boolean equals(Object o) { - if (!(o instanceof TypeMapping)) return false; - final TypeMapping that = (TypeMapping) o; - return Objects.equal(typeVar, that.typeVar) && // - Objects.equal(mappedType, that.mappedType) && // - Objects.equal(malleable, that.malleable); - } - - @Override - public String toString() { - return mappedType.toString(); - } - } - - /** - * A data structure retaining information about the mapping of a - * {@link TypeVariable} to a {@link Type} bounded by a {@link WildcardType} - * within a type-inferring context. - * - * @author Gabriel Selzer - */ - static class WildcardTypeMapping extends TypeMapping { - - private List lowerBoundList; - - public WildcardTypeMapping(TypeVariable typeVar, WildcardType mappedType, - boolean malleable) - { - super(typeVar, getUpperBound(mappedType), malleable); - lowerBoundList = new ArrayList<>(); - Type mappedTypeLowerBound = getLowerBound(mappedType); - if (mappedTypeLowerBound != null) { - lowerBoundList.add(mappedTypeLowerBound); - } - } - - /** - * Attempts to accommodate {@code newType} into the current mapping between - * {@code typeVar} and {@code mappedType} given the existing - * malleability of {@code mappedType} and the malleability imposed by - * {@code newType}. If {@code newType} cannot be accommodated, a - * {@link TypeInferenceException} will be thrown. Note that it is not a - * guarantee that either the existing {@code mappedType} or {@code newType} - * will become the new {@link #mappedType} after the method ends; - * {@link #mappedType} could be a supertype of these two {@link Type}s. - * - * @param otherType - the type that will be refined into {@link #mappedType} - * @param newTypeMalleability - the malleability of {@code otherType}, - * determined by the context from which {@code otherType} came. - */ - @Override - public void refine(Type otherType, boolean newTypeMalleability) - { - if (otherType instanceof WildcardType) { - refineWildcard((WildcardType) otherType, newTypeMalleability); - } - else { - super.refine(otherType, newTypeMalleability); - } - for (Type lowerBound : lowerBoundList) { - if (!Types.isAssignable(lowerBound, mappedType)) - throw new TypeInferenceException(typeVar + - " cannot simultaneoustly be mapped to " + otherType + " and " + - mappedType); - } - } - - private void refineWildcard(WildcardType otherType, - boolean newTypeMalleability) - { - Type otherLowerBound = getLowerBound(otherType); - if (otherLowerBound != null) { - lowerBoundList.add(otherLowerBound); - } - Type otherUpperBound = getUpperBound(otherType); - super.refine(otherUpperBound, newTypeMalleability); - } - - /** - * Current Java Language Specifications allow only one upper bound on any - * {@link WildcardType}. This method returns that singular bound, or - * {@code null} if this {@code WildcardType} has no upper bound. - * - * @param newType - the {@link WildcardType} for which we will find the - * upper bound - * @return the upper bound of {@code newType} - */ - private static Type getUpperBound(WildcardType newType) { - Type[] upperBounds = newType.getUpperBounds(); - if (upperBounds.length == 0) { - return Object.class; - } - else if (upperBounds.length == 1) { - return upperBounds[0]; - } - else { - throw new TypeInferenceException(newType + // - " is an impossible WildcardType. " + // - "The Java language specification currently prevents multiple upper bounds " + // - Arrays.toString(upperBounds)); // - } - } - - /** - * Current Java Language Specifications allow only one lower bound on any - * {@link WildcardType}. This method returns that singular bound, or - * {@code null} if this {@code WildcardType} has no lower bound. - * - * @param newType - the {@link WildcardType} for which we will find the - * lower bound - * @return the lower bound of {@code newType} - */ - private static Type getLowerBound(WildcardType newType) { - Type[] lowerBounds = newType.getLowerBounds(); - if (lowerBounds.length == 0) { - return null; - } - else if (lowerBounds.length == 1) { - return lowerBounds[0]; - } - throw new TypeInferenceException(newType + // - " is an impossible WildcardType. " + // - "The Java language specification currently prevents multiple lower bounds " + // - Arrays.toString(lowerBounds)); // - } - } - - /** - * Adapter class wrapping a {@code Map} into a - * {@code Map} for use with {@link Types} API. - */ - private static class TypeVarAssigns implements Map, Type> { - - private Map, TypeMapping> map; - - public TypeVarAssigns(Map, TypeMapping> map) { - this.map = map; - } - - @Override - public boolean containsKey( Object key) { - return map.containsKey(key); - } - - @Override - public Type put(TypeVariable typeVar, Type type) { - final TypeMapping previousMapping = // - map.put(typeVar, suitableTypeMapping(typeVar, type, isMalleable(typeVar))); - return previousMapping == null ? null : previousMapping.getType(); - } - - @Override - public Type putIfAbsent(TypeVariable typeVar, Type type) { - if (!map.containsKey(typeVar)) return put(typeVar, type); - return get(typeVar); - } - - @Override - public Type get(Object key) { - TypeMapping value = map.get(key); - return value == null ? null : value.getType(); - } - - @Override - public int size() { - return map.size(); - } - - @Override - public boolean isEmpty() { - return map.isEmpty(); - } - - @Override - public boolean containsValue(Object value) { - return map.containsValue(value); - } - - @Override - public Type remove(Object key) { - TypeMapping value = map.remove(key); - return value == null ? null : value.getType(); - } - - @Override - public void putAll(Map, ? extends Type> m) { - for (Map.Entry, ? extends Type> e : m.entrySet()) { - put(e.getKey(), e.getValue()); - } - } - - @Override - public void clear() { - map.clear(); - } - - @Override - public Set> keySet() { - return map.keySet(); - } - - @Override - public Collection values() { - return map.values().stream().map(v -> v.getType()).collect(Collectors.toList()); - } - - @Override - public Set, Type>> entrySet() { - return map.entrySet().stream().map(e -> { - return new Map.Entry, Type>() { - - @Override - public TypeVariable getKey() { - return e.getKey(); - } - - @Override - public Type getValue() { - return get(getKey()); - } - - @Override - public Type setValue(Type value) { - return put(getKey(), value); - } - }; - }).collect(Collectors.toSet()); - } - - private boolean isMalleable(TypeVariable typeVar) { - return map.containsKey(typeVar) && map.get(typeVar).malleable; - } - } -} + +package org.scijava.types.inference; + +import com.google.common.base.Objects; + +import java.lang.reflect.GenericArrayType; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.lang.reflect.WildcardType; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + +import org.scijava.types.Any; +import org.scijava.types.Nil; +import org.scijava.types.Types; + +public class GenericAssignability { + + /** + * @param src the type for which assignment should be checked from + * @param dest the parameterized type for which assignment should be checked + * to + * @param safeAssignability used to determine if we want to check if the + * src->dest assignment would be safely assignable even though it + * would cause a compiler error if we explicitly tried to do this + * (useful pretty much only for Op matching) + * @return whether and assignment of source to destination would be a legal + * java statement + */ + public static boolean checkGenericAssignability(Type src, + ParameterizedType dest, boolean safeAssignability) + { + return GenericAssignability.checkGenericAssignability(src, dest, null, + safeAssignability); + } + + /** + * Checks whether it would be legal to assign the {@link Type} source to the + * specified {@link ParameterizedType} destination (which could possibly be a + * supertype of the source type). Thereby, possible {@link TypeVariable}s + * contained in the parameters of the source are tried to be inferred in the + * sense of empty angle brackets when a new object is created: + * + *
+	 * 
+	 * List<Integer> listOfInts = new ArrayList<>();
+	 * 
+ * + * Hence, the types to put between the brackets are tried to be determined. + * Inference will be done by simple matching of an encountered + * {@link TypeVariable} in the source to the corresponding type in the + * parameters of the destination. If an {@link TypeVariable} is encountered + * more than once, the corresponding type in the destination needs to + * perfectly match. Else, false will be returned.
+ *
+ * Examples: + *
    + * If we have a class: + *
  • + * + *
    +	 * class NumberSupplier<M extends Number> implements Supplier<M>
    +	 * 
  • + *
+ *
    + * The following check will return true: + *
  • + * + *
    +	 * checkGenericAssignability(NumberSupplier.class, new
    +	 * Nil<Supplier<Double>>() {}.getType())
  • + *
+ * + *
    + * Which will check if the following assignment would be legal: + *
  • + * + *
    +	 * Supplier<Double> list = new NumberSupplier<>()
  • + *
+ * + *
    + * Here, the parameter {@code } can be inferred to be of + * type {@code Double} from the type {@code Supplier} + *
+ *
    + * Consequently the following will return false: + *
  • + * + *
    +	 * checkGenericAssignability(NumberSupplier.class, new
    +	 * Nil<Supplier<String>>() {}.getType())
  • + *
+ *
    + * {@code } can't be inferred, as type {@code String} is not + * within the bounds of {@code M}. + *
+ *
    + * Furthermore, the following will return false for: + * {@code class NumberFunc implements Function}: + *
  • + * + *
    +	 * checkGenericAssignability(NumberSupplier.class, new
    +	 * Nil<Function<Double, Integer>>() {}.getType())
  • + *
+ *
    + * {@code } can't be inferred, as types {@code Double} and + * {@code Integer} are ambiguous for {@code M}. + *
+ * + * @param src the type for which assignment should be checked from + * @param dest the parameterized type for which assignment should be checked + * to + * @param typeVarAssigns the map of {@link TypeVariable}s to {@link Type}s to + * populate with what would occur in this scenario; must be empty or + * null + * @param safeAssignability used to determine if we want to check if the + * src->dest assignment would be safely assignable even though it + * would cause a compiler error if we explicitly tried to do this + * (useful pretty much only for Op matching) + * @return whether and assignment of source to destination would be a legal + * java statement + */ + public static boolean checkGenericAssignability(Type src, + ParameterizedType dest, Map, Type> typeVarAssigns, + boolean safeAssignability) + { + if (typeVarAssigns == null) { + typeVarAssigns = new HashMap<>(); + } + else if (!typeVarAssigns.isEmpty()) { + throw new IllegalArgumentException( + "Expected empty typeVarAssigns but contained " + typeVarAssigns.size() + + " entries"); + } + + // fail fast when raw types are not assignable + if (!Types.isAssignable(Types.raw(src), Types.raw(dest))) return false; + + // when raw types are assignable, check the type variables of src and dest + Type[] srcTypes = typeParamsAgainstClass(src, Types.raw(dest)); + Type[] destTypes = dest.getActualTypeArguments(); + + // if there are no type parameters in src (w.r.t. dest), do a basic + // assignability check. + if (srcTypes.length == 0) return Types.isAssignable(src, dest); + // if there are type parameters, do a more complicated assignability check. + boolean result = checkGenericAssignability(srcTypes, destTypes, src, dest, + typeVarAssigns, safeAssignability); + return result; + } + + /** + * Finds the levels of casting between origin and + * dest. Returns 0 if dest and origin are the same. Returns -1 if + * dest is not assignable from origin. + */ + public static int findCastLevels(final Class dest, final Class origin) { + if (dest.equals(origin)) return 0; + + int level = 1; + Class currType = origin; + // BFS if dest is an interface + if (dest.isInterface()) { + final HashSet seen = new HashSet<>(); + final ArrayList currIfaces = new ArrayList<>(Arrays.asList(currType + .getGenericInterfaces())); + do { + final ArrayList nextIfaces = new ArrayList<>(); + for (final Type iface : currIfaces) { + if (seen.contains(iface.getTypeName())) continue; + + final Class cls = getClass(iface); + if (cls.equals(dest)) return level; + seen.add(iface.getTypeName()); + nextIfaces.addAll(Arrays.asList(cls.getGenericInterfaces())); + } + currIfaces.clear(); + currIfaces.addAll(nextIfaces); + if (currType.getSuperclass() != null) { + currType = currType.getSuperclass(); + currIfaces.addAll(Arrays.asList(currType.getGenericInterfaces())); + } + level++; + } + while (!currIfaces.isEmpty() || currType.getSuperclass() != null); + } + // otherwise dest is a class, so search the list of ancestors + else { + while (currType.getSuperclass() != null) { + currType = currType.getSuperclass(); + if (currType.equals(dest)) return level; + level++; + } + } + return -1; + } + + /** + * Gets the "useful" class information carries on the given object, which + * depends on the actual type of the object. + */ + public static Class getClass(final Object obj) { + if (obj == null) return null; + if (obj instanceof Nil) return getClass(((Nil) obj).getType()); + if (obj instanceof Class) return (Class) obj; + if (obj instanceof ParameterizedType) + return (Class) ((ParameterizedType) obj).getRawType(); + return obj.getClass(); + } + + /** + * Finds the type parameters of the most specific super type of the specified + * subType whose erasure is the specified superErasure. Hence, will return the + * type parameters of superErasure possibly narrowed down by subType. If + * superErasure is not raw or not a super type of subType, an empty array will + * be returned. + * + * @param subType the type to narrow down type parameters + * @param superErasure the erasure of an super type of subType to get the + * parameters from + * @return type parameters of superErasure possibly narrowed down by subType, + * or empty type array if no exists or superErasure is not a super + * type of subtype + */ + public static Type[] getParams(Class subType, Class superErasure) { + Type pt = Types.parameterizeRaw(subType); + Type superType = Types.getExactSuperType(pt, superErasure); + if (superType != null && superType instanceof ParameterizedType) { + return ((ParameterizedType) superType).getActualTypeArguments(); + } + return new Type[0]; + } + + /** + * Tries to infer type vars contained in types from corresponding types from + * inferFrom, putting them into the specified map. When a + * {@link TypeInferenceException} is thrown, the caller should assume that + * some of the mappings within {@code typeMappings} are incorrect. + * + * @param types - the types containing {@link TypeVariable}s + * @param inferFroms - the types used to infer the {@link TypeVariable}s + * within {@code types} + * @param typeVarAssigns - the mapping of {@link TypeVariable}s to + * {@link Type}s + */ + public static void inferTypeVariables(Type[] types, Type[] inferFroms, + Map, Type> typeVarAssigns) + { + Map, TypeMapping> typeMappings = new HashMap<>(); + try { + inferTypeVariables(types, inferFroms, typeMappings, true); + typeVarAssigns.putAll(new TypeVarAssigns(typeMappings)); + } + catch (TypeInferenceException e) { + throw new IllegalArgumentException(e); + } + } + + /** + * We know that the special types for the Op candidate and what we asked for + * are the same (i.e. that we are trying to determine if one Function can be + * assigned to another Function). There are some situations (that are + * particularly common when using ops.run()) where the Function SHOULD NOT + * NORMALLY MATCH UP but WE KNOW IT WILL BE SAFE TO ASSIGN. This method + * attempts to tease those situations out as a last resort. + * + * @param destTypes - the array of Parameterized types of the OpInfo we called + * the matcher on (in the case of ops.run(), it is a Type array of + * the types of the args we passed through.) + * @param typeVarAssigns - a Map of all of the Type Variables already + * determined. + * @param dest - the speical type of the Op that we want to find a match for + * (determined by the user / ops.run()) + * @return boolean - true if we can safely match this Op even though the types + * do not directly match up. False otherwise. + */ + public static boolean isSafeAssignable(Type[] destTypes, + Map, Type> typeVarAssigns, Type src, Type dest) + { + + Method[] destMethods = Arrays.stream(Types.raw(dest).getDeclaredMethods()) + .filter(method -> Modifier.isAbstract(method.getModifiers())).toArray( + Method[]::new); + if (destMethods.length == 0) { + throw new IllegalArgumentException(src + + " does not have an abstract method!"); + } + Type[] params = Types.getExactParameterTypes(destMethods[0], src); + Type returnType = Types.getExactReturnType(destMethods[0], src); + for (int i = 0; i < params.length; i++) { + if (!Types.isAssignable(destTypes[i], params[i], typeVarAssigns)) + return false; + } + + // Computers will have void as their return type, meaning that there is no + // output to check. + if (returnType == void.class) return true; + + return Types.isAssignable(returnType, destTypes[destTypes.length - 1], + typeVarAssigns); + } + + /** + * Map type vars in specified type list to types using the specified map. In + * doing so, type vars mapping to other type vars will not be followed but + * just replaced. + * + * @param typesToMap + * @param typeAssigns + * @return a copy of {@code typesToMap} in which the {@link TypeVariable}s + * (that are present in {@code typeAssigns}) are mapped to the + * associated values within the {@code Map}. + */ + public static Type[] mapVarToTypes(Type[] typesToMap, + Map, Type> typeAssigns) + { + return Arrays.stream(typesToMap).map(type -> Types.unrollVariables( + typeAssigns, type, false)).toArray(Type[]::new); + } + + /** + * Obtains the type parameters of {@link Type} {@code src} with respect + * to the {@link Class} {@code dest}. When {@code src} has no type + * parameters (or is not a subclass of {@code dest}), an empty array is + * returned. + * + * @param src - the {@code Type} whose type parameters will be returned. + * @param superclass - the {@code Class} against which we want the type + * parameters of {@code src} + * @return an array of {@code Type}s denoting the type + */ + public static Type[] typeParamsAgainstClass(Type src, Class superclass) { + // only classes and ParameterizedTypes can have type parameters + if (!(src instanceof Class || src instanceof ParameterizedType)) + return new Type[0]; + Type superSrc = superType(src, superclass); + if (superSrc == null) return new Type[0]; + if (superSrc instanceof ParameterizedType) + return ((ParameterizedType) superSrc).getActualTypeArguments(); + return getParams(Types.raw(src), superclass); + } + + /** + * @param srcTypes the Type arguments for the source Type + * @param destTypes the Type arguments for the destination Type + * @param src the type for which assignment should be checked from + * @param dest the parameterized type for which assignment should be checked + * to + * @param typeVarAssigns the map of {@link TypeVariable}s to + * {@link TypeMapping}s that would occur in this scenario + * @param safeAssignability used to determine if we want to check if the + * src->dest assignment would be safely assignable even though it + * would cause a compiler error if we explicitly tried to do this + * (useful pretty much only for Op matching) + * @return whether and assignment of source to destination would be a legal + * java statement + */ + private static boolean checkGenericAssignability(Type[] srcTypes, + Type[] destTypes, Type src, Type dest, + Map, Type> typeVarAssigns, boolean safeAssignability) + { + // if the number of type arguments does not match, the types can't be + // assignable + if (srcTypes.length != destTypes.length) { + return false; + } + + try { + // Try to infer type variables contained in the type arguments of + // sry + inferTypeVariables(srcTypes, destTypes, typeVarAssigns); + } + catch (IllegalArgumentException e) { + // types can't be inferred + // TODO: Consider the situations in which it is okay that the type + // variables cannot be inferred. For example, if we have a + // Function, Comparable> and we ask for a + // Function, it is okay that we cannot infer the T of + // Comparable from Object since a Comparable is an Object for any T. + // It would be nice if we could just return false any time we catch a + // TypeInferenceException, but until we sort this out, we cannot do so. + return safeAssignability && isSafeAssignable(destTypes, typeVarAssigns, + src, dest); + } + + // Map TypeVariables in src to Types + Class matchingRawType = Types.raw(dest); + Type[] mappedSrcTypes = mapVarToTypes(srcTypes, typeVarAssigns); + Type inferredSrcType = Types.parameterize(matchingRawType, mappedSrcTypes); + + // Check assignability + if (Types.isAssignable(inferredSrcType, dest, typeVarAssigns)) return true; + + return safeAssignability && isSafeAssignable(destTypes, typeVarAssigns, src, + dest); + } + + /** + * Current java language specifications allow either: + *
    + *
  • one {@code Object} upper bound and one lower bound + *
  • one (arbitrary) upper bound and no lower bounds + *
+ * We rely on this fact for the purposes of inferring type variables. + * + * @param type + * @return the singular {@link Type} that bounds this + * {@link TypeVariable}. The returned {@code Type} could be + * either a lower or upper bound (we do not care for the + * sole purpose of type inference). + */ + private static Type getInferrableBound(WildcardType type) { + Type[] lBounds = type.getLowerBounds(); + Type[] uBounds = type.getUpperBounds(); + if (lBounds.length == 1 && uBounds.length == 1 && + uBounds[0] == Object.class) return lBounds[0]; + else if (lBounds.length == 0 && uBounds.length == 1) return uBounds[0]; + else throw new IllegalArgumentException( + "Illegal WildcardType: Current Java Language Specification does not allow " + + type + " to simultaneously have upper bounds " + uBounds + + " and lower bounds " + lBounds); + } + + private static void inferTypeVariables(Class type, Type inferFrom, + Map, TypeMapping> typeMappings) + { + if (inferFrom instanceof TypeVariable) { + TypeVarAssigns typeVarAssigns = new TypeVarAssigns(typeMappings); + // If current type var is absent put it to the map. Otherwise, + // we already encountered that var. + // Hence, we require them to be exactly the same. + if (Types.isAssignable(type, inferFrom, typeVarAssigns)) { + Type current = typeVarAssigns.putIfAbsent((TypeVariable) inferFrom, + type); + if (current != null) { + if (current instanceof Any) { + typeVarAssigns.put((TypeVariable) inferFrom, type); + } + else if (!Objects.equal(type, current)) { + throw new TypeInferenceException(); + } + } + } + } + } + + private static void inferTypeVariables(GenericArrayType type, Type inferFrom, + Map, TypeMapping> typeMappings) + { + if (inferFrom instanceof Class && ((Class) inferFrom).isArray()) { + Type componentType = type.getGenericComponentType(); + Type componentInferFrom = ((Class) inferFrom).getComponentType(); + inferTypeVariables(componentType, componentInferFrom, typeMappings); + } + else if (inferFrom instanceof WildcardType) { + Type inferrableBound = getInferrableBound((WildcardType) inferFrom); + inferTypeVariables(type, inferrableBound, typeMappings); + } + else throw new TypeInferenceException(inferFrom + + " cannot be implicitly cast to " + type + + ", thus it is impossible to infer type variables for " + inferFrom); + } + + private static void inferTypeVariables(ParameterizedType type, Type inferFrom, + Map, TypeMapping> typeMappings) + { + if (inferFrom instanceof WildcardType) { + inferFrom = getInferrableBound((WildcardType) inferFrom); + } + if (inferFrom instanceof Any) { + Any any = (Any) inferFrom; + mapTypeVarsToAny(type, any, typeMappings); + return; + } + // Finding the supertype here is really important. Suppose that we are + // inferring from a StrangeThing extends Thing and our + // Op requires a Thing. We need to ensure that T gets + // resolved to a Double and NOT a Long. + Type superInferFrom = Types.getExactSuperType(inferFrom, Types.raw(type)); + if (superInferFrom instanceof ParameterizedType) { + ParameterizedType paramInferFrom = (ParameterizedType) superInferFrom; + inferTypeVariables(type.getActualTypeArguments(), paramInferFrom + .getActualTypeArguments(), typeMappings, false); + } + else if (superInferFrom instanceof Class) { + TypeVarAssigns typeVarAssigns = new TypeVarAssigns(typeMappings); + Type mappedType = Types.mapVarToTypes(type, typeVarAssigns); + // Use isAssignable to attempt to infer the type variables present in type + if (!Types.isAssignable(superInferFrom, mappedType, typeVarAssigns)) { + throw new TypeInferenceException(inferFrom + + " cannot be implicitly cast to " + mappedType + + ", thus it is impossible to infer type variables for " + inferFrom); + } + // for all remaining unmapped type vars, map to Any + mapTypeVarsToAny(type, typeMappings); + } + // -- edge cases -> do our best -- // + else if (superInferFrom == null) { + // edge case 1: if inferFrom is an Object, superInferFrom will be null + // when type is some interface. + if (Object.class.equals(inferFrom)) { + mapTypeVarsToAny(type, typeMappings); + return; + } + // edge case 2: if inferFrom is a superType of type, we can get (some of) + // the types of type by finding the exact superType of type w.r.t. + // inferFrom. + Type superTypeOfType = Types.getExactSuperType(type, Types.raw( + inferFrom)); + if (superTypeOfType == null) { + throw new TypeInferenceException(inferFrom + + " cannot be implicitly cast to " + type + + ", thus it is impossible to infer type variables for " + inferFrom); + } + inferTypeVariables(superTypeOfType, inferFrom, typeMappings, false); + mapTypeVarsToAny(type, typeMappings); + } + // TODO: elaborate + else throw new IllegalStateException(superInferFrom + + " is the supertype of " + inferFrom + " with respect to " + type + + ", however this cannot be (since " + type + + " is a ParamterizedType)! (Only a ParameterizedType, Class, or null " + + "can be returned from Types.getExactSuperType when it is called with a ParameterizedType!)"); + } + + private static void inferTypeVariables(Type type, Type inferFrom, + Map, TypeMapping> typeMappings, boolean malleable) + { + if (type instanceof TypeVariable) { + inferTypeVariables((TypeVariable) type, inferFrom, typeMappings, + malleable); + } + else if (type instanceof ParameterizedType) { + inferTypeVariables((ParameterizedType) type, inferFrom, typeMappings); + } + else if (type instanceof WildcardType) { + inferTypeVariables((WildcardType) type, inferFrom, typeMappings); + } + else if (type instanceof GenericArrayType) { + inferTypeVariables((GenericArrayType) type, inferFrom, typeMappings); + } + else if (type instanceof Class) { + inferTypeVariables((Class) type, inferFrom, typeMappings); + } + + } + + private static void inferTypeVariables(Type[] types, Type[] inferFroms, + Map, TypeMapping> typeMappings, boolean malleable) + { + // Ensure that the user has not passed a null map + if (typeMappings == null) throw new IllegalArgumentException( + "Type Variable map is null, cannot store mappings of TypeVariables to Types!"); + + if (types.length != inferFroms.length) throw new TypeInferenceException( + "Could not infer type variables: Type arrays must be of the same size"); + + for (int i = 0; i < types.length; i++) { + inferTypeVariables(types[i], inferFroms[i], typeMappings, malleable); + } + // Check if the inferred types satisfy their bounds + // TODO: can we do this in an efficient manner? + TypeVarAssigns typeVarAssigns = new TypeVarAssigns(typeMappings); + if (!Types.typesSatisfyVariables(typeVarAssigns)) { + throw new TypeInferenceException(); + } + } + + private static void inferTypeVariables(TypeVariable type, Type inferFrom, + Map, TypeMapping> typeMappings, boolean malleable) + { + TypeMapping typeData = typeMappings.get(type); + // If current is not null then we have already encountered that + // variable. If so, we require them to be exactly the same, and throw a + // TypeInferenceException if they are not. + if (typeData != null) { + typeData.refine(inferFrom, malleable); + } + else { + resolveTypeInMap(type, inferFrom, typeMappings, malleable); + // Bounds could also contain type vars, hence possibly go into + // recursion + for (Type bound : type.getBounds()) { + if (bound instanceof TypeVariable && typeMappings.get(bound) != null) { + // If the bound of the current var (let's call it A) to + // infer is also a var (let's call it B): + // If we already encountered B, we check if the current + // type to infer from is assignable to + // the already inferred type for B. In this case we do + // not require equality as one var is + // bounded by another and it is not the same. E.g. + // assume we want to infer the types of vars: + // - - - A extends Number, B extends A + // From types: + // - - - Number, Double + // First A is bound to Number, next B to Double. Then we + // check the bounds for B. We encounter A, + // for which we already inferred Number. Hence, it + // suffices to check whether Double can be assigned + // to Number, it does not have to be equal as it is just + // a transitive bound for B. + Type typeAssignForBound = typeMappings.get(bound).getType(); + if (!Types.isAssignable(inferFrom, typeAssignForBound)) { + throw new TypeInferenceException(); + } + } + else { + // Else go into recursion as we encountered a new var. + inferTypeVariables(bound, inferFrom, typeMappings); + } + } + + } + } + + private static void inferTypeVariables(WildcardType type, Type inferFrom, + Map, TypeMapping> typeMappings) + { + Type inferrableBound = getInferrableBound(type); + if (inferFrom instanceof WildcardType) { + // NB if both type and inferFrom are Wildcards, it doesn't really matter + // (for the purpose of Type inference) whether those Wildcards have a + // defined upper or lower bound. It is only important that we compare + // those defined bounds, even if one is an upper bound and the other is a + // lower bound. If the Wildcards are not assignable (which is (always?) + // the case when one bound is an upper bound and the other is a lower + // bound), it is still possible to infer the type variables; despite doing + // so, checkGenericAssignability will return false. + inferFrom = getInferrableBound((WildcardType) inferFrom); + } + if (inferrableBound instanceof TypeVariable) { + resolveTypeInMap((TypeVariable) inferrableBound, inferFrom, + typeMappings, true); + } + else if (inferrableBound instanceof ParameterizedType) { + ParameterizedType parameterizedUpperBound = + (ParameterizedType) inferrableBound; + inferTypeVariables(parameterizedUpperBound, inferFrom, typeMappings, + true); + } + // TODO: consider checking inferrableBounds instanceof Class + } + + private static void mapTypeVarsToAny(Type type, Any any, + Map, TypeMapping> typeMappings) + { + if (!Types.containsTypeVars(type)) return; + + if (type instanceof TypeVariable) { + if (typeMappings.containsKey(type)) return; + TypeVariable typeVar = (TypeVariable) type; + typeMappings.put(typeVar, suitableTypeMapping(typeVar, any, true)); + } + else if (type instanceof ParameterizedType) { + ParameterizedType pType = (ParameterizedType) type; + Type[] typeParams = pType.getActualTypeArguments(); + for (Type typeParam : typeParams) { + mapTypeVarsToAny(typeParam, typeMappings); + } + } + else if (type instanceof WildcardType) { + WildcardType wildcard = (WildcardType) type; + for (Type lowerBound : wildcard.getLowerBounds()) + mapTypeVarsToAny(lowerBound, typeMappings); + for (Type upperBound : wildcard.getUpperBounds()) + mapTypeVarsToAny(upperBound, typeMappings); + } + else if (type instanceof Class) { + Class clazz = (Class) type; + for (Type typeParam : clazz.getTypeParameters()) + mapTypeVarsToAny(typeParam, typeMappings); + } + } + + private static void mapTypeVarsToAny(Type type, + Map, TypeMapping> typeMappings) + { + mapTypeVarsToAny(type, new Any(), typeMappings); + } + + private static void resolveTypeInMap(TypeVariable typeVar, Type newType, + Map, TypeMapping> typeMappings, boolean malleability) + { + if (typeMappings.containsKey(typeVar)) { + typeMappings.get(typeVar).refine(newType, malleability); + } + else { + typeMappings.put(typeVar, suitableTypeMapping(typeVar, newType, + malleability)); + } + } + + private static TypeMapping suitableTypeMapping(TypeVariable typeVar, + Type newType, boolean malleability) + { + if (newType instanceof WildcardType) { + return new WildcardTypeMapping(typeVar, (WildcardType) newType, + malleability); + } + return new TypeMapping(typeVar, newType, malleability); + } + + /** + * This method is designed to handle edge cases when calling + * {@link Types#getExactSuperType(Type, Class)}. When + * {@code getExactSuperType} returns an error, this usually implies some funny + * business going on with the {@link Type} that was passed to it. We are not + * interested in supporting this business, since it usually results from poor + * practice in Class construction. TODO: determine some way of conveying to + * the user that GenTyRef doesn't like their inputs. + * + * @param src + * @param superClass + * @return - the supertype of {@code src} with rawtype {@code superClass}, or + * {@code null} if no such supertype exists. + */ + private static Type superType(Type src, Class superClass) { + try { + return Types.getExactSuperType(src, superClass); + } + catch (AssertionError e) { + // can be thrown when + return null; + } + } + + /** + * Tries to infer type vars contained in types from corresponding types from + * inferFrom, putting them into the specified map. When a + * {@link TypeInferenceException} is thrown, the caller should assume that + * some of the mappings within {@code typeMappings} are incorrect. + * + * @param type + * @param inferFrom + * @param typeMappings + */ + static void inferTypeVariables(Type type, Type inferFrom, + Map, TypeMapping> typeMappings) + { + inferTypeVariables(type, inferFrom, typeMappings, true); + } + + /** + * Tries to infer type vars contained in types from corresponding types from + * inferFrom, putting them into the specified map. When a + * {@link TypeInferenceException} is thrown, the caller should assume that + * some of the mappings within {@code typeMappings} are incorrect. + * + * @param type + * @param inferFrom + * @param typeMappings + */ + static void inferTypeVariablesWithTypeMappings(Type type[], Type[] inferFrom, + Map, TypeMapping> typeMappings) + { + inferTypeVariables(type, inferFrom, typeMappings, true); + } + +} diff --git a/scijava/scijava-types/src/main/java/org/scijava/types/inference/InterfaceInference.java b/scijava/scijava-types/src/main/java/org/scijava/types/inference/InterfaceInference.java new file mode 100644 index 000000000..8e038744f --- /dev/null +++ b/scijava/scijava-types/src/main/java/org/scijava/types/inference/InterfaceInference.java @@ -0,0 +1,22 @@ +package org.scijava.types.inference; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Arrays; + +public class InterfaceInference { + + public static Method singularAbstractMethod(Class functionalInterface) { + Method[] typeMethods = Arrays.stream(functionalInterface + .getMethods()).filter(method -> Modifier.isAbstract(method + .getModifiers())).toArray(Method[]::new); + if (typeMethods.length != 1) { + throw new IllegalArgumentException(functionalInterface + + " should be a FunctionalInterface, however it has " + + typeMethods.length + " abstract declared methods"); + } + + return typeMethods[0]; + } + +} diff --git a/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeInferenceException.java b/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeInferenceException.java new file mode 100644 index 000000000..a9c9fe7f9 --- /dev/null +++ b/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeInferenceException.java @@ -0,0 +1,19 @@ +package org.scijava.types.inference; + +/** + * Exception indicating that type vars could not be inferred. + */ +public class TypeInferenceException extends RuntimeException { + /** + * + */ + private static final long serialVersionUID = 7147530827546663700L; + + public TypeInferenceException() { + super(); + } + + public TypeInferenceException(String message) { + super(message); + } +} diff --git a/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeMapping.java b/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeMapping.java new file mode 100644 index 000000000..7daf310bc --- /dev/null +++ b/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeMapping.java @@ -0,0 +1,110 @@ +package org.scijava.types.inference; + +import com.google.common.base.Objects; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; + +import org.scijava.types.Any; +import org.scijava.types.Types; + +/** + * A data structure retaining information about the mapping of a + * {@link TypeVariable} to a {@link Type} within a type-inferring context. + * + * @author Gabriel Selzer + */ +public class TypeMapping { + + protected final TypeVariable typeVar; + protected Type mappedType; + + /** + * A boolean describing whether {@code mappedType} can be mutated in within + * this set of {@link Type}s. The most common scenario in which a + * {@link Type} cannot be mutated is when it is a type parameter of a + * {@link ParameterizedType}. Once {@code malleable} is set to + * {@code false}, {@code mappedType} cannot change, and + * {@link TypeMapping#refine(Type, boolean)} will throw a + * {@link TypeInferenceException} so long as {@code newType} is not the + * exact same {@code Type} as {@mappedType}. + */ + boolean malleable; + + public TypeMapping(TypeVariable typeVar, Type mappedType, + boolean malleable) + { + this.typeVar = typeVar; + this.mappedType = mappedType; + this.malleable = malleable; + } + + /** + * Attempts to accommodate {@code newType} into the current mapping between + * {@code typeVar} and {@code mappedType} given the existing + * malleability of {@code mappedType} and the malleability imposed by + * {@code newType}. If {@code newType} cannot be accommodated, a + * {@link TypeInferenceException} will be thrown. Note that it is not a + * guarantee that either the existing {@code mappedType} or {@code newType} + * will become the new {@link #mappedType} after the method ends; + * {@link #mappedType} could be a supertype of these two {@link Type}s. + * + * @param otherType - the type that will be refined into {@link #mappedType} + * @param newTypeMalleability - the malleability of {@code otherType}, + * determined by the context from which {@code otherType} came. + */ + public void refine(Type otherType, boolean newTypeMalleability) + { + malleable &= newTypeMalleability; + if (mappedType instanceof Any) { + mappedType = otherType; + return; + } + if (otherType instanceof Any) { + return; + } + if (malleable) { + // TODO: consider the correct value of that boolean + Type superType = Types.greatestCommonSuperType(new Type[] { otherType, + mappedType }, false); + if (Types.isAssignable(superType, typeVar)) { + mappedType = superType; + return; + } + throw new TypeInferenceException(typeVar + + " cannot simultaneoustly be mapped to " + otherType + " and " + + mappedType); + } + if (Objects.equal(mappedType, otherType)) return; + throw new TypeInferenceException(typeVar + + " cannot simultaneoustly be mapped to " + otherType + " and " + + mappedType); + } + + /** + * @return the {@link Type} associated with this {@link TypeVariable} + */ + public Type getType() { + return mappedType; + } + + @Override + public int hashCode() { + return Objects.hashCode(typeVar, mappedType, malleable); + } + + @Override + public boolean equals(Object o) { + if (!(o instanceof TypeMapping)) return false; + final TypeMapping that = (TypeMapping) o; + return Objects.equal(typeVar, that.typeVar) && // + Objects.equal(mappedType, that.mappedType) && // + Objects.equal(malleable, that.malleable); + } + + @Override + public String toString() { + return mappedType.toString(); + } +} diff --git a/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeVarAssigns.java b/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeVarAssigns.java new file mode 100644 index 000000000..5ee45ba7e --- /dev/null +++ b/scijava/scijava-types/src/main/java/org/scijava/types/inference/TypeVarAssigns.java @@ -0,0 +1,134 @@ + +package org.scijava.types.inference; + +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.lang.reflect.WildcardType; +import java.util.Collection; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import org.scijava.types.Types; + +/** + * Adapter class wrapping a {@code Map} into a + * {@code Map} for use with {@link Types} API. + */ +public class TypeVarAssigns implements Map, Type> { + + private static TypeMapping suitableTypeMapping(TypeVariable typeVar, + Type newType, boolean malleability) + { + if (newType instanceof WildcardType) { + return new WildcardTypeMapping(typeVar, (WildcardType) newType, + malleability); + } + return new TypeMapping(typeVar, newType, malleability); + } + + private Map, TypeMapping> map; + + public TypeVarAssigns(Map, TypeMapping> map) { + this.map = map; + } + + @Override + public void clear() { + map.clear(); + } + + @Override + public boolean containsKey(Object key) { + return map.containsKey(key); + } + + @Override + public boolean containsValue(Object value) { + return map.containsValue(value); + } + + @Override + public Set, Type>> entrySet() { + return map.entrySet().stream().map(e -> { + return new Map.Entry, Type>() { + + @Override + public TypeVariable getKey() { + return e.getKey(); + } + + @Override + public Type getValue() { + return get(getKey()); + } + + @Override + public Type setValue(Type value) { + return put(getKey(), value); + } + }; + }).collect(Collectors.toSet()); + } + + @Override + public Type get(Object key) { + TypeMapping value = map.get(key); + return value == null ? null : value.getType(); + } + + @Override + public boolean isEmpty() { + return map.isEmpty(); + } + + @Override + public Set> keySet() { + return map.keySet(); + } + + @Override + public Type put(TypeVariable typeVar, Type type) { + final TypeMapping previousMapping = // + map.put(typeVar, suitableTypeMapping(typeVar, type, isMalleable( + typeVar))); + return previousMapping == null ? null : previousMapping.getType(); + } + + @Override + public void putAll(Map, ? extends Type> m) { + for (Map.Entry, ? extends Type> e : m + .entrySet()) + { + put(e.getKey(), e.getValue()); + } + } + + @Override + public Type putIfAbsent(TypeVariable typeVar, Type type) { + if (!map.containsKey(typeVar)) return put(typeVar, type); + return get(typeVar); + } + + @Override + public Type remove(Object key) { + TypeMapping value = map.remove(key); + return value == null ? null : value.getType(); + } + + @Override + public int size() { + return map.size(); + } + + @Override + public Collection values() { + return map.values().stream().map(v -> v.getType()).collect(Collectors + .toList()); + } + + private boolean isMalleable(TypeVariable typeVar) { + return map.containsKey(typeVar) && map.get(typeVar).malleable; + } + +} diff --git a/scijava/scijava-types/src/main/java/org/scijava/types/inference/WildcardTypeMapping.java b/scijava/scijava-types/src/main/java/org/scijava/types/inference/WildcardTypeMapping.java new file mode 100644 index 000000000..be01f3869 --- /dev/null +++ b/scijava/scijava-types/src/main/java/org/scijava/types/inference/WildcardTypeMapping.java @@ -0,0 +1,123 @@ + +package org.scijava.types.inference; + +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.lang.reflect.WildcardType; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.scijava.types.Types; + +/** + * A data structure retaining information about the mapping of a + * {@link TypeVariable} to a {@link Type} bounded by a {@link WildcardType} + * within a type-inferring context. + * + * @author Gabriel Selzer + */ +public class WildcardTypeMapping extends TypeMapping { + + /** + * Current Java Language Specifications allow only one lower bound on any + * {@link WildcardType}. This method returns that singular bound, or + * {@code null} if this {@code WildcardType} has no lower bound. + * + * @param newType - the {@link WildcardType} for which we will find the lower + * bound + * @return the lower bound of {@code newType} + */ + private static Type getLowerBound(WildcardType newType) { + Type[] lowerBounds = newType.getLowerBounds(); + if (lowerBounds.length == 0) { + return null; + } + else if (lowerBounds.length == 1) { + return lowerBounds[0]; + } + throw new TypeInferenceException(newType + // + " is an impossible WildcardType. " + // + "The Java language specification currently prevents multiple lower bounds " + // + Arrays.toString(lowerBounds)); // + } + + /** + * Current Java Language Specifications allow only one upper bound on any + * {@link WildcardType}. This method returns that singular bound, or + * {@code null} if this {@code WildcardType} has no upper bound. + * + * @param newType - the {@link WildcardType} for which we will find the upper + * bound + * @return the upper bound of {@code newType} + */ + private static Type getUpperBound(WildcardType newType) { + Type[] upperBounds = newType.getUpperBounds(); + if (upperBounds.length == 0) { + return Object.class; + } + else if (upperBounds.length == 1) { + return upperBounds[0]; + } + else { + throw new TypeInferenceException(newType + // + " is an impossible WildcardType. " + // + "The Java language specification currently prevents multiple upper bounds " + // + Arrays.toString(upperBounds)); // + } + } + + private List lowerBoundList; + + public WildcardTypeMapping(TypeVariable typeVar, WildcardType mappedType, + boolean malleable) + { + super(typeVar, getUpperBound(mappedType), malleable); + lowerBoundList = new ArrayList<>(); + Type mappedTypeLowerBound = getLowerBound(mappedType); + if (mappedTypeLowerBound != null) { + lowerBoundList.add(mappedTypeLowerBound); + } + } + + /** + * Attempts to accommodate {@code newType} into the current mapping between + * {@code typeVar} and {@code mappedType} given the existing + * malleability of {@code mappedType} and the malleability imposed by + * {@code newType}. If {@code newType} cannot be accommodated, a + * {@link TypeInferenceException} will be thrown. Note that it is not a + * guarantee that either the existing {@code mappedType} or {@code newType} + * will become the new {@link #mappedType} after the method ends; + * {@link #mappedType} could be a supertype of these two {@link Type}s. + * + * @param otherType - the type that will be refined into {@link #mappedType} + * @param newTypeMalleability - the malleability of {@code otherType}, + * determined by the context from which {@code otherType} came. + */ + @Override + public void refine(Type otherType, boolean newTypeMalleability) { + if (otherType instanceof WildcardType) { + refineWildcard((WildcardType) otherType, newTypeMalleability); + } + else { + super.refine(otherType, newTypeMalleability); + } + for (Type lowerBound : lowerBoundList) { + if (!Types.isAssignable(lowerBound, mappedType)) + throw new TypeInferenceException(typeVar + + " cannot simultaneoustly be mapped to " + otherType + " and " + + mappedType); + } + } + + private void refineWildcard(WildcardType otherType, + boolean newTypeMalleability) + { + Type otherLowerBound = getLowerBound(otherType); + if (otherLowerBound != null) { + lowerBoundList.add(otherLowerBound); + } + Type otherUpperBound = getUpperBound(otherType); + super.refine(otherUpperBound, newTypeMalleability); + } +} diff --git a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/InferTypeVariablesTest.java b/scijava/scijava-types/src/test/java/org/scijava/types/inference/InferTypeVariablesTest.java similarity index 64% rename from scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/InferTypeVariablesTest.java rename to scijava/scijava-types/src/test/java/org/scijava/types/inference/InferTypeVariablesTest.java index 5a5d7c0e4..7a2b953e0 100644 --- a/scijava/scijava-ops/src/test/java/org/scijava/ops/matcher/InferTypeVariablesTest.java +++ b/scijava/scijava-types/src/test/java/org/scijava/types/inference/InferTypeVariablesTest.java @@ -1,5 +1,5 @@ -package org.scijava.ops.matcher; +package org.scijava.types.inference; import static org.junit.Assert.assertEquals; @@ -14,107 +14,39 @@ import java.util.function.Function; import org.junit.Test; -import org.scijava.ops.matcher.MatchingUtils.TypeInferenceException; -import org.scijava.ops.matcher.MatchingUtils.TypeMapping; -import org.scijava.ops.matcher.MatchingUtilsTest.StrangeThing; -import org.scijava.ops.matcher.MatchingUtilsTest.Thing; import org.scijava.types.Any; import org.scijava.types.Nil; public class InferTypeVariablesTest { - @Test - public void testSupertypeTypeInference() - throws TypeInferenceException - { - final Type t = new Nil, List>>() {}.getType(); - final Type[] tArgs = ((ParameterizedType) t).getActualTypeArguments(); - final Type dest = - new Nil, List>>() - {}.getType(); - final Type[] destArgs = ((ParameterizedType) dest).getActualTypeArguments(); - - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariablesWithTypeMappings(tArgs, destArgs, typeAssigns); - - // We expect I=String, O=Double - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); - TypeVariable typeVarI = (TypeVariable) ((ParameterizedType) tArgs[0]) - .getActualTypeArguments()[0]; - expected.put(typeVarI, new TypeMapping(typeVarI, String.class, false)); - TypeVariable typeVarO = (TypeVariable) ((ParameterizedType) tArgs[1]) - .getActualTypeArguments()[0]; - expected.put(typeVarO, new TypeMapping(typeVarO, Double.class, false)); + class Bar {} - assertEquals(typeAssigns, expected); - } + static class FooThing extends RecursiveThing {} - @Test - public void testWildcardTypeInference() throws TypeInferenceException { - final Type t = new Nil() {}.getType(); - final Type listWild = new Nil>() {}.getType(); - final Type integer = new Nil() {}.getType(); - final Type listDouble = new Nil>() {}.getType(); - - final Type[] types = { listWild, t }; - final Type[] inferFroms = { listDouble, integer }; + static abstract class RecursiveThing> {} - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariablesWithTypeMappings(types, inferFroms, typeAssigns); + class StrangeThing extends Thing {} - // We expect T=Number - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); - TypeVariable typeVar = (TypeVariable) t; - expected.put(typeVar, new TypeMapping(typeVar, Number.class, true)); + class Thing {} - assertEquals(expected, typeAssigns); - - final Type[] types2 = { t, t }; - final Type listWildcardNumber = new Nil>() {} - .getType(); - final Type wildcardNumber = ((ParameterizedType) listWildcardNumber) - .getActualTypeArguments()[0]; - final Type listWildcardDouble = new Nil>() {} - .getType(); - final Type wildcardDouble = ((ParameterizedType) listWildcardDouble) - .getActualTypeArguments()[0]; - - final Type[] inferFroms2 = { wildcardNumber, wildcardDouble }; - - final Map, MatchingUtils.TypeMapping> typeAssigns2 = - new HashMap<>(); - MatchingUtils.inferTypeVariablesWithTypeMappings(types2, inferFroms2, typeAssigns2); - - // We expect T=Number - final Map, MatchingUtils.TypeMapping> expected2 = - new HashMap<>(); - TypeVariable typeVar2 = (TypeVariable) t; - expected2.put(typeVar2, new TypeMapping(typeVar, Number.class, true)); + class TypedBar extends Bar { - assertEquals(expected2, typeAssigns2); + E type; } @Test - public void - testInferFromWildcardExtendingParameterizedType() - throws TypeInferenceException + public > void testInferFromTypeVar() + throws TypeInferenceException { - final Nil>> listT = new Nil<>() {}; - final Nil>> listWildcard = new Nil<>() {}; + final Type compT = new Nil>() {}.getType(); + final Type u = new Nil() {}.getType(); - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(listT.getType(), listWildcard.getType(), - typeAssigns); + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(compT, u, typeAssigns); // We expect T=Double final Type t = new Nil() {}.getType(); - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); + final Map, TypeMapping> expected = new HashMap<>(); TypeVariable typeVarT = (TypeVariable) t; expected.put(typeVarT, new TypeMapping(typeVarT, Double.class, false)); @@ -128,112 +60,44 @@ public void testInferFromWildcardExtendingClass() final Nil> listT = new Nil<>() {}; final Nil> listWildcard = new Nil<>() {}; - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(listT.getType(), listWildcard.getType(), - typeAssigns); + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(listT.getType(), listWildcard + .getType(), typeAssigns); // We expect T= (? extends Double) final Type t = new Nil() {}.getType(); - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); + final Map, TypeMapping> expected = new HashMap<>(); TypeVariable typeVarT = (TypeVariable) t; Type mappedType = ((ParameterizedType) listWildcard.getType()) .getActualTypeArguments()[0]; WildcardType mappedWildcard = (WildcardType) mappedType; - expected.put(typeVarT, new MatchingUtils.WildcardTypeMapping(typeVarT, - mappedWildcard, true)); - - assertEquals(expected, typeAssigns); - } - - @Test - public void testInferWildcardAndClass() - throws TypeInferenceException - { - final Nil> listT = new Nil<>() {}; - final Nil t = new Nil<>() {}; - final Nil> listWildcard = new Nil<>() {}; - - Type[] types = new Type[] { listT.getType(), t.getType() }; - Type[] inferFroms = new Type[] { listWildcard.getType(), Double.class }; - - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariablesWithTypeMappings(types, inferFroms, typeAssigns); - - // We expect T=Number - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); - TypeVariable typeVarT = (TypeVariable) t.getType(); - expected.put(typeVarT, new TypeMapping(typeVarT, Number.class, true)); + expected.put(typeVarT, new WildcardTypeMapping(typeVarT, mappedWildcard, + true)); assertEquals(expected, typeAssigns); } @Test - public void testInferSuperWildcard() - throws TypeInferenceException - { - final Nil> listT = new Nil<>() {}; - final Nil> listWildcard = new Nil<>() {}; - - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(listT.getType(), listWildcard.getType(), typeAssigns); - - // We expect T=Number - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); - TypeVariable typeVarT = (TypeVariable) new Nil() {}.getType(); - expected.put(typeVarT, new TypeMapping(typeVarT, Number.class, true)); - - assertEquals(expected, typeAssigns); - } - - @Test - public > void testInferFromTypeVar() - throws TypeInferenceException + public void + testInferFromWildcardExtendingParameterizedType() + throws TypeInferenceException { - final Type compT = new Nil>() {}.getType(); - final Type u = new Nil() {}.getType(); + final Nil>> listT = new Nil<>() {}; + final Nil>> listWildcard = new Nil<>() {}; - final Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(compT, u, typeAssigns); + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(listT.getType(), listWildcard + .getType(), typeAssigns); // We expect T=Double final Type t = new Nil() {}.getType(); - final Map, MatchingUtils.TypeMapping> expected = - new HashMap<>(); + final Map, TypeMapping> expected = new HashMap<>(); TypeVariable typeVarT = (TypeVariable) t; expected.put(typeVarT, new TypeMapping(typeVarT, Double.class, false)); assertEquals(expected, typeAssigns); } - @Test - public void testInferTypeVarInconsistentMapping() - throws TypeInferenceException - { - - final Type t = new Nil() {}.getType(); - - final Type[] tArr = { t, t }; - final Type[] badInferFrom = { Integer.class, Double.class }; - - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariablesWithTypeMappings(tArr, badInferFrom, typeAssigns); - - // We expect T=Number - TypeVariable typeVarT = (TypeVariable) t; - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); - expected.put(typeVarT, new TypeMapping(typeVarT, Number.class, true)); - - assertEquals(expected, typeAssigns); - } - @Test public void testInferGenericArrayTypeFromExtendingWildcardType() @@ -242,13 +106,12 @@ public void testInferTypeVarInconsistentMapping() final Type type = new Nil>() {}.getType(); final Type inferFrom = new Nil>() {}.getType(); - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); // We expect T=Double TypeVariable typeVarT = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); expected.put(typeVarT, new TypeMapping(typeVarT, Double.class, true)); assertEquals(expected, typeAssigns); @@ -262,13 +125,12 @@ public void testInferTypeVarInconsistentMapping() final Type type = new Nil>() {}.getType(); final Type inferFrom = new Nil>() {}.getType(); - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); // We expect T=Double TypeVariable typeVarT = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); expected.put(typeVarT, new TypeMapping(typeVarT, Double.class, true)); assertEquals(expected, typeAssigns); @@ -281,56 +143,53 @@ public void testInferOToAny() final Type iterableO = new Nil>() {}.getType(); final Type object = Object.class; - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(iterableO, object, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(iterableO, object, typeAssigns); // We expect O = Any TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); expected.put(typeVarO, new TypeMapping(typeVarO, new Any(), true)); assertEquals(expected, typeAssigns); } @Test - public void testInferOToAnyWithInterface() + public void testInferOToAnyWithClass() throws TypeInferenceException { - final Type type = new Nil>() {}.getType(); - final Type inferFrom = Cloneable.class; + final Type type = new Nil>() {}.getType(); + final Type inferFrom = Bar.class; - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); // We expect O = Any TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); expected.put(typeVarO, new TypeMapping(typeVarO, new Any(), true)); assertEquals(expected, typeAssigns); } - + @Test - public void testInferOToAnyWithClass() + public void testInferOToAnyWithInterface() throws TypeInferenceException { - final Type type = new Nil>() {}.getType(); - final Type inferFrom = Bar.class; + final Type type = new Nil>() {}.getType(); + final Type inferFrom = Cloneable.class; - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); // We expect O = Any TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); expected.put(typeVarO, new TypeMapping(typeVarO, new Any(), true)); assertEquals(expected, typeAssigns); } - + @Test public void testInferOToAnyWithRawType() throws TypeInferenceException @@ -338,29 +197,64 @@ public void testInferOToAnyWithRawType() final Type type = new Nil>() {}.getType(); final Type inferFrom = TypedBar.class; - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); // We expect O = Any TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); expected.put(typeVarO, new TypeMapping(typeVarO, new Any(), true)); assertEquals(expected, typeAssigns); } @Test - public void testInferTypeVarExtendingTypeVar() { + public > void testInferRecursiveTypeVar() { + final Type type = new Nil() {}.getType(); + final Type inferFrom = FooThing.class; + + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); + + // We expect O = FooThing + TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); + Map, TypeMapping> expected = new HashMap<>(); + expected.put(typeVarO, new TypeMapping(typeVarO, FooThing.class, false)); + + assertEquals(expected, typeAssigns); + } + + @Test + public void testInferSuperWildcard() + throws TypeInferenceException + { + final Nil> listT = new Nil<>() {}; + final Nil> listWildcard = new Nil<>() {}; + + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(listT.getType(), listWildcard + .getType(), typeAssigns); + + // We expect T=Number + final Map, TypeMapping> expected = new HashMap<>(); + TypeVariable typeVarT = (TypeVariable) new Nil() {}.getType(); + expected.put(typeVarT, new TypeMapping(typeVarT, Number.class, true)); + + assertEquals(expected, typeAssigns); + } + + @Test + public void + testInferTypeVarExtendingTypeVar() + { final Type type = new Nil() {}.getType(); final Type inferFrom = Double.class; - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariables(type, inferFrom, typeAssigns); // We expect I= Double, O = Double - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); + Map, TypeMapping> expected = new HashMap<>(); TypeVariable typeVarI = (TypeVariable) new Nil() {}.getType(); expected.put(typeVarI, new TypeMapping(typeVarI, Double.class, true)); TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); @@ -368,38 +262,122 @@ public void testInferTypeVarExtendingTypeVar() { assertEquals(expected, typeAssigns); } - + @Test - public > void testInferRecursiveTypeVar() { - final Type type = new Nil() {}.getType(); - final Type inferFrom = FooThing.class; + public void testInferTypeVarInconsistentMapping() + throws TypeInferenceException + { - Map, MatchingUtils.TypeMapping> typeAssigns = - new HashMap<>(); - MatchingUtils.inferTypeVariables(type, inferFrom, typeAssigns); + final Type t = new Nil() {}.getType(); - // We expect O = FooThing - TypeVariable typeVarO = (TypeVariable) new Nil() {}.getType(); - Map, MatchingUtils.TypeMapping> expected = new HashMap<>(); - expected.put(typeVarO, new TypeMapping(typeVarO, FooThing.class, false)); + final Type[] tArr = { t, t }; + final Type[] badInferFrom = { Integer.class, Double.class }; + + Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariablesWithTypeMappings(tArr, badInferFrom, + typeAssigns); + + // We expect T=Number + TypeVariable typeVarT = (TypeVariable) t; + Map, TypeMapping> expected = new HashMap<>(); + expected.put(typeVarT, new TypeMapping(typeVarT, Number.class, true)); assertEquals(expected, typeAssigns); } - class Bar { - - } - - class TypedBar extends Bar { - E type; + @Test + public void testInferWildcardAndClass() + throws TypeInferenceException + { + final Nil> listT = new Nil<>() {}; + final Nil t = new Nil<>() {}; + final Nil> listWildcard = new Nil<>() {}; + + Type[] types = new Type[] { listT.getType(), t.getType() }; + Type[] inferFroms = new Type[] { listWildcard.getType(), Double.class }; + + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariablesWithTypeMappings(types, inferFroms, + typeAssigns); + + // We expect T=Number + final Map, TypeMapping> expected = new HashMap<>(); + TypeVariable typeVarT = (TypeVariable) t.getType(); + expected.put(typeVarT, new TypeMapping(typeVarT, Number.class, true)); + + assertEquals(expected, typeAssigns); } - static abstract class RecursiveThing> { - + @Test + public void testSupertypeTypeInference() + throws TypeInferenceException + { + final Type t = new Nil, List>>() {}.getType(); + final Type[] tArgs = ((ParameterizedType) t).getActualTypeArguments(); + final Type dest = + new Nil, List>>() + {}.getType(); + final Type[] destArgs = ((ParameterizedType) dest).getActualTypeArguments(); + + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariablesWithTypeMappings(tArgs, destArgs, + typeAssigns); + + // We expect I=String, O=Double + final Map, TypeMapping> expected = new HashMap<>(); + TypeVariable typeVarI = (TypeVariable) ((ParameterizedType) tArgs[0]) + .getActualTypeArguments()[0]; + expected.put(typeVarI, new TypeMapping(typeVarI, String.class, false)); + TypeVariable typeVarO = (TypeVariable) ((ParameterizedType) tArgs[1]) + .getActualTypeArguments()[0]; + expected.put(typeVarO, new TypeMapping(typeVarO, Double.class, false)); + + assertEquals(typeAssigns, expected); } - - static class FooThing extends RecursiveThing { - + + @Test + public void testWildcardTypeInference() throws TypeInferenceException { + final Type t = new Nil() {}.getType(); + final Type listWild = new Nil>() {}.getType(); + final Type integer = new Nil() {}.getType(); + final Type listDouble = new Nil>() {}.getType(); + + final Type[] types = { listWild, t }; + final Type[] inferFroms = { listDouble, integer }; + + final Map, TypeMapping> typeAssigns = new HashMap<>(); + GenericAssignability.inferTypeVariablesWithTypeMappings(types, inferFroms, + typeAssigns); + + // We expect T=Number + final Map, TypeMapping> expected = new HashMap<>(); + TypeVariable typeVar = (TypeVariable) t; + expected.put(typeVar, new TypeMapping(typeVar, Number.class, true)); + + assertEquals(expected, typeAssigns); + + final Type[] types2 = { t, t }; + final Type listWildcardNumber = new Nil>() {} + .getType(); + final Type wildcardNumber = ((ParameterizedType) listWildcardNumber) + .getActualTypeArguments()[0]; + final Type listWildcardDouble = new Nil>() {} + .getType(); + final Type wildcardDouble = ((ParameterizedType) listWildcardDouble) + .getActualTypeArguments()[0]; + + final Type[] inferFroms2 = { wildcardNumber, wildcardDouble }; + + final Map, TypeMapping> typeAssigns2 = new HashMap<>(); + GenericAssignability.inferTypeVariablesWithTypeMappings(types2, inferFroms2, + typeAssigns2); + + // We expect T=Number + final Map, TypeMapping> expected2 = new HashMap<>(); + TypeVariable typeVar2 = (TypeVariable) t; + expected2.put(typeVar2, new TypeMapping(typeVar, Number.class, true)); + + assertEquals(expected2, typeAssigns2); } }