I1
- type of first inputI2
- type of second inputO
- type of outputpublic interface BinaryHybridCF<I1,I2,O> extends BinaryComputerOp<I1,I2,O>, BinaryFunctionOp<I1,I2,O>, BinaryOutputFactory<I1,I2,O>, UnaryHybridCF<I1,O>
BinaryComputerOp
or
BinaryFunctionOp
.
To populate a preallocated output object, call
BinaryComputerOp.compute(I1, I2, O)
; to compute a new output object, call
BinaryFunctionOp.calculate(I1, I2)
. To do any of these things as appropriate,
call run(Object, Object, Object)
.
BinaryHybridCFI
,
BinaryHybridCFI1
SpecialOp.Flavor
Modifier and Type | Method and Description |
---|---|
default O |
calculate(I1 input)
Calculates the output given some input.
|
default O |
calculate(I1 input1,
I2 input2)
Calculates the output given two inputs.
|
default O |
createOutput(I1 input)
Create an output object given some input.
|
default BinaryHybridCF<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 void |
run() |
default O |
run(I1 input1,
I2 input2,
O output)
Executes the operation in a type-safe but flexible way.
|
compute, compute
in, in1, in2, setInput, setInput1, setInput2
createOutput
calculate, createOutput, run
compute
run
setOutput
candidates, filterArity, op
ops, setEnvironment
initialize
default O calculate(I1 input1, I2 input2)
BinaryFunctionOp
calculate
in interface BinaryFunctionOp<I1,I2,O>
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 BinaryComputerOp<I1,I2,O>
run
in interface BinaryFunctionOp<I1,I2,O>
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)
,
BinaryFunctionOp.run(Object, Object, Object)
,
BinaryInplaceOp.run(Object, Object, Object)
,
run(Object, Object, Object)
default O calculate(I1 input)
UnaryFunctionOp
calculate
in interface BinaryFunctionOp<I1,I2,O>
calculate
in interface UnaryFunctionOp<I1,O>
calculate
in interface UnaryHybridCF<I1,O>
input
- Argument to the functiondefault O createOutput(I1 input)
UnaryOutputFactory
createOutput
in interface UnaryOutputFactory<I1,O>
input
- which determines how to create the outputdefault void run()
run
in interface BinaryComputerOp<I1,I2,O>
run
in interface BinaryOp<I1,I2,O>
run
in interface NullaryComputerOp<O>
run
in interface NullaryHybridCF<O>
run
in interface NullaryOp<O>
run
in interface Runnable
run
in interface UnaryComputerOp<I1,O>
run
in interface UnaryHybridCF<I1,O>
run
in interface UnaryOp<I1,O>
default BinaryHybridCF<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 BinaryComputerOp<I1,I2,O>
getIndependentInstance
in interface BinaryFunctionOp<I1,I2,O>
getIndependentInstance
in interface BinaryOp<I1,I2,O>
getIndependentInstance
in interface NullaryComputerOp<O>
getIndependentInstance
in interface NullaryFunctionOp<O>
getIndependentInstance
in interface NullaryHybridCF<O>
getIndependentInstance
in interface NullaryOp<O>
getIndependentInstance
in interface SpecialOp
getIndependentInstance
in interface Threadable
getIndependentInstance
in interface UnaryComputerOp<I1,O>
getIndependentInstance
in interface UnaryFunctionOp<I1,O>
getIndependentInstance
in interface UnaryHybridCF<I1,O>
getIndependentInstance
in interface UnaryOp<I1,O>
Copyright © 2014–2022 ImageJ. All rights reserved.