I
- type of inputO
- type of outputpublic interface UnaryHybridCI<I,O extends I> extends UnaryComputerOp<I,O>, UnaryInplaceOp<I,O>
UnaryComputerOp
or
UnaryInplaceOp
.
To populate a preallocated output object, call
UnaryComputerOp.compute(I, O)
; to compute inplace, call
UnaryInplaceOp.mutate(O)
. To do any of these things as appropriate, call
run(Object, Object)
.
UnaryHybridCI
SpecialOp.Flavor
Modifier and Type | Method and Description |
---|---|
default UnaryHybridCI<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 |
mutate(O arg)
Mutates the given input argument in-place.
|
default void |
run() |
default O |
run(I input,
O output)
Executes the operation in a type-safe but flexible way.
|
default O |
run(O output)
Executes the operation in a type-safe but flexible way.
|
compute, compute
setOutput
in
candidates, filterArity, op
ops, setEnvironment
initialize
setInput
default void mutate(O arg)
UnaryInplaceOp
mutate
in interface UnaryInplaceOp<I,O extends I>
arg
- of the UnaryInplaceOp
default O run(I input, O output)
UnaryOp
The exact behavior depends on the type of special op.
run
in interface UnaryComputerOp<I,O extends I>
run
in interface UnaryInplaceOp<I,O extends I>
run
in interface UnaryOp<I,O extends I>
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)
,
UnaryHybridCF.run(Object, Object)
default O run(O output)
NullaryOp
The exact behavior depends on the type of special op.
run
in interface NullaryComputerOp<O extends I>
run
in interface NullaryOp<O extends I>
run
in interface UnaryInplaceOp<I,O extends I>
output
- reference where the operation's result will be storedNullaryComputerOp.run(Object)
,
NullaryFunctionOp.run(Object)
,
NullaryHybridCF.run(Object)
default void run()
default UnaryHybridCI<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 extends I>
getIndependentInstance
in interface NullaryOp<O extends I>
getIndependentInstance
in interface SpecialOp
getIndependentInstance
in interface Threadable
getIndependentInstance
in interface UnaryComputerOp<I,O extends I>
getIndependentInstance
in interface UnaryInplaceOp<I,O extends I>
getIndependentInstance
in interface UnaryOp<I,O extends I>
Copyright © 2014–2022 ImageJ. All rights reserved.