I1
- type of first inputI2
- type of second inputO
- type of outputpublic interface BinaryFunctionOp<I1,I2,O> extends BinaryOp<I1,I2,O>, UnaryFunctionOp<I1,O>
A binary function may be treated as a UnaryFunctionOp
by holding the
second input constant, or treated as a NullaryFunctionOp
by holding
both inputs constant.
BinaryComputerOp
,
BinaryInplaceOp
SpecialOp.Flavor
Modifier and Type | Method and Description |
---|---|
default O |
calculate(I1 input)
Calculates the output given some input.
|
O |
calculate(I1 input1,
I2 input2)
Calculates the output given two inputs.
|
default BinaryFunctionOp<I1,I2,O> |
getIndependentInstance()
Gets a reference to an instance of this object which can be used
simultaneously from a second thread while this instance is being used from
"its" thread.
|
default O |
run(I1 input1,
I2 input2,
O output)
Executes the operation in a type-safe but flexible way.
|
in, in1, in2, setInput, setInput1, setInput2
calculate, run
run
candidates, filterArity, op
ops, setEnvironment
initialize
O calculate(I1 input1, I2 input2)
input1
- first argument to the functioninput2
- second argument to the functiondefault O run(I1 input1, I2 input2, O output)
BinaryOp
The exact behavior depends on the type of special op.
run
in interface BinaryOp<I1,I2,O>
input1
- first argument to the operationinput2
- second argument to the operationoutput
- reference where the operation's result will be storedBinaryComputerOp.run(Object, Object, Object)
,
run(Object, Object, Object)
,
BinaryInplaceOp.run(Object, Object, Object)
,
BinaryHybridCF.run(Object, Object, Object)
default O calculate(I1 input)
UnaryFunctionOp
calculate
in interface UnaryFunctionOp<I1,O>
input
- Argument to the functiondefault BinaryFunctionOp<I1,I2,O> getIndependentInstance()
Threadable
It is expected that subclasses which override this method will narrow the return type appropriately. We do not enforce this at compile time via recursive generics due to their complexity: they introduce a host of typing difficulties.
getIndependentInstance
in interface BinaryOp<I1,I2,O>
getIndependentInstance
in interface NullaryFunctionOp<O>
getIndependentInstance
in interface NullaryOp<O>
getIndependentInstance
in interface SpecialOp
getIndependentInstance
in interface Threadable
getIndependentInstance
in interface UnaryFunctionOp<I1,O>
getIndependentInstance
in interface UnaryOp<I1,O>
Copyright © 2014–2022 ImageJ. All rights reserved.