I
- type of inputO
- type of outputpublic interface UnaryHybridCF<I,O> extends UnaryComputerOp<I,O>, UnaryFunctionOp<I,O>, UnaryOutputFactory<I,O>, NullaryHybridCF<O>
UnaryComputerOp
or
UnaryFunctionOp
.
To populate a preallocated output object, call
UnaryComputerOp.compute(I, O)
; to compute a new output object, call
UnaryFunctionOp.calculate(I)
. To do any of these things as appropriate,
call run(Object, Object)
.
UnaryHybridCFI
SpecialOp.Flavor
Modifier and Type | Method and Description |
---|---|
default O |
calculate()
Calculates the output value.
|
default O |
calculate(I input)
Calculates the output given some input.
|
default O |
createOutput()
Create an output object.
|
default UnaryHybridCF<I,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(I input,
O output)
Executes the operation in a type-safe but flexible way.
|
compute, compute
in, setInput
createOutput
run
setOutput
candidates, filterArity, op
ops, setEnvironment
initialize
default O calculate(I input)
UnaryFunctionOp
calculate
in interface UnaryFunctionOp<I,O>
input
- Argument to the functiondefault O run(I input, O output)
UnaryOp
The exact behavior depends on the type of special op.
run
in interface UnaryComputerOp<I,O>
run
in interface UnaryFunctionOp<I,O>
run
in interface UnaryOp<I,O>
input
- argument to the operationoutput
- reference where the operation's result will be storedUnaryComputerOp.run(Object, Object)
,
UnaryFunctionOp.run(Object, Object)
,
UnaryInplaceOp.run(Object, Object)
,
run(Object, Object)
default O calculate()
NullaryFunctionOp
calculate
in interface NullaryFunctionOp<O>
calculate
in interface NullaryHybridCF<O>
calculate
in interface UnaryFunctionOp<I,O>
default O createOutput()
NullaryOutputFactory
createOutput
in interface NullaryOutputFactory<O>
default void run()
default UnaryHybridCF<I,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 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<I,O>
getIndependentInstance
in interface UnaryFunctionOp<I,O>
getIndependentInstance
in interface UnaryOp<I,O>
Copyright © 2014–2022 ImageJ. All rights reserved.