Skip to content

Commit c4e6713

Browse files
committed
2 parents 2dd71a1 + f73044a commit c4e6713

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

src/py/tesseract_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
)
4343

4444

45-
def test_create_node():
46-
node = tesseract_decoder.tesseract.Node(errors=[1, 0])
47-
assert node.errors == [1, 0]
45+
4846

4947

5048
def test_create_tesseract_config():

src/tesseract.pybind.h

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -199,31 +199,7 @@ void add_tesseract_module(py::module& root) {
199199
`TesseractConfig` object.
200200
)pbdoc");
201201

202-
py::class_<Node>(m, "Node", R"pbdoc(
203-
A class representing a node in the Tesseract search graph.
204-
205-
This is used internally by the decoder to track decoding progress.
206-
)pbdoc")
207-
.def(py::init<double, size_t, std::vector<size_t>>(), py::arg("cost") = 0.0,
208-
py::arg("num_dets") = 0, py::arg("errors") = std::vector<size_t>(), R"pbdoc(
209-
The constructor for the `Node` class.
210-
211-
Parameters
212-
----------
213-
cost : float, default=0.0
214-
The cost of the path to this node.
215-
num_dets : int, default=0
216-
The number of detectors this search node has.
217-
errors : list[int], default=empty
218-
The list of error indices this search node has.
219-
)pbdoc")
220-
.def_readwrite("cost", &Node::cost, "The cost of the node.")
221-
.def_readwrite("num_dets", &Node::num_dets, "The number of detectors this search node has.")
222-
.def_readwrite("errors", &Node::errors, "The list of error indices this search node has.")
223-
.def(py::self > py::self,
224-
"Comparison operator for nodes based on cost. This is necessary to prioritize "
225-
"lower-cost nodes during the search.")
226-
.def("__str__", &Node::str);
202+
227203

228204
py::class_<TesseractDecoder>(m, "TesseractDecoder", R"pbdoc(
229205
A class that implements the Tesseract decoding algorithm.

0 commit comments

Comments
 (0)