Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
1e1ac8d
Plan phase 7: the Region classes
timj Nov 19, 2026
e354c7c
Add Frame line geometry, NormBox, FrameGrid and PointSet
timj Nov 19, 2026
b9c38e0
fixup! Add Frame line geometry, NormBox, FrameGrid and PointSet
timj Nov 19, 2026
91c9941
Add Region and Box
timj Nov 19, 2026
14b17a2
Run the Box fixtures
timj Nov 19, 2026
ac3a387
fixup! Add Region and Box
timj Nov 19, 2026
11d835a
Overlap, mask, map and show a Region
timj Nov 19, 2026
52f8e6f
fixup! Overlap, mask, map and show a Region
timj Nov 19, 2026
627527f
Add NullRegion, Interval and PointList
timj Nov 19, 2026
5da2798
Run the NullRegion, Interval and PointList fixtures
timj Nov 19, 2026
279c23d
fixup! Add NullRegion, Interval and PointList
timj Nov 19, 2026
7c58262
Add Circle and Ellipse
timj Nov 19, 2026
69b6a7b
Run the Circle and Ellipse fixtures
timj Nov 19, 2026
a268e01
fixup! Add Circle and Ellipse
timj Nov 19, 2026
dbd8086
Add Polygon
timj Nov 19, 2026
11c0b79
Run the Polygon fixtures
timj Nov 19, 2026
a1b66a9
Add Prism and CmpRegion
timj Nov 19, 2026
f136265
Run the Prism and CmpRegion fixtures
timj Nov 19, 2026
8508417
fixup! Add Prism and CmpRegion
timj Nov 19, 2026
f767bae
Simplify Regions
timj Nov 19, 2026
c7e9776
Run the Region simplification fixtures
timj Nov 19, 2026
8fd6c9f
Translate test_regions_c.rs as RegionsCTest
timj Nov 19, 2026
f01988d
Translate the simplification tests of test_regions.rs
timj Nov 19, 2026
306be80
Record the differences in Region simplification
timj Nov 19, 2026
908d2f3
Translate the rest of test_regions.rs
timj Nov 19, 2026
ed435ca
Record the boundary of a negated closed CmpRegion
timj Nov 19, 2026
9a50b6d
fixup! Translate the rest of test_regions.rs
timj Nov 19, 2026
19834ed
Sweep the deferred lists after phase 7
timj Nov 19, 2026
c1f94e5
Report phase 7
timj Nov 19, 2026
37a6fa9
fixup! Sweep the deferred lists after phase 7
timj Nov 19, 2026
c673576
fixup! Report phase 7
timj Nov 19, 2026
a49ad50
fixup! Add Prism and CmpRegion
timj Nov 19, 2026
0d710dd
fixup! Add Prism and CmpRegion
timj Nov 19, 2026
f86a607
fixup! Add Polygon
timj Nov 19, 2026
5966639
fixup! Add NullRegion, Interval and PointList
timj Nov 19, 2026
f5eb380
fixup! Report phase 7
timj Nov 19, 2026
f034724
Refuse a probe output that is both .out and .json
timj Nov 19, 2026
06c586b
Share C's round as CMath.roundHalfAway
timj Nov 19, 2026
7fda07f
fixup! Add Frame line geometry, NormBox, FrameGrid and PointSet
timj Nov 19, 2026
b2744eb
fixup! Add Region and Box
timj Nov 19, 2026
90db849
fixup! Add NullRegion, Interval and PointList
timj Nov 19, 2026
4942719
fixup! Add Circle and Ellipse
timj Nov 19, 2026
c4850e5
fixup! Add Polygon
timj Nov 19, 2026
01c9203
fixup! Add Prism and CmpRegion
timj Nov 19, 2026
072ebfe
fixup! Simplify Regions
timj Nov 19, 2026
3e4ae3c
fixup! Record the differences in Region simplification
timj Nov 19, 2026
cb3b80f
fixup! Translate the rest of test_regions.rs
timj Nov 19, 2026
9f56fb0
fixup! Sweep the deferred lists after phase 7
timj Nov 19, 2026
fb6dedf
fixup! Report phase 7
timj Nov 19, 2026
0a55ad9
Round WCSAXES and PermMap indices with C's round
timj Nov 19, 2026
6f37e47
Pin MapRegion when a Mapping drops an axis
timj Nov 19, 2026
da9aa28
fixup! Add Polygon
timj Nov 19, 2026
92b2f79
fixup! Add Circle and Ellipse
timj Nov 19, 2026
96999a2
fixup! Add Frame line geometry, NormBox, FrameGrid and PointSet
timj Nov 19, 2026
7e90fc9
fixup! Add NullRegion, Interval and PointList
timj Nov 19, 2026
55eba4c
fixup! Report phase 7
timj Nov 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 202 additions & 0 deletions docs/reports/2026-11-19-phase7-report.md

Large diffs are not rendered by default.

217 changes: 217 additions & 0 deletions docs/reports/2026-11-19-phase7-rulings.md

Large diffs are not rendered by default.

366 changes: 366 additions & 0 deletions docs/rust-c-differences.md

Large diffs are not rendered by default.

246 changes: 246 additions & 0 deletions docs/superpowers/plans/2026-11-18-pure-java-ast-phase7-regions.md

Large diffs are not rendered by default.

1,029 changes: 1,029 additions & 0 deletions src/main/java/uk/ac/starlink/ast/Box.java

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions src/main/java/uk/ac/starlink/ast/CMath.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package uk.ac.starlink.ast;

/** Functions of the C library that {@code java.lang.Math} lacks or defines differently. */
final class CMath {

private CMath() {}

/**
* C's {@code round}: to the nearest integer, halfway cases away from zero. The fraction is
* found as the difference of the magnitude and its floor, which is exact, so a value just
* below a half is not rounded up; infinities, NaN and signed zeros are returned as given.
*/
static double roundHalfAway(double x) {
double a = Math.abs(x);
double fl = Math.floor(a);
return Math.copySign(a - fl >= 0.5 ? fl + 1.0 : fl, x);
}
}
Loading
Loading