Commits

bergsoe committed de3be82

API doc.

  • Participants
  • Parent commits e1399f8

Comments (0)

Files changed (13)

File src/PaplDLTree.mli

     and detached.
 *)
 
+(** {2 Types} *)
+
 type 'a node
 (** The type of a node of the tree.
 
     The node stores a value of type ['a].
 *)
 
+(** {2 Constructors} *)
+
 val add_root : 'a -> 'a node
 (** Add an element as the root of a new tree and return the new root
     node.
 *)
 
-val is_root : 'a node -> bool
-(** [is_root node] is [true] if [node] is a root node.
-*)
-
 val add : 'a node -> 'a -> 'a node
 (** Add a new element as a child node of a node and return the new node.
 
     [q].
 *)
 
+(** {2 Operations} *)
+
 val get : 'a node -> 'a
 (** The element value stored in a node. *)
 
 val children : 'a node -> 'a node BatEnum.t
 (** The children of a node. *)
 
+val detach : 'a node -> unit
+(** Detach a node from its parent.
+
+    The node becomes a root node. The children of the node are the same.
+*)
+
+val reattach : 'a node -> 'a node -> unit
+(** [reattach node parent] detachs [node] from its current parent and attachs it
+    to [parent] instead.
+
+    The children of [node] are the same.
+*)
+
+(** {2 Utilities} *)
+
+val is_root : 'a node -> bool
+(** [is_root node] is [true] if [node] is a root node.
+*)
+
 val iter : ('a node -> unit) -> 'a node -> unit
 (** [iter f root] calls [f node] for all nodes in the subtree of [root].
 
     values equal to [f nx] for every node [nx] of the subtree of [node].
 *)
 
-val detach : 'a node -> unit
-(** Detach a node from its parent.
-
-    The node becomes a root node. The children of the node are the same.
-*)
-
-val reattach : 'a node -> 'a node -> unit
-(** [reattach node parent] detachs [node] from its current parent and attachs it
-    to [parent] instead.
-
-    The children of [node] are the same.
-*)
-
 val count : 'a node -> int
 (** Count the number of nodes in a subtree.
 *)

File src/PaplIncrEdgeConstraint.mli

     {! PaplIncrConstraint}) for an edge (see {! PaplEdge}).
 *)
 
+(** {2 Types} *)
+
 type 'a create_t = 'a PaplEdge.t PaplIncrConstraint.create_t
 
+(** {2 Constructors and operations} *)
+
 val constrain_by_subdivision :
   'a PaplConstraint.t ->
   'a PaplInterpolate.t ->

File src/PaplInterpolate.mli

   val flip_interpolate : float -> float -> float -> float
 end
 
+(** {2 Int planning space} *)
+
 module Int : sig
   val interpolate : int t
 end
 
-(** {2 Tuple planning space} *)
+(** {2 Tuple planning spaces} *)
 
 (** Planning space for tuples.
 

File src/PaplMetric.mli

    exception.
 *)
 
+(** {2 Float metrics} *)
+
 module Float : sig
   val dist : float t
     (** [Float.dist a b] returns the absolute value of [b -. a].
     *)
 end
 
+(** {2 Int metrics} *)
+
 module Int : sig
   val dist : int t
     (** [Int.dist a b] returns the absolute value of [b - a] converted to a
     *)
 end
 
+(** {2 Tuple metrics} *)
+
 module Tuple2 : sig
   val dist1 : 'a t -> 'b t -> ('a * 'b) t
 

File src/PaplPlannerConstraint.mli

    point and an edge constraint.
 *)
 
+(** {2 Types} *)
+
 type 'a t = 'a PaplConstraint.t * 'a PaplEdgeConstraint.t
 
+(** {2 Constructors} *)
+
 val fixed_reject : bool -> bool -> 'a t
 
 val fixed_accept : bool -> bool -> 'a t
 
+val constrain_by_subdivision :
+  'a PaplConstraint.t ->
+  'a PaplInterpolate.t ->
+  'a PaplMetric.threshold_t ->
+  'a t
+
+(** {2 Conversions} *)
+
 val constrain_path : 'a t -> 'a list PaplConstraint.t
 (** The constraint [constrain_path constr] first checks the nodes of the path
     and then checks the edges.
 (** [constrain_edge_and_both (nc, ec)] constrains the end point of an edge using
     [nc] and the edge itself using [ec].
 *)
-
-val constrain_by_subdivision :
-  'a PaplConstraint.t ->
-  'a PaplInterpolate.t ->
-  'a PaplMetric.threshold_t ->
-  'a t

File src/PaplQ.mli

 
 (* type box_t = t * t *)
 
-(** {3 Imperative operators} *)
+(** {2 Imperative operators} *)
 
 val ( *=:) : t -> float -> unit
 (** Scale a vector. *)
 val (-=:) : t -> t -> unit
 (** Subtract a vector. *)
 
-(** {3 Metrics} *)
+(** {2 Metrics} *)
 
 val dist_inf_box_normalized : box_t -> t PaplMetric.t
 

File src/PaplQTime.mli

    Linear interpolation of time configurations.
 *)
 
+(** {2 Constraints} *)
+
 module EdgeConstraint : sig
   val constrain_by_subdivision :
     t PaplConstraint.t ->

File src/PaplRandom.mli

 
 *)
 
+(** {2 Types} *)
+
 type rng_t = BatRandom.State.t option
 
+(** {2 Enumerations} *)
+
 val enum_bits : ?rng:rng_t -> unit -> int BatEnum.t
 
 val enum_int : ?rng:rng_t -> int -> int BatEnum.t
 
 val enum_char : ?rng:rng_t -> unit -> char BatEnum.t
 
+(** {2 Single values} *)
+
 val bits : ?rng:rng_t -> unit -> int
 
 val int : ?rng:rng_t -> int -> int

File src/PaplSBL.mli

 (** SBL planners *)
 
 type kind_t =
-    Standard (** Standard SBL algorithm. *)
-  | NonTransfer (** Cut-off trees are erased. *)
+    Standard
+      (** Standard SBL algorithm. *)
+  | NonTransfer
+      (** Cut-off trees are erased. *)
 
 module type SETUP = sig
   type q_t

File src/PaplSpatialGroup.mli

   See LICENSE file for terms and conditions.
 *)
 
-(** Transformations *)
+(** Spatial transformation group *)
+
+(** {2 Types} *)
 
 module type S = sig
 

File src/PaplTrajectory.mli

 (** Trajectories
 *)
 
+(** {2 Types} *)
+
 type 'a t
 (** The type of a trajectory. *)
 
     traj (t +. dt)) > eps]. If no such [t] is found then [None] is returned.
 *)
 
+(** {2 Tuples} *)
+
 module Tuple2 : sig
   val combine : 'a t * 'b t -> ('a * 'b) t
 end
   val combine : 'a t * 'b t * 'c t -> ('a * 'b * 'c) t
 end
 
+(** {2 Arrays} *)
+
 module Array : sig
   val combine : 'a t array -> 'a array t
 (**

File src/PaplTree.mli

     The single linked tree is a purely functional data structure.
 *)
 
+(** {2 Types} *)
+
 type 'a node
 (** The type of a node of the tree.
 
     The node stores a value of type ['a].
 *)
 
+(** {2 Constructors} *)
+
 val add_root : 'a -> 'a node
 (** Add an element as the root of a new tree and return the new root
     node.
     [q].
 *)
 
+(** {2 Operations} *)
+
 val get : 'a node -> 'a
 (** The element value stored in a node. *)
 
 val parent : 'a node -> 'a node option
 (** The parent of a node or [None] if the node is a root node. *)
 
+(** {2 Utilities} *)
+
 val node_path_to_root : 'a node -> 'a node list
 (** [node_path_to_root node] is the list of nodes from [node] up to and
     including its root.

File src/PaplVector.mli

 type rng_t = PaplRandom.rng_t
 type 'a pair_t = 'a * 'a
 
-(** Common vector interface *)
+(** {2 Module types} *)
+
+(** Basic vector operations *)
 module type BASE = sig
   type t
 (** A vector configuration. *)
 *)
 end
 
+(** Inner products *)
 module type DOT = sig
   type t
 
 *)
 end
 
-(** {2 Samplers} *)
-
 (** Sampling of vectors *)
 module type SAMPLER = sig
+
   type t
   type box_t
 
 (** A single configuration sampled uniformly at random from a box. *)
 end
 
-(** {2 All} *)
-
+(** Union of all vector operations *)
 module type ALL = sig
   include BASE
 
   include SAMPLER with type t := t and type box_t := box_t
 end
 
-(** {2 2D vectors} *)
+(** {2 Vectors in 2D, 3D, and 4D} *)
 
 (** 2-tuples as vectors. *)
 module V2D : sig
   (** The type of a soup of triangles. *)
 end
 
-(** {2 3D vectors} *)
-
 (** 3-tuples as vectors. *)
 module V3D : sig
   include ALL with type t = float * float * float