Giter Site home page Giter Site logo

Comments (16)

kaifox avatar kaifox commented on May 27, 2024 1

yes, then its clear!

Potentially uniqueValuesOf(...) as the other methods in Tensorics?

public static final <T> Set<T> Tensorics.uniqueValuesOf(Tensor<T> tensor);

In general, I clients should void using also the asMap() method directly ... In general, Tensorics.mapFrom(Tensor t) should be used. This calls asMap() if available, which makes it more efficient....

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

Hi @delph74

What would you expect as a return type of such a method?

from tensorics-core.

delph74 avatar delph74 commented on May 27, 2024

Hello @kaifox ,
We could return a Set, and in this case maybe call the method uniqueValues().
What do you think?

from tensorics-core.

agorzawski avatar agorzawski commented on May 27, 2024

Hi @delph74 and @kaifox

As far I remember, a tensor has no 'values' like method. But (if implements Mappable, and this is the case for the ImmutableTensor) it has .asMap()... which you follow with values().

The practical use of such values collection (only values) may be very limited, as this may vary with their position in the Tensor (coordinate).

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

Hey @agorzawski !!! Cool to see you here!

from tensorics-core.

agorzawski avatar agorzawski commented on May 27, 2024

@kaifox I just want to recall, that I have never left this project ;-)

from tensorics-core.

delph74 avatar delph74 commented on May 27, 2024

Yes @kaifox , something like that would be perfect.
I often use values for Map and I think for a Tensor we may have many usecase where such method would be needed!

from tensorics-core.

michi42 avatar michi42 commented on May 27, 2024

Maybe one more thing - there is Tensorics.stream(Tensor) that allows processing Position-Value pairs via the Java 8 streaming API, and TensorStreamFilters and TensorStreamMappers to help with filtering/mapping. Also there are some collectors to build tensors or tensorbackeds with streams in TensorStreams.

from tensorics-core.

delph74 avatar delph74 commented on May 27, 2024

yes of course it it possible and not to difficult to get all the values of a Tensor, like that for example
Tensorics.stream(betaStarParameters).map(Map.Entry::getValue).collect(toSet());

So nothing urgent or really missing, just for convenience and make it easier.

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

Good point @michi42 ! ... Still, convenience methods can still be justified... I think there is nothing against adding it.

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

@agorzawski , good to hear!

from tensorics-core.

michi42 avatar michi42 commented on May 27, 2024

Yes sure, I did not mean to object that :-)

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

I know ;-)

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

Just wanted to encourage @delph74 to add it if she feels like ;-)

from tensorics-core.

delph74 avatar delph74 commented on May 27, 2024

Yes why not, I would then add my first contribution to tensoric project ✌️ 😃

from tensorics-core.

kaifox avatar kaifox commented on May 27, 2024

Cooool!!!!!

from tensorics-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.