package osdp

  1. Overview
  2. Docs
module Poly : sig ... end
type var
type polynomial_expr =
  1. | Const of Poly.t
  2. | Var of var
  3. | Mult_scalar of Poly.Coeff.t * polynomial_expr
  4. | Add of polynomial_expr * polynomial_expr
  5. | Sub of polynomial_expr * polynomial_expr
  6. | Mult of polynomial_expr * polynomial_expr
  7. | Power of polynomial_expr * int
  8. | Compose of polynomial_expr * polynomial_expr list
  9. | Derive of polynomial_expr * int
val make : ?n:int -> ?d:int -> ?homogen:bool -> string -> polynomial_expr
val var : string -> polynomial_expr
val var_poly : string -> int -> ?homogen:bool -> int -> polynomial_expr * (Monomial.t * polynomial_expr) list
val const : Poly.t -> polynomial_expr
val monomial : Monomial.t -> polynomial_expr
val power : polynomial_expr -> int -> polynomial_expr
val derive : polynomial_expr -> int -> polynomial_expr
val of_list : (Monomial.t * polynomial_expr) list -> polynomial_expr
exception Dimension_error
val to_list : polynomial_expr -> (Monomial.t * polynomial_expr) list
val nb_vars : polynomial_expr -> int
val degree : polynomial_expr -> int
val is_homogeneous : polynomial_expr -> bool
val param_vars : polynomial_expr -> var list
val (!!) : Poly.t -> polynomial_expr
val (??) : int -> polynomial_expr
val (**) : polynomial_expr -> int -> polynomial_expr
val pp : Stdlib.Format.formatter -> polynomial_expr -> unit
val pp_names : string list -> Stdlib.Format.formatter -> polynomial_expr -> unit
type options = {
  1. sdp : Sdp.options;
  2. verbose : int;
  3. scale : bool;
  4. trace_obj : bool;
  5. dualize : bool;
  6. monoms : Monomial.t list list;
  7. pad : float;
  8. pad_list : float list;
}
val default : options
type obj =
  1. | Minimize of polynomial_expr
  2. | Maximize of polynomial_expr
  3. | Purefeas
type values
type !'a witness = Monomial.t array * 'a array array
exception Not_linear
val solve : ?options:options -> ?solver:Sdp.solver -> obj -> polynomial_expr list -> SdpRet.t * (float * float) * values * float witness list
val value_poly : polynomial_expr -> values -> Poly.t
val check : ?options:options -> ?values:values -> polynomial_expr -> float witness -> bool
val check_round : ?options:options -> ?values:values -> polynomial_expr list -> float witness list -> (values * Scalar.Q.t witness list) option
OCaml

Innovation. Community. Security.