Gleb Minaev lounres
  • St. Petersburg, Russia – Moscow, Russia
  • Joined on 2022-09-20
lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

As well as I understand, whole body of the function can be replaced with just

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

I would recommend writing

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

I would recommend rewriting it with old good plain loop on indices:

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

Also, is it intended that the spline will ignore double extrema?

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd
lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

Is it intended that previous mode is assigned to current parameter of relativeDifference and current (new) mode is assigned to previous parameter of relativeDifference? The parameters names say that there is a swap of parameters.

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

Use = notation for inline bodies, please:

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

It's better to store sign instead of the value which sign is compared, to not compute it each iteration.

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

I suggest adding a sentence that describes what is actually returned. And possible typos fix as well.

lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd
lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd
lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd
lounres commented on pull request kscience/kmath#521 2024-04-25 18:54:03 +03:00
WIP: feature/emd

Good work! But there is a bit of work to do.

lounres commented on pull request kscience/kmath#521 2024-04-25 18:12:08 +03:00
WIP: feature/emd

By the way, in general you'll have to use T as L. Otherwise, either interpolate can not be resolved in snippet

interpolator.interpolate(
    Buffer(extrema.size) { signal.labels[ext
lounres commented on pull request kscience/kmath#521 2024-04-25 17:18:54 +03:00
WIP: feature/emd

Also, similar question to this one.

lounres commented on pull request kscience/kmath#521 2024-04-25 17:17:55 +03:00
WIP: feature/emd

Also, is it intended that the spline will ignore double extrema?

I mean for series [0.0, 0.0, 1.0, 1.0, -1.0, -1.0] there will be no maxima and minima points but the end points.