package osdp

  1. Overview
  2. Docs

Affine expressions.

module type S = sig ... end
module Make (SC : Scalar.S) : S with module Coeff = SC
module Q : S with module Coeff = Scalar.Q
module Float : S with module Coeff = Scalar.Float
exception Not_linear
module MakeScalar (L : S) : Scalar.S with type t = L.t

Gives an interface Scalar.S to linear expressions. Since to_float and div have no meaning for linear expressions, they are implemented as assert false. You should never use them. Simialr behavior for the moment for comparison functions. Moreover, the product of two linear expressions is a linear expression only when at least one of them is a constant. Not_linear is raised otherwise.