You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, that a prototype of multidimensional resampling is in place, it is time to think, how to combine the two (i.e. use resampling during reduction). This is basically the generalization of the already available
One way is of course to add more methods like this and stay with the dogma, to only reduce one dimension at a time. However, for resampling, another road was probed which probably looks a bit more modern (more stream-like ;-), namely potentially defining several dimension in one clause. The disadvantage would of course be that we have more than one parameter per method ;-)
What I mean could be something like the following:
Tensor<V> reduced = Tensorics.reduce(aTensor)
.sliceAt(Coord1.class, c1) // exact; only available values would be taken into account
.then().repeatAt(Coord2.class, c2) //
.toTensor();
As a bonus, one could even add at the end things like:
toScalar(); // would throw if not zero dimensions
to(ATensorbacked.class); // would throw if dimensions not compatible
With a starting point that is FieldAware one could accomplish:
TensoricDouble.reduce(aDoubleTensor)
.sliceAt(Coord1.class, c1) // exact; only available values would be taken into account
.then().repeatAt(Coord2.class, c2) //
.then().linearAt(Coord3.class, c3, Coord3::doubleValue)
.then().average(Coord4.class)
.then().rms(Coord5.class)
.toTensor();
What are your opinions?
The text was updated successfully, but these errors were encountered:
Now, that a prototype of multidimensional resampling is in place, it is time to think, how to combine the two (i.e. use resampling during reduction). This is basically the generalization of the already available
from(aTensor).reduce(ACoordinate.class).byInterpolatedSlicing(...);
One way is of course to add more methods like this and stay with the dogma, to only reduce one dimension at a time. However, for resampling, another road was probed which probably looks a bit more modern (more stream-like ;-), namely potentially defining several dimension in one clause. The disadvantage would of course be that we have more than one parameter per method ;-)
What I mean could be something like the following:
As a bonus, one could even add at the end things like:
With a starting point that is FieldAware one could accomplish:
What are your opinions?
The text was updated successfully, but these errors were encountered: