I1 - type of first inputI2 - type of second inputO - type of outputDI1 - type of first input accepted by the worker opDI2 - type of second input accepted by the worker opDO - type of output accepted by the worker oppublic abstract class BFViaBC<I1 extends DI1,I2 extends DI2,O extends DO,DI1,DI2,DO> extends AbstractBinaryFunctionOp<I1,I2,O> implements DelegatingBinaryOp<I1,I2,O,DI1,DI2,DO,BinaryComputerOp<DI1,DI2,DO>>, BinaryOutputFactory<I1,I2,O>
BinaryFunctionOps that delegate to
BinaryComputerOps.
This is mostly useful when the BinaryComputerOp in question has a
generic type as output, which needs to be narrowed to a concrete type for the
purposes of the UnaryFunctionOp portion's return type. In this
scenario, a BinaryHybridCF cannot be used directly with type-safe
generics.
For example, a UnaryComputerOp whose output variable is a
T extends RealType<T> cannot be a UnaryHybridCF because we do
not know at runtime which sort of RealType matches the caller's
T parameter. However, a separate UnaryFunctionOp can be
created whose output is typed on e.g. DoubleType, with the
computation delegating to the wrapped UnaryComputerOp.
SpecialOp.Flavor| Constructor and Description |
|---|
BFViaBC() |
| Modifier and Type | Method and Description |
|---|---|
O |
calculate(I1 input1,
I2 input2)
Calculates the output given two inputs.
|
void |
initialize()
Initializes the object.
|
in1, in2, out, run, setInput1, setInput2ops, setEnvironmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateWorkergetArity, getIndependentInstance, run, runcandidates, filterArity, opops, setEnvironmentin, in1, in2, setInput, setInput1, setInput2createOutputcalculate, getIndependentInstance, runcalculate, runrunpublic void initialize()
Initializableinitialize in interface Initializablepublic O calculate(I1 input1, I2 input2)
BinaryFunctionOpCopyright © 2014–2022 ImageJ. All rights reserved.