laprust 1.0.0__tar.gz → 1.1.1__tar.gz

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.
Files changed (79) hide show
  1. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/benchmark_batch.yaml +1 -1
  2. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/benchmark_single.yaml +1 -1
  3. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/benchmark_tracking.yaml +1 -1
  4. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/integration.yaml +3 -2
  5. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/native.yaml +1 -1
  6. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/prepublish.yaml +3 -3
  7. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/publish.yaml +2 -2
  8. {laprust-1.0.0 → laprust-1.1.1}/.github/workflows/tests.yaml +3 -2
  9. {laprust-1.0.0 → laprust-1.1.1}/CHANGELOG.md +20 -0
  10. {laprust-1.0.0 → laprust-1.1.1}/CONTRIBUTING.md +1 -1
  11. {laprust-1.0.0/laprust.egg-info → laprust-1.1.1}/PKG-INFO +18 -6
  12. {laprust-1.0.0 → laprust-1.1.1}/README.md +17 -5
  13. {laprust-1.0.0 → laprust-1.1.1}/docs/api.md +10 -6
  14. {laprust-1.0.0 → laprust-1.1.1}/laprust/__init__.py +1 -1
  15. {laprust-1.0.0 → laprust-1.1.1}/laprust/_lapjv.pyi +8 -1
  16. {laprust-1.0.0 → laprust-1.1.1/laprust.egg-info}/PKG-INFO +18 -6
  17. {laprust-1.0.0 → laprust-1.1.1}/laprust.egg-info/SOURCES.txt +1 -0
  18. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/_lapjv.cpp +216 -216
  19. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/_lapjv.pyx +10 -6
  20. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/lib.rs +4 -4
  21. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/rectangular.rs +200 -31
  22. {laprust-1.0.0 → laprust-1.1.1}/tests/README.md +16 -0
  23. laprust-1.1.1/tests/test_float32_working_precision.py +325 -0
  24. {laprust-1.0.0 → laprust-1.1.1}/tests/test_lapjv.py +110 -41
  25. {laprust-1.0.0 → laprust-1.1.1}/.github/constraints/numpy-armv7-build.txt +0 -0
  26. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/README.md +0 -0
  27. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/check_dist.py +0 -0
  28. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/check_wheel.py +0 -0
  29. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/conftest.py +0 -0
  30. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/install_numpy_compat.py +0 -0
  31. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/pytest.ini +0 -0
  32. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/requirements.txt +0 -0
  33. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/test_benchmarks.py +0 -0
  34. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/test_editable_install.py +0 -0
  35. {laprust-1.0.0 → laprust-1.1.1}/.github/tests/test_setup.py +0 -0
  36. {laprust-1.0.0 → laprust-1.1.1}/LICENSE +0 -0
  37. {laprust-1.0.0 → laprust-1.1.1}/MANIFEST.in +0 -0
  38. {laprust-1.0.0 → laprust-1.1.1}/NOTICE +0 -0
  39. {laprust-1.0.0 → laprust-1.1.1}/benchmarks/README.md +0 -0
  40. {laprust-1.0.0 → laprust-1.1.1}/benchmarks/_common.py +0 -0
  41. {laprust-1.0.0 → laprust-1.1.1}/benchmarks/benchmark_batch.py +0 -0
  42. {laprust-1.0.0 → laprust-1.1.1}/benchmarks/benchmark_single.py +0 -0
  43. {laprust-1.0.0 → laprust-1.1.1}/benchmarks/benchmark_tracking.py +0 -0
  44. {laprust-1.0.0 → laprust-1.1.1}/benchmarks/ci_run.py +0 -0
  45. {laprust-1.0.0 → laprust-1.1.1}/examples/basic.py +0 -0
  46. {laprust-1.0.0 → laprust-1.1.1}/laprust/__init__.pyi +0 -0
  47. {laprust-1.0.0 → laprust-1.1.1}/laprust/py.typed +0 -0
  48. {laprust-1.0.0 → laprust-1.1.1}/laprust.egg-info/dependency_links.txt +0 -0
  49. {laprust-1.0.0 → laprust-1.1.1}/laprust.egg-info/requires.txt +0 -0
  50. {laprust-1.0.0 → laprust-1.1.1}/laprust.egg-info/top_level.txt +0 -0
  51. {laprust-1.0.0 → laprust-1.1.1}/pyproject.toml +0 -0
  52. {laprust-1.0.0 → laprust-1.1.1}/setup.cfg +0 -0
  53. {laprust-1.0.0 → laprust-1.1.1}/setup.py +0 -0
  54. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/Cargo.lock +0 -0
  55. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/Cargo.toml +0 -0
  56. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/LICENSE +0 -0
  57. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/THIRD_PARTY_NOTICES +0 -0
  58. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/examples/profile.rs +0 -0
  59. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/lapjv.h +0 -0
  60. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/ffi.rs +0 -0
  61. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/ffi_tests.rs +0 -0
  62. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/profile.rs +0 -0
  63. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/square.rs +0 -0
  64. {laprust-1.0.0 → laprust-1.1.1}/src/_lapjv/src/test_faults.rs +0 -0
  65. {laprust-1.0.0 → laprust-1.1.1}/tests/LICENSE +0 -0
  66. {laprust-1.0.0 → laprust-1.1.1}/tests/assignment_checks.py +0 -0
  67. {laprust-1.0.0 → laprust-1.1.1}/tests/check_native_errors.py +0 -0
  68. {laprust-1.0.0 → laprust-1.1.1}/tests/check_scipy_free.py +0 -0
  69. {laprust-1.0.0 → laprust-1.1.1}/tests/conftest.py +0 -0
  70. {laprust-1.0.0 → laprust-1.1.1}/tests/cost_eps.csv.gz +0 -0
  71. {laprust-1.0.0 → laprust-1.1.1}/tests/lapjv_cases.py +0 -0
  72. {laprust-1.0.0 → laprust-1.1.1}/tests/regression_cases.py +0 -0
  73. {laprust-1.0.0 → laprust-1.1.1}/tests/test_batch_paths.py +0 -0
  74. {laprust-1.0.0 → laprust-1.1.1}/tests/test_core.py +0 -0
  75. {laprust-1.0.0 → laprust-1.1.1}/tests/test_cross_package.py +0 -0
  76. {laprust-1.0.0 → laprust-1.1.1}/tests/test_edge_cases.py +0 -0
  77. {laprust-1.0.0 → laprust-1.1.1}/tests/test_package.py +0 -0
  78. {laprust-1.0.0 → laprust-1.1.1}/tests/test_regressions.py +0 -0
  79. {laprust-1.0.0 → laprust-1.1.1}/tests/typing/return_types.py +0 -0
@@ -21,7 +21,7 @@ jobs:
21
21
  strategy:
22
22
  fail-fast: false
23
23
  matrix:
24
- os: [ubuntu-latest, windows-latest, macos-latest]
24
+ os: [ubuntu-24.04, windows-latest, macos-latest]
25
25
  runs-on: ${{ matrix.os }}
26
26
  steps:
27
27
  - name: Check out laprust at the workflow revision
@@ -21,7 +21,7 @@ jobs:
21
21
  strategy:
22
22
  fail-fast: false
23
23
  matrix:
24
- os: [ubuntu-latest, windows-latest, macos-latest]
24
+ os: [ubuntu-24.04, windows-latest, macos-latest]
25
25
  runs-on: ${{ matrix.os }}
26
26
  steps:
27
27
  - name: Check out laprust at the workflow revision
@@ -21,7 +21,7 @@ jobs:
21
21
  strategy:
22
22
  fail-fast: false
23
23
  matrix:
24
- os: [ubuntu-latest, windows-latest, macos-latest]
24
+ os: [ubuntu-24.04, windows-latest, macos-latest]
25
25
  runs-on: ${{ matrix.os }}
26
26
  steps:
27
27
  - name: Check out laprust at the workflow revision
@@ -18,12 +18,13 @@ permissions:
18
18
  concurrency:
19
19
  group: integration-${{ github.ref }}-${{ github.workflow }}
20
20
  cancel-in-progress: true
21
+ # Pin Ubuntu 24.04 LTS: setup-python has no Python 3.9 build for Ubuntu 26.04.
21
22
  jobs:
22
23
  cross_package:
23
24
  strategy:
24
25
  fail-fast: false
25
26
  matrix:
26
- os: [ubuntu-latest, windows-latest, macos-latest]
27
+ os: [ubuntu-24.04, windows-latest, macos-latest]
27
28
  python: ['3.9', '3.15']
28
29
  runs-on: ${{ matrix.os }}
29
30
  steps:
@@ -69,7 +70,7 @@ jobs:
69
70
  strategy:
70
71
  fail-fast: false
71
72
  matrix:
72
- os: [ubuntu-latest, windows-latest, macos-latest]
73
+ os: [ubuntu-24.04, windows-latest, macos-latest]
73
74
  python: ['3.9', '3.15']
74
75
  runs-on: ${{ matrix.os }}
75
76
  steps:
@@ -13,7 +13,7 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-latest]
16
+ os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-latest]
17
17
  runs-on: ${{ matrix.os }}
18
18
  timeout-minutes: 20
19
19
  steps:
@@ -38,11 +38,11 @@ jobs:
38
38
  msvc_arch: arm64
39
39
  rust_target: aarch64-pc-windows-msvc
40
40
  - name: manylinux-x86_64
41
- os: ubuntu-latest
41
+ os: ubuntu-24.04
42
42
  arch: x86_64
43
43
  platform: manylinux_x86_64
44
44
  - name: musllinux-x86_64
45
- os: ubuntu-latest
45
+ os: ubuntu-24.04
46
46
  arch: x86_64
47
47
  platform: musllinux_x86_64
48
48
  - name: manylinux-aarch64
@@ -124,7 +124,7 @@ jobs:
124
124
  if-no-files-found: error
125
125
  compression-level: 0
126
126
  sdist:
127
- runs-on: ubuntu-latest
127
+ runs-on: ubuntu-24.04
128
128
  steps:
129
129
  - uses: actions/checkout@v7
130
130
  - uses: actions/setup-python@v7
@@ -6,7 +6,7 @@ permissions:
6
6
  contents: read
7
7
  jobs:
8
8
  version:
9
- runs-on: ubuntu-latest
9
+ runs-on: ubuntu-24.04
10
10
  steps:
11
11
  - uses: actions/checkout@v7
12
12
  - uses: actions/setup-python@v7
@@ -26,7 +26,7 @@ jobs:
26
26
  # Integration, native and sanitizer suites run on PRs or manual dispatch.
27
27
  publish:
28
28
  needs: build
29
- runs-on: ubuntu-latest
29
+ runs-on: ubuntu-24.04
30
30
  environment:
31
31
  name: pypi
32
32
  url: https://pypi.org/p/laprust
@@ -8,12 +8,13 @@ permissions:
8
8
  concurrency:
9
9
  group: tests-${{ github.ref }}
10
10
  cancel-in-progress: true
11
+ # Pin Ubuntu 24.04 LTS: setup-python has no Python 3.9 build for Ubuntu 26.04.
11
12
  jobs:
12
13
  test:
13
14
  strategy:
14
15
  fail-fast: false
15
16
  matrix:
16
- os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-latest]
17
+ os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-latest]
17
18
  python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15']
18
19
  exclude:
19
20
  - os: windows-11-arm
@@ -60,7 +61,7 @@ jobs:
60
61
  build/build-results.xml
61
62
  numpy_compat:
62
63
  name: NumPy ${{ matrix.numpy }} / Python ${{ matrix.python }}
63
- runs-on: ubuntu-latest
64
+ runs-on: ubuntu-24.04
64
65
  strategy:
65
66
  fail-fast: false
66
67
  matrix:
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1 - 2026-10-28
4
+
5
+ - Keep float32 cost storage while using float64 potentials, distances, and
6
+ reduced-cost arithmetic in rectangular and finite-limit solving, matching the
7
+ existing required-square working precision. This fixes lost small assignment
8
+ differences beside large finite costs without widening the full cost matrix.
9
+ - Preserve cost conversion, represented half-limit rounding, and totals from
10
+ original selected costs. Float64 working arithmetic is not an arbitrary-range
11
+ exactness guarantee.
12
+ - Add exact float32 initialization and augmenting-search regressions, including
13
+ primal/dual certificates and required/implicit-rejection paths.
14
+
15
+ ## 1.1.0 - 2026-10-26
16
+
17
+ - Bound row-reduction initialization on large rectangular inputs to improve
18
+ congested assignments, using separate budgets for required and finite-limit
19
+ solving while preserving the public API and assignment objective.
20
+ - Keep the rectangular core synchronized with LAPX's Rust and hybrid solvers.
21
+ - Performance gains depend on the workload; some small-input slowdowns remain.
22
+
3
23
  ## 1.0.0 - 2026-10-23
4
24
 
5
25
  First stable release.
@@ -79,7 +79,7 @@ solver families. Preserve the LAPX and original upstream attribution in `NOTICE`
79
79
  manual runs of the five-candidate comparison, with JSON artifacts.
80
80
 
81
81
  Set up the PyPI Trusted Publisher for this repository, `publish.yaml`, environment
82
- `pypi`, before publishing. Tag `v1.0.0` only when releasing version 1.0.0. The
82
+ `pypi`, before publishing. Tag `v1.1.1` only when releasing version 1.1.1. The
83
83
  manual prepublish workflow creates artifacts without uploading them to PyPI.
84
84
  Benchmark workflows accept counterpart and LAPX repository refs. LAPX defaults
85
85
  to the `v0.11.1` release; record all
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: laprust
3
- Version: 1.0.0
3
+ Version: 1.1.1
4
4
  Summary: Native Rust linear assignment solvers with implicit rejection and batch solving.
5
5
  Home-page: https://github.com/rathaROG/laprust
6
6
  Author: Ratha SIV
@@ -126,7 +126,7 @@ lapjv_batch(costs, extend_cost=False, cost_limit=np.inf, return_cost=True,
126
126
  | --- | --- |
127
127
  | `cost` / `costs` | Real numeric arrays with shape `(N, M)` / `(B, N, M)`. |
128
128
  | `extend_cost=True` | Allows rectangular inputs when the limit is infinite; no square padding is used. |
129
- | `cost_limit` | A finite value permits unmatched endpoints at a penalty of `cost_limit / 2` each. Finite limits also permit rectangles and apply to square inputs. |
129
+ | `cost_limit` | A finite value permits unmatched endpoints, each charged `cost_limit / 2` rounded to the selected cost dtype. Finite limits also permit rectangles and apply to square inputs. |
130
130
  | `return_cost` | Defaults to `True`; totals sum selected original costs in float64 and exclude rejection penalties. `False` omits totals and skips the sum. |
131
131
  | `precision` | `"native"` preserves float32/float64; other real numeric inputs use float64. Explicit `"float32"` / `"float64"` select working costs. |
132
132
  | `output` | `"indices"` returns aligned row/column arrays; `"pairs"` returns `(K, 2)` arrays. |
@@ -137,10 +137,22 @@ pairs; unmatched items are absent. Batch results contain lists because each
137
137
  problem may select a different number of pairs. Equal-cost optima may return
138
138
  different assignments across solvers or precisions.
139
139
 
140
- With a finite limit `L`, the optimized objective is
141
- `sum(selected costs) + (N + M - 2*K) * L/2`.
142
- The reported `total` contains only the first term. Joint rejection is different
143
- from solving a full assignment and then filtering high-cost pairs.
140
+ All solver paths retain the selected float32 or float64 cost storage and use
141
+ float64 potentials, distances, and reduced-cost arithmetic. Finite-limit
142
+ half-penalties are still rounded in the selected cost dtype. This improves
143
+ robustness when small assignment differences coexist with large finite costs;
144
+ extreme dynamic ranges and input conversion can still hide differences.
145
+
146
+ With a finite limit `L`, define `h = cost_dtype(L/2)`, where `cost_dtype` is
147
+ the cost storage dtype selected by `precision`. The optimized objective is
148
+ `sum(selected represented costs) + (N + M - 2*K) * h`, where `N` and `M`
149
+ are the input dimensions and `K` is the number of selected pairs.
150
+ Represented costs are the input values after conversion to that cost dtype.
151
+
152
+ The reported `total` separately sums the selected **original-input values** in
153
+ float64 and excludes rejection penalties. It can differ from the represented-cost
154
+ sum when conversion rounds input values. Joint rejection is different from
155
+ solving a full assignment and then filtering high-cost pairs.
144
156
  See [API details](docs/api.md) for numerical and memory behavior.
145
157
 
146
158
  ## Development and checks
@@ -59,7 +59,7 @@ lapjv_batch(costs, extend_cost=False, cost_limit=np.inf, return_cost=True,
59
59
  | --- | --- |
60
60
  | `cost` / `costs` | Real numeric arrays with shape `(N, M)` / `(B, N, M)`. |
61
61
  | `extend_cost=True` | Allows rectangular inputs when the limit is infinite; no square padding is used. |
62
- | `cost_limit` | A finite value permits unmatched endpoints at a penalty of `cost_limit / 2` each. Finite limits also permit rectangles and apply to square inputs. |
62
+ | `cost_limit` | A finite value permits unmatched endpoints, each charged `cost_limit / 2` rounded to the selected cost dtype. Finite limits also permit rectangles and apply to square inputs. |
63
63
  | `return_cost` | Defaults to `True`; totals sum selected original costs in float64 and exclude rejection penalties. `False` omits totals and skips the sum. |
64
64
  | `precision` | `"native"` preserves float32/float64; other real numeric inputs use float64. Explicit `"float32"` / `"float64"` select working costs. |
65
65
  | `output` | `"indices"` returns aligned row/column arrays; `"pairs"` returns `(K, 2)` arrays. |
@@ -70,10 +70,22 @@ pairs; unmatched items are absent. Batch results contain lists because each
70
70
  problem may select a different number of pairs. Equal-cost optima may return
71
71
  different assignments across solvers or precisions.
72
72
 
73
- With a finite limit `L`, the optimized objective is
74
- `sum(selected costs) + (N + M - 2*K) * L/2`.
75
- The reported `total` contains only the first term. Joint rejection is different
76
- from solving a full assignment and then filtering high-cost pairs.
73
+ All solver paths retain the selected float32 or float64 cost storage and use
74
+ float64 potentials, distances, and reduced-cost arithmetic. Finite-limit
75
+ half-penalties are still rounded in the selected cost dtype. This improves
76
+ robustness when small assignment differences coexist with large finite costs;
77
+ extreme dynamic ranges and input conversion can still hide differences.
78
+
79
+ With a finite limit `L`, define `h = cost_dtype(L/2)`, where `cost_dtype` is
80
+ the cost storage dtype selected by `precision`. The optimized objective is
81
+ `sum(selected represented costs) + (N + M - 2*K) * h`, where `N` and `M`
82
+ are the input dimensions and `K` is the number of selected pairs.
83
+ Represented costs are the input values after conversion to that cost dtype.
84
+
85
+ The reported `total` separately sums the selected **original-input values** in
86
+ float64 and excludes rejection penalties. It can differ from the represented-cost
87
+ sum when conversion rounds input values. Joint rejection is different from
88
+ solving a full assignment and then filtering high-cost pairs.
77
89
  See [API details](docs/api.md) for numerical and memory behavior.
78
90
 
79
91
  ## Development and checks
@@ -44,12 +44,16 @@ are converted to float64. Explicit conversion to float32 rejects finite values
44
44
  or limits outside the float32 range. Integer inputs are converted to float64,
45
45
  so integers outside its exact range can lose precision.
46
46
 
47
- The required square path keeps potentials and distances in float64 even with
48
- float32 costs. Rectangular and finite-limit paths use the selected working
49
- precision; rejection penalties are represented in that precision. The returned
50
- total always sums the original selected costs in float64 before any requested
51
- float32 conversion. Changing precision can change the optimal assignment of
52
- the rounded working problem.
47
+ All paths keep potentials, distances, and reduced-cost arithmetic in float64,
48
+ including when costs are stored in float32. Each half-limit and their combined
49
+ row-rejection penalty are still rounded in the selected cost dtype before
50
+ promotion to float64. The returned total always sums the original selected
51
+ costs in float64 before any requested float32 conversion. Changing precision
52
+ can change the optimal assignment of the rounded cost problem.
53
+
54
+ Float64 working arithmetic reduces cancellation when finite costs are large
55
+ relative to assignment differences. It does not guarantee exactness at arbitrary
56
+ dynamic ranges and cannot recover values rounded during cost conversion.
53
57
 
54
58
  Suitable aligned, contiguous, native-endian arrays are borrowed. Layout,
55
59
  endianness or dtype conversion can require an input copy. Native rectangles
@@ -1,7 +1,7 @@
1
1
  """Native Rust linear assignment solvers with implicit rejection and batch solving."""
2
2
  from ._lapjv import lapjv, lapjv_batch
3
3
 
4
- __version__ = "1.0.0"
4
+ __version__ = "1.1.1"
5
5
  __author__ = 'Ratha SIV'
6
6
  __description__ = 'Native Rust linear assignment solvers with implicit rejection and batch solving.'
7
7
  __homepage__ = 'https://github.com/rathaROG/laprust'
@@ -1,6 +1,13 @@
1
1
  # Copyright (c) 2026 Ratha SIV | MIT License
2
2
 
3
- """Static signatures and documentation for the laprust entry points."""
3
+ """Static signatures and documentation for the laprust entry points.
4
+
5
+ Precision selects cost storage/conversion. All paths use float64 working
6
+ potentials, distances, and reduced-cost arithmetic. Finite half-limits remain
7
+ rounded in the selected cost dtype; returned totals use original input costs.
8
+ Widening does not restore converted-away distinctions or guarantee exactness
9
+ for arbitrary cost ranges.
10
+ """
4
11
 
5
12
  from typing import Any, List, Optional, Tuple, Union, overload
6
13
  from typing import Literal, Protocol
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: laprust
3
- Version: 1.0.0
3
+ Version: 1.1.1
4
4
  Summary: Native Rust linear assignment solvers with implicit rejection and batch solving.
5
5
  Home-page: https://github.com/rathaROG/laprust
6
6
  Author: Ratha SIV
@@ -126,7 +126,7 @@ lapjv_batch(costs, extend_cost=False, cost_limit=np.inf, return_cost=True,
126
126
  | --- | --- |
127
127
  | `cost` / `costs` | Real numeric arrays with shape `(N, M)` / `(B, N, M)`. |
128
128
  | `extend_cost=True` | Allows rectangular inputs when the limit is infinite; no square padding is used. |
129
- | `cost_limit` | A finite value permits unmatched endpoints at a penalty of `cost_limit / 2` each. Finite limits also permit rectangles and apply to square inputs. |
129
+ | `cost_limit` | A finite value permits unmatched endpoints, each charged `cost_limit / 2` rounded to the selected cost dtype. Finite limits also permit rectangles and apply to square inputs. |
130
130
  | `return_cost` | Defaults to `True`; totals sum selected original costs in float64 and exclude rejection penalties. `False` omits totals and skips the sum. |
131
131
  | `precision` | `"native"` preserves float32/float64; other real numeric inputs use float64. Explicit `"float32"` / `"float64"` select working costs. |
132
132
  | `output` | `"indices"` returns aligned row/column arrays; `"pairs"` returns `(K, 2)` arrays. |
@@ -137,10 +137,22 @@ pairs; unmatched items are absent. Batch results contain lists because each
137
137
  problem may select a different number of pairs. Equal-cost optima may return
138
138
  different assignments across solvers or precisions.
139
139
 
140
- With a finite limit `L`, the optimized objective is
141
- `sum(selected costs) + (N + M - 2*K) * L/2`.
142
- The reported `total` contains only the first term. Joint rejection is different
143
- from solving a full assignment and then filtering high-cost pairs.
140
+ All solver paths retain the selected float32 or float64 cost storage and use
141
+ float64 potentials, distances, and reduced-cost arithmetic. Finite-limit
142
+ half-penalties are still rounded in the selected cost dtype. This improves
143
+ robustness when small assignment differences coexist with large finite costs;
144
+ extreme dynamic ranges and input conversion can still hide differences.
145
+
146
+ With a finite limit `L`, define `h = cost_dtype(L/2)`, where `cost_dtype` is
147
+ the cost storage dtype selected by `precision`. The optimized objective is
148
+ `sum(selected represented costs) + (N + M - 2*K) * h`, where `N` and `M`
149
+ are the input dimensions and `K` is the number of selected pairs.
150
+ Represented costs are the input values after conversion to that cost dtype.
151
+
152
+ The reported `total` separately sums the selected **original-input values** in
153
+ float64 and excludes rejection penalties. It can differ from the represented-cost
154
+ sum when conversion rounds input values. Joint rejection is different from
155
+ solving a full assignment and then filtering high-cost pairs.
144
156
  See [API details](docs/api.md) for numerical and memory behavior.
145
157
 
146
158
  ## Development and checks
@@ -70,6 +70,7 @@ tests/test_batch_paths.py
70
70
  tests/test_core.py
71
71
  tests/test_cross_package.py
72
72
  tests/test_edge_cases.py
73
+ tests/test_float32_working_precision.py
73
74
  tests/test_lapjv.py
74
75
  tests/test_package.py
75
76
  tests/test_regressions.py