Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 26d9ed251c25
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d5b5d37858e8
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Sep 29, 2020

  1. Optimize += and -=.

    pleroy committed Sep 29, 2020
    Copy the full SHA
    88ab81a View commit details
  2. Merge pull request #2741 from pleroy/Increment

    Optimize += and -= for piecewise Poisson series by not falling back to + and -
    pleroy authored Sep 29, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d5b5d37 View commit details
Showing with 8 additions and 2 deletions.
  1. +8 −2 numerics/poisson_series_body.hpp
10 changes: 8 additions & 2 deletions numerics/poisson_series_body.hpp
Original file line number Diff line number Diff line change
@@ -685,7 +685,10 @@ template<typename V, int d, template<typename, typename, int> class E>
PiecewisePoissonSeries<Value, degree_, Evaluator>&
PiecewisePoissonSeries<Value, degree_, Evaluator>::operator+=(
PoissonSeries<V, d, E> const& right) {
*this = *this + right;
for (int i = 0; i < series_.size(); ++i) {
auto& series = series_[i];
series += right.AtOrigin(series.origin());
}
return *this;
}

@@ -695,7 +698,10 @@ template<typename V, int d, template<typename, typename, int> class E>
PiecewisePoissonSeries<Value, degree_, Evaluator>&
PiecewisePoissonSeries<Value, degree_, Evaluator>::operator-=(
PoissonSeries<V, d, E> const& right) {
*this = *this - right;
for (int i = 0; i < series_.size(); ++i) {
auto& series = series_[i];
series -= right.AtOrigin(series.origin());
}
return *this;
}