GithubHelp home page GithubHelp logo

Comments (4)

tomasaschan avatar tomasaschan commented on May 18, 2024

To state my own opinion, I think what makes the most sense is to exclude the end point from input (that is, to expect that the user does), and to reflect around the edges of input data. In other words, I propose that we expect the red point is not included in the input to correctly interpolate a sine wave from that data, and that we take the magenta approach for reflection.

from interpolations.jl.

timholy avatar timholy commented on May 18, 2024

I agree with that perspective on BCperiodic. As discussed in timholy/Grid.jl#31, I personally find the orange behavior most intuitive/useful for BCreflect, because otherwise sampling a vector of length n at 1:2n will not yield [x, x[end:-1:1]]. But I'm fine with a diversity of options being available.

from interpolations.jl.

tomasaschan avatar tomasaschan commented on May 18, 2024

I guess reflection behavior should also reflect the interpolations we're doing. It's possible to do linear interpolation with data given on half-nodes rather than on nodes (i.e. one line segment has its center on a given data point), in which case reflection on half-nodes give nicer results.

reflect2

In this image I've cheated, and just evaluated the function in different places for plotting purposes, but it's possible to construct the same linear interpolation from these points as the one up top. With this linear interpolation, there is no "no mans land" between the two end nodes, and sampling at 1:2n will still yield [x, x[end:-1:1]].

However, that's much more complicated than what we're currently doing (although I guess it could probably be expressed in terms of non-interpolating splines) so maybe not what we want to aim for...

from interpolations.jl.

tomasaschan avatar tomasaschan commented on May 18, 2024

This is thoroughly handled in #9, and as soon as that is working well I'll also merge #12 which documents the mathematics, so I'll close this for housekeeping.

tl;dr: All of the use cases above are supported by appropriate choice of OnCell/OnGrid.

from interpolations.jl.

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.