swift
802d516a - [Accelerate] [Quadrature] New Quadrature Overlay (#23127)

Commit
6 years ago
[Accelerate] [Quadrature] New Quadrature Overlay (#23127) * [Accelerate] [Quadrature] New Quadrature Overlay A class that simplifies approximating the definite integral of a function. * Fixes in response to PR Review. Change `@_exported import Accelerate` to `import Accelerate`. Correct date in copyright comment. * Code Review Fixes. * Remove mutable integrator, simply set options in init(). * Remove mutable `maxIntervals` and `qagPointsPerInterval`. * Update tests. * Code Review Fixes. * Use standard library `Result`. * Implement `QAGPointsPerInterval` as a struct. * Tidy up Passing Integrand to `quadrature_integrate_function`. Pass the integrand closure directly to the `quadrature_integrate_function` initialiser rather than attaching as a property of the `Quadrature` class. * Make `Quadrature` a struct, and remove requirement for `integrand` to be escaping. * Code Review Changes * Add long-form integrator algorithm aliases (update tests to use these aliases). * Make quadrature error description public. * New tests for error description and `QAGPointsPerInterval`. * Vectorized Integrand for Quadrature Create an alternative implementation of `integrate` that accepts an integrand of type `(_ input: UnsafeBufferPointer<Double>, _ result: UnsafeMutableBufferPointer<Double>)`. * Vectorized Integrand for Quadrature Create an alternative implementation of `integrate` that accepts an integrand of type `(_ input: UnsafeBufferPointer<Double>, _ result: UnsafeMutableBufferPointer<Double>)`. * Vectorized Integrand for Quadrature Remove _ContiguousCollection - it's no longer used. * Delete ContiguousCollection.swift Not required. * Refactor tests.
Author
Committer
Parents
Loading