Modifier and Type | Method and Description |
---|---|
<R> R |
apply(java.util.function.BiFunction<T,T,R> function)
Apply a
BiFunction to both elements. |
T |
atInputScale()
The element scaled to match the size of the input-image.
|
T |
atModelScale()
The element scaled to match the size of the input for model inference.
|
<S,U> DualScale<S> |
combine(DualScale<U> other,
java.util.function.BiFunction<T,U,S> combineFunction)
Create a derived
DualScale by combining the respective elements of this instance with
another. |
<S> DualScale<S> |
map(java.util.function.Function<T,S> mappingFunction)
Create a derived
DualScale by applying an identical mapping to each element. |
public T atInputScale()
public T atModelScale()
public <S> DualScale<S> map(java.util.function.Function<T,S> mappingFunction)
DualScale
by applying an identical mapping to each element.S
- the target element-type after the mapping.mappingFunction
- maps an instance of type T
to type S
.DualScale
containing the mapped instances.public <S,U> DualScale<S> combine(DualScale<U> other, java.util.function.BiFunction<T,U,S> combineFunction)
DualScale
by combining the respective elements of this instance with
another.S
- the target element-type after combining.U
- the element-type of other
.other
- the other DualScale
to combine with.combineFunction
- combines the respective elements from the two DualScale
s to
form an element in the derived instance.DualScale
containing the respectiuve outputs from combineFunction
.public <R> R apply(java.util.function.BiFunction<T,T,R> function)
BiFunction
to both elements.R
- the return type of the BiFunction
.function
- the function to apply, to the input-scale and model-scale elements,
respectively.function
to the respective elements.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.