forked from flatsurf/e-antic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
115 lines (104 loc) · 5.03 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
This file is part of the e-ANTIC library
The e-ANTIC Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
The e-ANTIC Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the e-ANTIC Library; see the file COPYING.LESSER. If not, see
http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
##############################################################################
Release 0.1
===========
- real roots isolation and refinement (poly_extra.h)
- renf structure (renf.h)
- renf_elem structures (renf_elem.h)
- C++ interface (renfxx.h)
Release 1.0
===========
New C function
--------------
- ` renf_elem_swap(renf_elem_t, renf_elem_t)`
Multithread support
-------------------
- e-antic had claimed to be thread safe via an open MP pragma (in the number
field refinement). In some cases, there was a problem with thread-safety. We
now require users to explicitly mark multithreaded sections by forbidding
mutations to a renf, see `renf_set_immutable`. As a result, there are some
operations that cannot be done anymore in a multi-threaded environment but
they now fail properly (instead of leading to random crashes.)
Breaking Changes to the C++ Interface
-------------------------------------
- `e-antic/renfxx.h` requires C++17.
- All classes are now declared in the namespace `eantic`.
- The semantics of `operator =` have changed. In e-antic 0.1 the following
would create the unit in the field K.
```
renf_elem_class x(K);
x = 1;
```
Now the above statement makes x a rational number. More generally, an
assignment resets the number field so that after `x = y` the condition
`x.nf == renf_elem_class(y).nf` holds. To mimic the old behavior you need
to rewrite the above as
```
renf_elem_class x(K);
x = renf_elem_class(K, 1);
```
- `renf_class` is now hidden behind a factory to get shared_ptr semantics
everywhere. Create a `renf_class` by calling `renf_class::make(…)`. This
returns a smart pointer, so you might have to replace some `.` with `->`.
- The change of semantics in assignment also affects reading from streams (in
order to create `renf_elem_class`). Before the following would parse an element
into a number field:
```
renf_elem_class x(K);
in >> x;
```
Now this only works if the stream contains a rational number. (Otherwise an
exception is raised.) As `in >> x` also resets `x.nf`. The above code should
be replaced with:
```
renf_elem_class x;
K.set_pword(in);
in >> x;
```
- `renf_elem_class(string&)` has been removed. If you want to parse a rational
number, use `renf_elem_class(mpq_class(string))`. If you want to parse into a
number field, use `renf_elem_class(renf_class&, string&)`.
- `renf_elem_class::operator=(string&)` has been removed. If you want to parse
a rational into an element, use `x = mpq_class(string)`. If you want to parse
into a number field, use `x = renf_elem_class(x.parent(), string)`.
- `renf_elem_class(vector<...>)` have been removed as it would have thrown an
exception always anyway.
- `renf_elem_class::operator=(vector<...>)` have been removed due to the change
of semantics of `=`. If `x` is not a rational you get the same behaviour as
before with `x = renf_elem_class(x.parent(), {1, 2, 3})`.
- `renf_class::xalloc()` has been removed and replaced by an implementation
detail.
- `string renf_class::gen_name` is now a method so it needs to be called.
- Many operations that threw an exception before when domains were mixed, now
abort program execution (typically through a call to `assert()`.) You can
identify these operations by their `noexcept` modifier.
- `renf_class.operator==` now also checks that the generator name is the same.
Similarly, `renf_class.operator=` now also resets the generator name.
Non-Breaking Changes to the C++ Interface
-----------------------------------------
- There is now `e-antic/renfxx_fwd.h` if you only need forward declarations of
`renf_class` and `renf_elem_class`.
- Some methods have been deprecated and might be removed in a future release,
mostly to make the interface more consistent. The deprecation warnings give
hints which methods to use instead.
- `renf_elem_class` can now be created from signed and unsigned long long.
- `renf_elem_class` can now be created from vectors of primitive integers, e.g.,
```
renf_elem_class x(K, {1, 2, 3}); // = 3*x^2 + 2*x + 1
```
where before the entries of the vector had to be `mpz_class`.
- Move semantics `&&` have been added to `renf_elem_class`.
- There is now support for serialization with cereal. See t-cereal.cpp for
examples on how to use it.