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>
BinaryFunctionOp
s that delegate to
BinaryComputerOp
s.
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, setInput2
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createWorker
getArity, getIndependentInstance, run, run
candidates, filterArity, op
ops, setEnvironment
in, in1, in2, setInput, setInput1, setInput2
createOutput
calculate, getIndependentInstance, run
calculate, run
run
public void initialize()
Initializable
initialize
in interface Initializable
public O calculate(I1 input1, I2 input2)
BinaryFunctionOp
Copyright © 2014–2022 ImageJ. All rights reserved.