Skip to content

Commit eb93a84

Browse files
authored
Merge pull request #31 from noajshu/codex/make-init_ilp-method-private
Make simplex init_ilp private and remove binding
2 parents f9ef348 + b950ae0 commit eb93a84

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/py/simplex_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def test_create_simplex_decoder():
4141
decoder = tesseract_decoder.simplex.SimplexDecoder(
4242
tesseract_decoder.simplex.SimplexConfig(_DETECTOR_ERROR_MODEL, window_length=5)
4343
)
44-
decoder.init_ilp()
4544
decoder.decode_to_errors([1])
4645
assert decoder.get_observables_from_errors([1]) == []
4746
assert decoder.cost_from_errors([2]) == pytest.approx(1.0986123)
@@ -67,7 +66,6 @@ def test_simplex_decoder_predicts_various_observable_flips():
6766
# Initialize SimplexConfig and SimplexDecoder with the generated DEM
6867
config = tesseract_decoder.simplex.SimplexConfig(dem, window_length=1) # window_length must be set
6968
decoder = tesseract_decoder.simplex.SimplexDecoder(config)
70-
decoder.init_ilp() # Initialize the ILP solver
7169

7270
# Simulate a detection event on D0.
7371
# The decoder should identify the most likely error causing D0,

src/simplex.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ struct SimplexDecoder {
5656

5757
SimplexDecoder(SimplexConfig config);
5858

59-
void init_ilp();
60-
6159
// Clears the predicted_errors_buffer and fills it with the decoded errors for
6260
// these detection events.
6361
void decode_to_errors(const std::vector<uint64_t>& detections);
@@ -73,6 +71,9 @@ struct SimplexDecoder {
7371
std::vector<std::vector<int>>& obs_predicted);
7472

7573
~SimplexDecoder();
74+
75+
private:
76+
void init_ilp();
7677
};
7778

7879
#endif // SIMPLEX_HPP

src/simplex.pybind.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ void add_simplex_module(py::module& root) {
6262
.def_readwrite("start_time_to_errors", &SimplexDecoder::start_time_to_errors)
6363
.def_readwrite("end_time_to_errors", &SimplexDecoder::end_time_to_errors)
6464
.def_readonly("low_confidence_flag", &SimplexDecoder::low_confidence_flag)
65-
.def("init_ilp", &SimplexDecoder::init_ilp)
6665
.def("decode_to_errors", &SimplexDecoder::decode_to_errors, py::arg("detections"))
6766
.def(
6867
"get_observables_from_errors",

0 commit comments

Comments
 (0)