edsger 0.1.1__cp312-cp312-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
edsger/commons.pxd ADDED
@@ -0,0 +1,25 @@
1
+ """
2
+ Common definitions. Header file.
3
+ """
4
+
5
+ cimport numpy as cnp
6
+
7
+ # priority queue
8
+ # --------------
9
+
10
+ ctypedef cnp.float64_t DTYPE_t
11
+ cdef DTYPE_t DTYPE_INF
12
+ cdef DTYPE_t INF_FREQ
13
+ cdef DTYPE_t MIN_FREQ
14
+ cdef DTYPE_t A_VERY_SMALL_TIME_INTERVAL
15
+
16
+ cdef enum ElementState:
17
+ SCANNED
18
+ UNLABELED
19
+ LABELED
20
+
21
+
22
+ # author : Francois Pacull
23
+ # copyright : Architecture & Performance
24
+ # email: francois.pacull@architecture-performance.fr
25
+ # license : MIT
edsger/commons.pyx ADDED
@@ -0,0 +1,34 @@
1
+ """
2
+ Common definitions.
3
+ """
4
+
5
+ import numpy as np
6
+
7
+ DTYPE_PY = np.float64
8
+ DTYPE_INF = <DTYPE_t>np.finfo(dtype=DTYPE_PY).max
9
+ DTYPE_INF_PY = DTYPE_INF
10
+
11
+ # Spiess & Florian
12
+ # ----------------
13
+
14
+ # infinite frequency is defined here numerically
15
+ # this must be a very large number depending on the precision on the computation
16
+ # INF_FREQ << DTYPE_INF
17
+ INF_FREQ = 1.0e+20
18
+ INF_FREQ_PY = INF_FREQ
19
+
20
+ # smallest frequency
21
+ # WARNING: this must be small but not too small
22
+ # 1 / MIN_FREQ << DTYPE_INF
23
+ MIN_FREQ = 1.0 / INF_FREQ
24
+ MIN_FREQ_PY = MIN_FREQ
25
+
26
+ # a very small time interval
27
+ A_VERY_SMALL_TIME_INTERVAL = 1.0e+08 * MIN_FREQ
28
+ A_VERY_SMALL_TIME_INTERVAL_PY = A_VERY_SMALL_TIME_INTERVAL
29
+
30
+
31
+ # author : Francois Pacull
32
+ # copyright : Architecture & Performance
33
+ # email: francois.pacull@architecture-performance.fr
34
+ # license : MIT