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
This comes from a comment from michi on the resampling pull request:
" I don't think it's clear from the code that a Tensoric is supposed to be bound to a certain dimension set, as the dimension set is by no way obtainable from the interface ..."
I fully agree with Michis comment on the tensoric. I thought in similar ways, but left out this, as it was not immediately necessary ... and was not exactly shure how to implement it. I see the following options:
a) Extract an interface from shape, which would contain the following methods:
int dimensionality();
contains(...)
Set<Class<?>> dimensions(); (BTW I would like to introduce this as a replacement for dimensionSet(), as it is more conform to our other namings (and deprecate dimensionSet())
The name of the interface could be e.g. Dimensional
(NOTE: If the contains(..) method belongs here is not fully clear ... probably better a dedicated interface....
Shape and Tensoric would then implement this... (and thus also the tensor, which might be convenient in any case and simply delegate to shape())
b) Optionally, we could have a similar interface/object e.g. called Dimensionality which could be returned from Tensoric by a dimensionality() method....
c) We could strip down the Shape interface (which anyhow should be created) to those methods and e.g. rename the actual Shape (with the positions() method) to something like a FiniteShape....
Tensoric would then have a method:
Shape shape();
and Tensor could then override this by:
FiniteShape shape();
I think I like c) for the moment ... probably with a combination of a) so that we have the convenience methods in Tensor + Tensoric.
... still undesided ... input welcome ;-)
The text was updated successfully, but these errors were encountered:
This comes from a comment from michi on the resampling pull request:
" I don't think it's clear from the code that a Tensoric is supposed to be bound to a certain dimension set, as the dimension set is by no way obtainable from the interface ..."
#33
I fully agree with Michis comment on the tensoric. I thought in similar ways, but left out this, as it was not immediately necessary ... and was not exactly shure how to implement it. I see the following options:
a) Extract an interface from shape, which would contain the following methods:
int dimensionality();
contains(...)
Set<Class<?>> dimensions();
(BTW I would like to introduce this as a replacement for dimensionSet(), as it is more conform to our other namings (and deprecate dimensionSet())The name of the interface could be e.g. Dimensional
(NOTE: If the
contains(..)
method belongs here is not fully clear ... probably better a dedicated interface....Shape and Tensoric would then implement this... (and thus also the tensor, which might be convenient in any case and simply delegate to shape())
b) Optionally, we could have a similar interface/object e.g. called Dimensionality which could be returned from Tensoric by a dimensionality() method....
c) We could strip down the Shape interface (which anyhow should be created) to those methods and e.g. rename the actual Shape (with the positions() method) to something like a FiniteShape....
Tensoric would then have a method:
Shape shape();
and Tensor could then override this by:
FiniteShape shape();
I think I like c) for the moment ... probably with a combination of a) so that we have the convenience methods in Tensor + Tensoric.
... still undesided ... input welcome ;-)
The text was updated successfully, but these errors were encountered: