JuliaAtoms / AtomicLevels.jl

https://juliaatoms.org/AtomicLevels.jl
Other
12 stars 3 forks source link

Transition from Rational to HalfInteger #7

Closed jagot closed 5 years ago

jagot commented 5 years ago

In many places, Rationals are being used for angular momenta. These can be more efficiently represented by HalfInteger from WignerSymbols.jl. E.g Term would simply be

struct Term
    L::HalfInteger
    S::HalfInteger
    parity::Parity
end
jagot commented 5 years ago

We should also ask @Jutho to export the HalfInteger interface.

Jutho commented 5 years ago

You mean a simple export HalfInteger in WignerSymbols.jl? I am certainly fine with that.

mortenpi commented 5 years ago

Would you also consider some minor API additions? I have a version of your HalfInteger with some updates in one of the PRs. I would be more than happy to prepare a PR against WignerSymbols.

Jutho commented 5 years ago

Yes I am open to such changes and would probably benefit from them as well. The most Julian choice for the constructor was also something I was wondering about.