diff --git a/docs.html b/docs.html
index 42b6f098..b396f8a0 100644
--- a/docs.html
+++ b/docs.html
@@ -8630,20 +8630,67 @@ See also:
-TODO: balance
+B = balance( A )
+
B = balance( A, opt )
+
+
balance( B, A )
+
balance( B, A, opt )
+
+
balance( D, P, B, A )
+
balance( D, P, B, A, opt )
-
-...
+Create a transformed version of square-sized matrix A so that its row and column norms are roughly the same
-
-...
+The scaling details are optionally provided in vector D
+
+
+-
+The permutation details are optionally provided in vector P, which must have the type uvec
+
+
+- The opt argument is optional and specifies the transformation; it is one of:
+
+
+
+"scale" | = | apply only scaling |
+"permute" | = | apply only permutation |
+"both" | = | apply both scaling and permutation (default setting) |
+
+
+
+
+
+-
+If matrix A is not square sized, a std::logic_error exception is thrown
+
+
+- If the decomposition fails:
+
+- B = balance(A) resets B and throws a std::runtime_error exception
+- balance(B,A) resets B and returns a bool set to false (exception is not thrown)
+- balance(D,P,B,A) resets D, P, B, and returns a bool set to false (exception is not thrown)
+
-
Examples:
+mat A = { { 1 0.01 0.0001 },
+ { 100 1 0.01 },
+ { 10000 100 1 } };
+
+mat B = balance(A);
+
+
+ vec D;
+uvec P;
+ mat BB;
+
+balance(D, P, BB, A);
@@ -8651,8 +8698,8 @@ Examples:
See also:
@@ -10719,6 +10766,7 @@ See also: