Added function slicedExactly - #482
Conversation
| /++ | ||
| Creates an n-dimensional slice-shell over an iterator having the exact elemnt count as that of the array. | ||
| Params: | ||
| iterator = An iterator, a pointer, or an array. |
There was a problem hiding this comment.
It can be a dynamic array or an ndslice: those have length.
So you will have two tiny overloads.
There was a problem hiding this comment.
thanks. added the second overload👍.
can you tell me why circleci is failing everytime? unable to figure out
| Returns: | ||
| n-dimensional slice | ||
| +/ | ||
| auto slicedExactly(size_t N, Iterator)(return scope Iterator iterator, size_t[N] lengths...) |
There was a problem hiding this comment.
return scope T[] array, keep it simple
|
Mir is very strict on API rules. A function with name |
I would need mir for a college project which I was thinking of coding in D. My project would need time-series and I thought working on it for mir would be a good idea. Given mir's current state, I'll work on it then in my own library. Thanks for the review either way. |
|
maybe it could be useful https://github.com/libmir/mir-algorithm/blob/master/source/mir/series.d |
Thanks |
|
@Iskaban10 From the forum thread, I thought your focus was a SAOC project involving mir, rather than a college project. I think my recommendations from the thread might be somewhat different for a college project. With SAOC, it's kind like you have to use D. With a college project, you could conceivably use any language or at maybe pick from a list that the instructor approves of. From the college project perspective, the question would be more like "how effectively could I do this in D vs some other language". Without knowing more details on your project, I wouldn't be able to say much. I do a decent amount of time series analysis of economic and market data, and I probably use R the most for that. I was trying to build out more functionality in D through mir, but I think the big missing thing in mir is probably improved support for data frames. But depending on what you want to do, the functionality in mir may be sufficient. It's hard to say without knowing more about what you want to do. I would generally agree with what Lance Bachmeier says on the forum that the more you can pull in from other languages, probably the better. He has tools that lets you interact between R and D for instance. So for instance if you start an R project and find that a part is slow, then you can use his tools to pull in a D function, like with Rcpp. Or vice-versa if you have a D project you can launch an R interpreter and potentially offload some analysis to that. |
|
Hi @jmh530 Since FEA is computationally very heavy and mir is light and fast, I thought of doing something with D. For SAOC I'd only focus on working and contributing to mir, the college project would be a personal project since it requires more time. I'd love to know what you guys think of it and I'll apply for SAoC based on your feeedback. I haven't added anything regarding dataframes in the proposal because I checked there has been previous GSoC work for it but if there's a need or scope for improvements, I'll be more than happy to contribute to this as well. |
|
@Iskaban10 I'm not too familiar with civil engineering. But one option is always to write that in D and then call it from another language that the other functionality you need. Alternately if you want to keep everything in D, there are optimizers written in C, then you should be able to call them with importC. On the SAOC, I would defer to @9il on the enhancements to mir-algorithm. Some of the work on mir-stat you are interested in could probably be done without that. For instance, an autocorrelation function would work just fine without having time indices. It might be nice for it to be aware of the time indices, but the actual calculation doesn't need it. You can call |
|
Considering the current direction of the mir ecosystem, I think it would be better for me to focus on my college project for now. Since my project already involves many of these numerical problems, I can explore them there and hopefully identify areas where they could later translate into useful contributions to Mir. Thank you @jmh530 for your suggestions and feedback. |
fixes #313