Commit graph

13 commits

Author SHA1 Message Date
Morten Piibeleht
8ebb2c791b Partially revamp the HalfInteger type (#4)
* Call the HalfInteger field twofold

Makes it more immediately obvious what the meaning of the value stored
in the field is.

* Introduce new constructors for HalfInteger

The primary inner constructor mirrors the two-argument constructor of
the Rational type, where the user provides the numerator and denominator
values.

There is also a single argument outer constructor that makes HalfInteger
behave like a normal numeric type such that HalfInteger(n) == n.

* Move HalfInteger tests to a separate file

The using statements in halfinteger.jl are there so that it would be
possible to run the file separately from the other tests.

* Test the single-argument HalfInteger constructor

* Organize halfinteger.jl a bit

Prioritise the convert methods.

* Add multiplication with integer to HalfInteger

* Implement parsing and printing for HalfInteger

* parse(::HalfInteger, x) method
* Overload show to pretty-print HalfInteger

* Overload Base.numerator/denominator

And add tests for the other supplementary functions and methods as
well.

* Add HalfIntegerRange type

Can be constructed using the range operator :. Currently only supports
unit steps in the positive direction.

* Address feedback

* Rename .twofold -> .numerator
* Consistent variable names
* Remove unnecessary methods for HalfIntegerRange

* Allow constructing HalfIntegerRange with non-integer difference

* Add docs and ceil(::HalfInteger)
2019-01-10 21:50:46 +01:00
Jutho
39bbd0ced8 update HalfInteger 2018-10-05 17:20:22 +02:00
Jutho Haegeman
3400fe8577 update tests 2018-07-10 02:07:31 +02:00
Jutho Haegeman
dd208b42a6 first attempt to (exclusive) v0.7 compatibility 2018-06-21 23:29:33 +02:00
Jutho Haegeman
cdb460332c speed improvement plus v0.7 compatibility 2018-01-31 17:10:37 +08:00
Jutho Haegeman
b734fe001f Update for latest version of v0.7 2017-12-08 00:52:21 +01:00
Jutho Haegeman
dd75309fe6 Enable precompilation 2017-10-27 16:28:53 +02:00
Jutho Haegeman
258246f854 add MPZ for 0.6 compatibility; update REQUIRE, add testsets 2017-10-14 01:33:52 +02:00
Jutho
b3f65e9b46 Remove @show in tests 2017-08-12 00:22:07 +02:00
Jutho
07efc88cf7 Change test tolerance due to julia#22742
See https://github.com/JuliaLang/julia/pull/22742
2017-08-12 00:18:04 +02:00
Jutho
1a974193eb add help and more tests 2017-08-11 12:55:57 +02:00
Jutho
56b02ebcf2 3j and 6j working and tested 2017-08-09 17:12:37 +02:00
Jutho
a5395dca5b WignerSymbols.jl generated files.
license:  MIT
    authors:  Jutho
    years:    2017
    user:     jutho

Julia Version 0.7.0-DEV.1283 [4fea203375]
2017-08-08 11:23:18 +02:00