Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbc4d61

Browse files
committed
Add cube changes file.
1 parent32784cd commitdbc4d61

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

‎contrib/cube/CHANGES

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
Changes that were made in August 2002.
2+
3+
Note that this was based on a 7.3 development version and changes may not
4+
directly work with earlier versions.
5+
6+
I fixed a bug in cubescan.pl that prevented signed numbers with no digits
7+
before a decimal point from being accepted. This was submitted as a separate
8+
patch and may already be applied.
9+
10+
I reported but did not fix a potential buffer overrun problem in cube_yyerror
11+
in cubeparse.y.
12+
13+
cube_inter should really return NULL if the two cubes don't overlap. However
14+
this requires changing to the new calling sequence and I don't know enough
15+
about how to do it to make the change.
16+
17+
I changed all floats to doubles except for g_cube_penalty which I don't
18+
think can be changed to return double. This might cause the penalty to
19+
overflow sooner than one might expect, but overflow could have happened
20+
even with floats.
21+
22+
I changed the output format (in cube_out) to use %.16g instead of %g, since the
23+
default is only 6 digits of precision.
24+
25+
I changed all of the functions declared with (isstrict) to use the current
26+
method of declaring this.
27+
28+
I changed all of the externally visible functions to be immutable which
29+
they are. I don't think this matters for the gist functions and didn't
30+
try to declare them immutable in case there was something tricky about them
31+
that I don't understand.
32+
33+
I changed the regression tests to use some larger exponents to test output
34+
in exponential form. 1e7 was too small for this.
35+
36+
I added some regression tests to check for 16 digits of precision. This
37+
may or may not be a good idea.
38+
39+
I got rid of the swap_corners function. It created scratch boxes that
40+
were iterated through and deleted. This is slower than just getting the
41+
larger or smaller coordinate as needed, since swap_corners was doing the
42+
same thing with the overhead of a function call and memory allocation.
43+
44+
I added memset calls to zero out newly allocated NDBOXes as the documentation
45+
on functions indicates should be done.
46+
47+
I got rid of a call to cube_same in cube_lt and cube_gt since the test
48+
was redundant with other checks being made. The call to cube_same would
49+
only be faster if most of the time you were comparing equivalent cubes.
50+
51+
In cube_lt and cube_gt, the second (UR) for loop for comparing
52+
extra coordinates to 0 had the wrong range.
53+
54+
Note that the cube_distance function wasn't mentioned in the README.cube file.
55+
56+
I added regression tests for the cube_distance function.
57+
58+
I added the following new functions:
59+
cube
60+
cube_dim
61+
cube_ll_coord
62+
cube_ur_coord
63+
cube_is_point
64+
cube_enlarge
65+
66+
cube takes text input and returns a cube. This is useful for making cubes
67+
from computed strings.
68+
69+
cube_dim returns the number of dimensions stored in the the data structure
70+
for a cube. This is useful for constraints on the dimensions of a cube.
71+
72+
cube_ll_coord returns the nth coordinate value for the lower left corner
73+
of a cube. This is useful for doing coordinate transformations.
74+
75+
cube_ur_coord returns the nth coordinate value for the upper right corner
76+
of a cube. This is useful for doing coordinate transformations.
77+
78+
cube_is_point returns true if a cube is also a point. This is true when the
79+
two defining corners are the same.
80+
81+
cube_enlarge increases the size of a cube by a specified radius in at least
82+
n dimensions. If the radius is negative the box is shrunk instead. This
83+
is useful for creating bounding boxes around a point for searching for
84+
nearby points. All defined dimensions are changed by the radius. If n
85+
is greater than the number of defined dimensions and the cube is being
86+
increased (r >= 0) then 0 is used as the base for the extra coordinates.
87+
LL coordinates are decreased by r and UR coordinates are increased by r. If a
88+
LL coordinate is increased to larger than the corresponding UR coordinate
89+
(this can only happen when r < 0) than both coordinates are set to their
90+
average.
91+
92+
I added regression tests for the new functions.
93+
94+
I added documentation for cube_distance and the new functions to README.cube
95+
as well as making a few other minor changes.
96+
97+
Bruno Wolff III <bruno@wolff.to>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp