@@ -23,15 +23,25 @@ pub struct LrmHandle(usize);
23
23
#[ derive( Copy , Clone , Debug , Eq , Hash , PartialEq ) ]
24
24
pub struct TraversalHandle ( usize ) ;
25
25
26
- struct Lrm {
27
- scale : LrmScale ,
28
- reference_traversal : TraversalHandle ,
29
- traversals : Vec < TraversalHandle > ,
26
+ /// Represents an Linear Reference Method (LRM)
27
+ /// It is the combination of one (or more) [`Traversals`] for one [`LrmScale`]
28
+ pub struct Lrm {
29
+ /// The scale of the LRM
30
+ pub scale : LrmScale ,
31
+ /// Traversal that is the reference of this LRM
32
+ pub reference_traversal : TraversalHandle ,
33
+ /// All the traversals where this LRM applies
34
+ pub traversals : Vec < TraversalHandle > ,
30
35
}
31
36
37
+ /// A traversal is path in the network that ends [`Curve`]
38
+ /// That traversals can be used for many different [`Lrm`]
32
39
struct Traversal < CurveImpl : Curve > {
40
+ /// Identifies the traversal
33
41
id : String ,
42
+ /// The geometrical curve of the traversal
34
43
curve : CurveImpl ,
44
+ /// All the [`Lrm`] that use this traversal
35
45
lrms : Vec < LrmHandle > ,
36
46
}
37
47
@@ -251,7 +261,8 @@ pub enum LrsError {
251
261
InvalidArchive ,
252
262
}
253
263
254
- trait LrsBase {
264
+ /// The basic functions to manipulate the LRS
265
+ pub trait LrsBase {
255
266
/// Returns the [`LrmHandle`] (if it exists) of the [`Lrm`] identified by its `lrm_id`.
256
267
fn get_lrm ( & self , lrm_id : & str ) -> Option < LrmHandle > ;
257
268
/// Returns the [`TraversalHandle`] (if it exists) of the [`Traversal`] identified by its `traversal_id`.
0 commit comments