changeset 28814:697562e2b09a stable

glpk.m: Correct English in error() messages. * glpk.m: Use hyphens for compound adjectives. Adjust BIST tests for new strings.
author Rik <rik@octave.org>
date Mon, 28 Sep 2020 20:11:05 -0700
parents f864f78440e6
children 8f46bd7172c4 bd71a227c562
files scripts/optimization/glpk.m
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/optimization/glpk.m	Mon Sep 28 22:25:54 2020 -0400
+++ b/scripts/optimization/glpk.m	Mon Sep 28 20:11:05 2020 -0700
@@ -510,7 +510,7 @@
 
   [nc, nxa] = size (A);
   if (nxa != nx)
-    error ("glpk: A must be %d by %d, not %d by %d",
+    error ("glpk: A must be %d-by-%d, not %d-by-%d",
            nc, nx, rows (A), columns (A));
   endif
 
@@ -520,7 +520,7 @@
     error ("glpk: B cannot be an empty vector");
   endif
   if (! isreal (b) || length (b) != nc)
-    error ("glpk: B must be a real valued %d by 1 vector", nc);
+    error ("glpk: B must be a real-valued %d-by-1 vector", nc);
   endif
   if (any (! isfinite (b(:))))
     error ("glpk: The values in B must be finite");
@@ -533,7 +533,7 @@
       lb = zeros (nx, 1);
     elseif (! isreal (lb) || all (size (lb) > 1) || length (lb) != nx
             || any (isnan (lb)))
-      error ("glpk: LB must be a real valued %d by 1 column vector", nx);
+      error ("glpk: LB must be a real-valued %d-by-1 column vector", nx);
     endif
   else
     lb = zeros (nx, 1);
@@ -546,7 +546,7 @@
       ub = Inf (nx, 1);
     elseif (! isreal (ub) || all (size (ub) > 1) || length (ub) != nx
             || any (isnan (ub)))
-      error ("glpk: UB must be a real valued %d by 1 column vector", nx);
+      error ("glpk: UB must be a real-valued %d-by-1 column vector", nx);
     endif
   else
     ub = Inf (nx, 1);
@@ -558,7 +558,7 @@
     if (isempty (ctype))
       ctype = repmat ("S", nc, 1);
     elseif (! ischar (ctype) || all (size (ctype) > 1) || length (ctype) != nc)
-      error ("glpk: CTYPE must be a char valued vector of length %d", nc);
+      error ("glpk: CTYPE must be a char vector of length %d", nc);
     elseif (! all (ctype == "F" | ctype == "U" | ctype == "S"
                    | ctype == "L" | ctype == "D"))
       error ("glpk: CTYPE must contain only F, U, S, L, or D");
@@ -574,7 +574,7 @@
       vartype = repmat ("C", nx, 1);
     elseif (! ischar (vartype) || all (size (vartype) > 1)
             || length (vartype) != nx)
-      error ("glpk: VARTYPE must be a char valued vector of length %d", nx);
+      error ("glpk: VARTYPE must be a char vector of length %d", nx);
     elseif (! all (vartype == "C" | vartype == "I"))
       error ("glpk: VARTYPE must contain only C or I");
     endif
@@ -670,6 +670,6 @@
 %!error<C .* finite values> glpk(NaN, 2, 3)
 %!error<A must be finite> glpk(1, NaN, 3)
 %!error<B must be finite> glpk(1, 2, NaN)
-%!error<LB must be a real valued> glpk(1, 2, 3, NaN)
-%!error<UB must be a real valued> glpk(1, 2, 3, 4, NaN)
+%!error<LB must be a real-valued> glpk(1, 2, 3, NaN)
+%!error<UB must be a real-valued> glpk(1, 2, 3, 4, NaN)
 %!error<SENSE must be .* integer> glpk(1, 2, 3, 4, 5, "F", "C", NaN)