aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/micromega/sos.ml
diff options
context:
space:
mode:
authorGravatar Xavier Clerc <xavier.clerc@inria.fr>2014-09-25 11:02:00 +0200
committerGravatar Xavier Clerc <xavier.clerc@inria.fr>2014-09-25 11:02:00 +0200
commit4e1135fb315eab7bede3861e83e0ced74cf60ed3 (patch)
tree4a67d742c88df6bd2cb6b1ba203099801a36bd81 /plugins/micromega/sos.ml
parent31205e035316a7795ee3a1e0045148194cdcfcae (diff)
Remove some 'deprecated' warnings.
Diffstat (limited to 'plugins/micromega/sos.ml')
-rw-r--r--plugins/micromega/sos.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/micromega/sos.ml b/plugins/micromega/sos.ml
index 35699f219..e8f44c680 100644
--- a/plugins/micromega/sos.ml
+++ b/plugins/micromega/sos.ml
@@ -282,14 +282,14 @@ let poly_variables (p:poly) =
(* Order monomials for human presentation. *)
(* ------------------------------------------------------------------------- *)
-let humanorder_varpow (x1,k1) (x2,k2) = x1 < x2 or x1 = x2 && k1 > k2;;
+let humanorder_varpow (x1,k1) (x2,k2) = x1 < x2 || x1 = x2 && k1 > k2;;
let humanorder_monomial =
let rec ord l1 l2 = match (l1,l2) with
_,[] -> true
| [],_ -> false
- | h1::t1,h2::t2 -> humanorder_varpow h1 h2 or h1 = h2 && ord t1 t2 in
- fun m1 m2 -> m1 = m2 or
+ | h1::t1,h2::t2 -> humanorder_varpow h1 h2 || h1 = h2 && ord t1 t2 in
+ fun m1 m2 -> m1 = m2 ||
ord (sort humanorder_varpow (graph m1))
(sort humanorder_varpow (graph m2));;
@@ -602,7 +602,7 @@ let run_csdp dbg obj mats =
let csdp obj mats =
let rv,res = run_csdp (!debugging) obj mats in
- (if rv = 1 or rv = 2 then failwith "csdp: Problem is infeasible"
+ (if rv = 1 || rv = 2 then failwith "csdp: Problem is infeasible"
else if rv = 3 then ()
(* Format.print_string "csdp warning: Reduced accuracy";
Format.print_newline() *)
@@ -653,7 +653,7 @@ let linear_program_basic a =
let mats = List.map (fun j -> diagonal (column j a)) (1--n)
and obj = vector_const (Int 1) m in
let rv,res = run_csdp false obj mats in
- if rv = 1 or rv = 2 then false
+ if rv = 1 || rv = 2 then false
else if rv = 0 then true
else failwith "linear_program: An error occurred in the SDP solver";;
@@ -667,7 +667,7 @@ let linear_program a b =
let mats = diagonal b :: List.map (fun j -> diagonal (column j a)) (1--n)
and obj = vector_const (Int 1) m in
let rv,res = run_csdp false obj mats in
- if rv = 1 or rv = 2 then false
+ if rv = 1 || rv = 2 then false
else if rv = 0 then true
else failwith "linear_program: An error occurred in the SDP solver";;
@@ -968,7 +968,7 @@ let run_csdp dbg nblocks blocksizes obj mats =
let csdp nblocks blocksizes obj mats =
let rv,res = run_csdp (!debugging) nblocks blocksizes obj mats in
- (if rv = 1 or rv = 2 then failwith "csdp: Problem is infeasible"
+ (if rv = 1 || rv = 2 then failwith "csdp: Problem is infeasible"
else if rv = 3 then ()
(*Format.print_string "csdp warning: Reduced accuracy";
Format.print_newline() *)
@@ -1439,7 +1439,7 @@ let run_csdp dbg obj mats =
let csdp obj mats =
let rv,res = run_csdp (!debugging) obj mats in
- (if rv = 1 or rv = 2 then failwith "csdp: Problem is infeasible"
+ (if rv = 1 || rv = 2 then failwith "csdp: Problem is infeasible"
else if rv = 3 then ()
(* (Format.print_string "csdp warning: Reduced accuracy";
Format.print_newline()) *)