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: db4dceaac5ed
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 24ce4f5000cc
Choose a head ref
  • 17 commits
  • 18 files changed
  • 1 contributor

Commits on Oct 25, 2020

  1. Change the header file.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    a4dfc80 View commit details
  2. Half of the body file.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    da83a79 View commit details
  3. Second half of the body file.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    d09c882 View commit details
  4. Friends.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    019ce2d View commit details
  5. Apodization.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    324d328 View commit details
  6. Copy the full SHA
    167d153 View commit details
  7. Copy the full SHA
    ec1f326 View commit details
  8. Copy the full SHA
    1ebe119 View commit details
  9. Fix the basis test.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    e26b977 View commit details
  10. All tests passing.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    58714f4 View commit details
  11. Multiplication cleanup.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    d4cf418 View commit details
  12. Mathematica logging.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    25f524b View commit details
  13. Fix some code in physics.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    6d8d257 View commit details
  14. Copy the full SHA
    8f89aa5 View commit details
  15. Fix the remaining clients.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    532c8e0 View commit details
  16. Lint.

    pleroy committed Oct 25, 2020
    Copy the full SHA
    9392afd View commit details

Commits on Oct 26, 2020

  1. Merge pull request #2772 from pleroy/TwoDegrees

    Support for distinct degrees in Poisson series
    pleroy authored Oct 26, 2020
    Copy the full SHA
    24ce4f5 View commit details
4 changes: 2 additions & 2 deletions mathematica/mathematica.hpp
Original file line number Diff line number Diff line change
@@ -206,10 +206,10 @@ std::string ToMathematica(
PolynomialInMonomialBasis<V, A, d, E> const& polynomial,
OptionalExpressIn express_in = std::nullopt);

template<typename V, int d,
template<typename V, int ad, int pd,
template<typename, typename, int> class E,
typename OptionalExpressIn = std::nullopt_t>
std::string ToMathematica(PoissonSeries<V, d, E> const& series,
std::string ToMathematica(PoissonSeries<V, ad, pd, E> const& series,
OptionalExpressIn express_in = std::nullopt);

template<typename V, int d,
8 changes: 4 additions & 4 deletions mathematica/mathematica_body.hpp
Original file line number Diff line number Diff line change
@@ -120,10 +120,10 @@ std::string ToMathematicaExpression(
return Apply("Plus", monomials);
}

template<typename V, int d,
template<typename V, int ad, int pd,
template<typename, typename, int> class E,
typename OptionalExpressIn>
std::string ToMathematicaExpression(PoissonSeries<V, d, E> const& series,
std::string ToMathematicaExpression(PoissonSeries<V, ad, pd, E> const& series,
OptionalExpressIn express_in) {
std::vector<std::string> components = {
ToMathematicaExpression(series.aperiodic_, express_in)};
@@ -386,10 +386,10 @@ std::string ToMathematica(
return Apply("Function", {ToMathematicaExpression(polynomial, express_in)});
}

template<typename V, int d,
template<typename V, int ad, int pd,
template<typename, typename, int> class E,
typename OptionalExpressIn>
std::string ToMathematica(PoissonSeries<V, d, E> const& series,
std::string ToMathematica(PoissonSeries<V, ad, pd, E> const& series,
OptionalExpressIn express_in) {
return Apply("Function", {ToMathematicaExpression(series, express_in)});
}
14 changes: 7 additions & 7 deletions mathematica/mathematica_test.cpp
Original file line number Diff line number Diff line change
@@ -349,12 +349,12 @@ TEST_F(MathematicaTest, ToMathematica) {
ToMathematica(polynomial2));
}
{
using Series = PoissonSeries<double, 0, HornerEvaluator>;
using Series = PoissonSeries<double, 0, 0, HornerEvaluator>;
Instant const t0 = Instant() + 3 * Second;
Series series(Series::Polynomial({1.5}, t0),
Series series(Series::AperiodicPolynomial({1.5}, t0),
{{4 * Radian / Second,
{/*sin=*/Series::Polynomial({0.5}, t0),
/*cos=*/Series::Polynomial({-1}, t0)}}});
{/*sin=*/Series::PeriodicPolynomial({0.5}, t0),
/*cos=*/Series::PeriodicPolynomial({-1}, t0)}}});
EXPECT_EQ(
"Function["
"Plus["
@@ -393,10 +393,10 @@ TEST_F(MathematicaTest, ToMathematica) {
using PiecewiseSeries = PiecewisePoissonSeries<double, 0, HornerEvaluator>;
using Series = PiecewiseSeries::Series;
Instant const t0 = Instant() + 3 * Second;
Series series(Series::Polynomial({1.5}, t0),
Series series(Series::AperiodicPolynomial({1.5}, t0),
{{4 * Radian / Second,
{/*sin=*/Series::Polynomial({0.5}, t0),
/*cos=*/Series::Polynomial({-1}, t0)}}});
{/*sin=*/Series::PeriodicPolynomial({0.5}, t0),
/*cos=*/Series::PeriodicPolynomial({-1}, t0)}}});
Interval<Instant> interval{t0 - 2 * Second, t0 + 3 * Second};
PiecewiseSeries pw(interval, series);
EXPECT_EQ(
40 changes: 20 additions & 20 deletions numerics/apodization.hpp
Original file line number Diff line number Diff line change
@@ -16,48 +16,48 @@ using geometry::Instant;

// ISO 18431-2:2004, section 5.4.
template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> Dirichlet(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> Dirichlet(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> Sine(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> Sine(Instant const& t_min,
Instant const& t_max);

// ISO 18431-2:2004, section 5.2.
template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> Hann(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> Hann(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> Hamming(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> Hamming(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> Blackman(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> Blackman(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> ExactBlackman(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> ExactBlackman(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> Nuttall(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> Nuttall(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> BlackmanNuttall(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> BlackmanNuttall(Instant const& t_min,
Instant const& t_max);

template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> BlackmanHarris(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> BlackmanHarris(Instant const& t_min,
Instant const& t_max);

// The flat-top window in Wikipedia is not normalized and comes from Matlab (?).
// We use the normalized function from ISO 18431-2:2004/Cor.1:2008, section 5.3
// instead.
template<template<typename, typename, int> class Evaluator>
PoissonSeries<double, 0, Evaluator> ISO18431_2(Instant const& t_min,
Instant const& t_max);
PoissonSeries<double, 0, 0, Evaluator> ISO18431_2(Instant const& t_min,
Instant const& t_max);

} // namespace internal_apodization

Loading