Comments (16)
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.
Hi @delph74
What would you expect as a return type of such a method?
from tensorics-core.
Hello @kaifox ,
We could return a Set, and in this case maybe call the method uniqueValues().
What do you think?
from tensorics-core.
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.
Hey @agorzawski !!! Cool to see you here!
from tensorics-core.
@kaifox I just want to recall, that I have never left this project ;-)
from tensorics-core.
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.
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.
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.
Good point @michi42 ! ... Still, convenience methods can still be justified... I think there is nothing against adding it.
from tensorics-core.
@agorzawski , good to hear!
from tensorics-core.
Yes sure, I did not mean to object that :-)
from tensorics-core.
I know ;-)
from tensorics-core.
Just wanted to encourage @delph74 to add it if she feels like ;-)
from tensorics-core.
Yes why not, I would then add my first contribution to tensoric project ✌️ 😃
from tensorics-core.
Cooool!!!!!
from tensorics-core.
Related Issues (20)
- Add possibility for tensors with 'preferred' dimensions
- Separate Expressions from the Data/Manipulation part of the package. HOT 3
- Context should become Position HOT 3
- Drop the Entry Interface HOT 1
- Introduce Scalar HOT 2
- Remove asMap() method from Tensor interface HOT 3
- Remove deprecated put-method variants from TensorBuilder HOT 3
- Make builder methods chainable HOT 2
- How to correctly treat equality of tensors? HOT 1
- Agree and streamline treatment of context in tensor HOT 3
- Better support for Tensorbackeds HOT 5
- Consistently Treat Reduction with Resampling
- explicitely express multidimensionality and finite dimensionality
- Provide limited support for tensors of typed dimensions HOT 5
- Builder Value Type is not well defined after builder(Class<?> ...) method ... Consider PreBuilders
- Provide a simple method to create Tensor<QuantifiedValue> of three tensors
- Fix Travis build HOT 2
- More convenient cartesian product method for positions
- Add Boolean operations support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorics-core.