Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitely express multidimensionality and finite dimensionality #35

Open
kaifox opened this issue Aug 8, 2018 · 0 comments
Open

explicitely express multidimensionality and finite dimensionality #35

kaifox opened this issue Aug 8, 2018 · 0 comments

Comments

@kaifox
Copy link
Member

kaifox commented Aug 8, 2018

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 ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant