# papl / src / PaplPair.mli

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77``` ```(* Copyright (c) 2012 Anders Lau Olsen. See LICENSE file for terms and conditions. *) (** Pair configurations *) type 'a pair_t = 'a * 'a (** {2 Planning spaces} *) (** Each coordinate is interpolated independently using the same interpolation function. *) val interpolate : 'a PaplInterpolate.t -> 'a pair_t PaplInterpolate.t (** The function [interpolate ip] interpolates pairs by interpolating each coordinate using [ip]. *) (** {2 Integer pairs} *) module Int : sig type t = int pair_t val interpolate : t PaplInterpolate.t (** The interpolation function interpolates the coordinates as if they were floats and then rounds the values to the nearest integer. *) val to_float : t -> float pair_t (** Integer to float conversion for a pair. *) val of_float : float pair_t -> t (** Float to integer conversion for a pair. *) val ( *: ) : int -> t -> t (** Scalar multiplication. *) val (/:) : t -> int -> t (** Division of a vector by a scalar. *) val (+:) : t -> t -> t (** Vector addition. *) val (-:) : t -> t -> t (** Vector subtraction. *) val neg : t -> t (** Unary negation. *) (** Metrics *) include PaplVectorMetric.S with type t := t and type weight_t = float pair_t end (** {2 Planner constraints} *) module PlannerConstraint : sig val couple : 'a PaplPlannerConstraint.t -> 'a PaplPlannerConstraint.t -> 'a pair_t PaplPlannerConstraint.t -> 'a pair_t PaplPlannerConstraint.t (** Combination of constraints for coupled planning. Let [A] and [B] be robots in an environment E. Let [ca] and [cb] be constraints for [A] in [E] and [B] in [E], and let [cab] be a constraint for collisions between [A] and [E]. The constraint [c = combine ca cb cab] combines these constraints into a single constraint for the movement of the coupled robot [(A, B)]. *) end ```