Skip to content

Commit 805f946

Browse files
committed
update docs
1 parent ad19e7b commit 805f946

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

docs/tutorial.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,49 @@ The instance of this class is returning from :func:`mpe` function. The pieces of
267267
This data may be useful for debugging.
268268
- **reversed** -- The flag indicates that the path piece is reversed.
269269
This is relevant when using ``travel_time_cache == True`` parameter.
270+
271+
272+
Low-level API
273+
-------------
274+
275+
If you need full control over the extracting process, you can use :class:`MinimalPathExtractor` class.
276+
The class is used inside :func:`mpe` function for extracting the pieces of path.
277+
278+
Here is a simple example of usage:
279+
280+
.. code-block:: python
281+
282+
from skmpe import MinimalPathExtractor, Parameters
283+
284+
speed_data = ...
285+
start_point = ...
286+
end_point = ...
287+
parameters = Parameters(...) # optional, also we can use 'parameters' context manager
288+
289+
# Create the instance and compute travel time data
290+
mpe = MinimalPathExtractor(speed_data, end_point, parameters)
291+
292+
# get computed travel time data
293+
travel_time = mpe.travel_time
294+
295+
# get phi (zero contour for given end_point)
296+
phi = mpe.phi
297+
298+
# extract path from start_point to end_point
299+
# it returns PathExtractionResult instance
300+
extracting_result = mpe(start_point)
301+
302+
# the list of path points
303+
path_points = extracting_result.path_points
304+
305+
# the list of integrate time values in every path point
306+
path_integrate_times = extracting_result.path_integrate_times
307+
308+
# the list of travel time values in every path point
309+
path_travel_times = extracting_result.path_travel_times
310+
311+
# the number of ODE solver steps
312+
step_count = extracting_result.step_count
313+
314+
# the number of right hand function evaluations in ODE solver
315+
func_eval_count = extracting_result.func_eval_count

0 commit comments

Comments
 (0)