I1
- type of first inputI2
- type of second inputO
- type of outputpublic interface BinaryComputerOp<I1,I2,O> extends BinaryOp<I1,I2,O>, UnaryComputerOp<I1,O>
A binary computer may be treated as a UnaryComputerOp
by holding the
second input constant, or treated as a NullaryComputerOp
by holding
both inputs constant.
BinaryFunctionOp
,
BinaryInplaceOp
SpecialOp.Flavor
Modifier and Type | Method and Description |
---|---|
void |
compute(I1 input1,
I2 input2,
O output)
Computes the output given two inputs.
|
default void |
compute(I1 input,
O output)
Computes the output given some input.
|
default BinaryComputerOp<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.
|
in, in1, in2, setInput, setInput1, setInput2
compute, run
run
candidates, filterArity, op
ops, setEnvironment
initialize
setOutput
void compute(I1 input1, I2 input2, O output)
input1
- first argument to the computation, which
must be non-nullinput2
- second argument to the computation, which
must be non-nulloutput
- object where the computation's result will be stored, which
must be non-null and a different object than
input1
and input2
default 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 storedrun(Object, Object, Object)
,
BinaryFunctionOp.run(Object, Object, Object)
,
BinaryInplaceOp.run(Object, Object, Object)
,
BinaryHybridCF.run(Object, Object, Object)
default void compute(I1 input, O output)
UnaryComputerOp
compute
in interface UnaryComputerOp<I1,O>
input
- Argument to the computation, which must be non-nulloutput
- Object where the computation's result will be stored, which
must be non-null and a different object than input
default void run()
default BinaryComputerOp<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 NullaryComputerOp<O>
getIndependentInstance
in interface NullaryOp<O>
getIndependentInstance
in interface SpecialOp
getIndependentInstance
in interface Threadable
getIndependentInstance
in interface UnaryComputerOp<I1,O>
getIndependentInstance
in interface UnaryOp<I1,O>
Copyright © 2014–2022 ImageJ. All rights reserved.