How to use the adaptive.learner.integrator_learner._Interval function in adaptive

To help you get started, we’ve selected a few adaptive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python-adaptive / adaptive / adaptive / learner / integrator_learner.py View on Github external
def split(self):
        points = self.points()
        m = points[len(points) // 2]
        ivals = [
            _Interval(self.a, m, 0, self.rdepth + 1),
            _Interval(m, self.b, 0, self.rdepth + 1),
        ]
        self.children = ivals
        for ival in ivals:
            ival.parent = self
            ival.ndiv = self.ndiv
            ival.err = self.err / 2

        return ivals
github python-adaptive / adaptive / adaptive / learner / integrator_learner.py View on Github external
def split(self):
        points = self.points()
        m = points[len(points) // 2]
        ivals = [_Interval(self.a, m, 0, self.rdepth + 1),
                 _Interval(m, self.b, 0, self.rdepth + 1)]
        self.children = ivals
        for ival in ivals:
            ival.parent = self
            ival.ndiv = self.ndiv
            ival.err = self.err / 2

        return ivals
github python-adaptive / adaptive / adaptive / learner / integrator_learner.py View on Github external
def split(self):
        points = self.points()
        m = points[len(points) // 2]
        ivals = [_Interval(self.a, m, 0, self.rdepth + 1),
                 _Interval(m, self.b, 0, self.rdepth + 1)]
        self.children = ivals
        for ival in ivals:
            ival.parent = self
            ival.ndiv = self.ndiv
            ival.err = self.err / 2

        return ivals
github python-adaptive / adaptive / adaptive / learner / integrator_learner.py View on Github external
def split(self):
        points = self.points()
        m = points[len(points) // 2]
        ivals = [
            _Interval(self.a, m, 0, self.rdepth + 1),
            _Interval(m, self.b, 0, self.rdepth + 1),
        ]
        self.children = ivals
        for ival in ivals:
            ival.parent = self
            ival.ndiv = self.ndiv
            ival.err = self.err / 2

        return ivals
github python-adaptive / adaptive / adaptive / learner / integrator_learner.py View on Github external
    @classmethod
    def make_first(cls, a, b, depth=2):
        ival = _Interval(a, b, depth, rdepth=1)
        ival.ndiv = 0
        ival.parent = None
        ival.err = sys.float_info.max  # needed because inf/2 == inf
        return ival
github python-adaptive / adaptive / adaptive / learner / integrator_learner.py View on Github external
def make_first(cls, a, b, depth=2):
        ival = _Interval(a, b, depth, rdepth=1)
        ival.ndiv = 0
        ival.parent = None
        ival.err = sys.float_info.max  # needed because inf/2 == inf
        return ival