bergsoe avatar bergsoe committed 43fc6e5

API doc and removal of Float.flip_interpolate.

Comments (0)

Files changed (2)

src/PaplInterpolate.ml

 
 module Float = struct
   let interpolate a b s = a +. (b -. a) *. s
-  let flip_interpolate s a b = interpolate a b s
 end
 
 module Int = struct

src/PaplInterpolate.mli

    Planning spaces
 
    A motion planner searches for a path in a planning space. The type of the
-   planning space is generally user defined and depends on the robot and the
-   planning problem. This library does not distinguish between configuration
-   space and state space planning. A member of a planning space is called a {b
+   planning space is user defined and depends on the robot and the planning
+   problem. This library does not distinguish between configuration space and
+   state space planning. A member of a planning space is called a {b
    configuration} regardless of the nature of the planning.
 
    Planning spaces may support a number of operations discussed in modules such
 type 'a t = 'a -> 'a -> float -> 'a
 (** Interpolation function for a planning space.
 
-    An interpolation function [interpolate] returns a configuration [x =
-    interpolate s a b] on the path connecting [a] to [b]. The interpolation
-    parameter [s] must be in the range [\[0, 1\]].
+    An interpolation function [interpolate] called as [x = interpolate s a b]
+    returns a configuration [x] on the movement connecting [a] to [b]. The
+    interpolation parameter [s] must be in the range [\[0, 1\]].
 *)
 
 type 'a intermediary_t = 'a -> 'a -> 'a BatEnum.t
+(** Splitting of a movement into intermediary configurations.
+
+    A function [intermediary] called as [intermediary a b] returns a stream of
+    configurations on the movement from [a] to [b]. Algorithms that use such
+    functions generally expect [intermediary a b] not to include [a] and [b] in
+    the stream.
+*)
 
 val intermediary_steps :
   'a t -> 'a PaplMetric.threshold_t -> 'a intermediary_t
-(** If [it = intermediary_steps ip (metric, eps)] then [it a b] are the
+(** If [im = intermediary_steps ip (metric, eps)] then [im a b] are the
     intermediary steps of length [eps] connecting [a] to [b].
 
     [a] and [b] are not explicitly included in the stream (but they can be if
 
 (** Planning space for floats.
 
-    Configurations are floats.
-
     Floats are interpolated linearly.
 *)
 module Float : sig
   val interpolate : float t
-  val flip_interpolate : float -> float -> float -> float
 end
 
 (** {2 Int planning space} *)
 
+(** Planning space for integers.
+
+    The integers are interpolated linearly as if they were floats and then
+    rounded to the nearest integer.
+*)
 module Int : sig
   val interpolate : int t
 end
 
 (** {2 Tuple planning spaces} *)
 
-(** Planning space for tuples.
+(** Planning spaces for tuples.
 
-    Tuples can contain values of seperate types. Each coordinate is interpolated
-    using a seperate interpolation function.
+    Tuples coordinates can have separate types. Each coordinate is interpolated
+    with its own interpolation function.
 *)
 
 module Tuple2 : sig
 
     Each coordinate is interpolated independently.
 
-    The lists must be of the same length when interpolated.
+    Lists that are interpolated must have the same length; otherwise
+    [Invalid_argument] is raised.
 *)
-
 module List : sig
   val interpolate : 'a t -> 'a list t
 end
 
     Each coordinate is interpolated independently.
 
-    Arrays being interpolated must be of the same length.
+    Arrays that are interpolated must have the same length; otherwise
+    [Invalid_argument] is raised.
 *)
-
 module Array : sig
   val interpolate : 'a t -> 'a array t
 end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.