We consider a matrix whose coefficients are functions of a set of variables. The procedure RegularMatrix allows one to determine if the set of matrices includes only regular matrices. Its syntax is
RegularMatrix(mat,vars,init,cond,typedet)where
Note that the procedure generates the C++ code for calculating the elements of the matrix by using the procedure MakeF. If these elements includes several times the same complex expressions it is advised to use the mechanism described in MakeF (section 2.1.1) to interval evaluate these expressions only once.
Note also that the used bisection method is to bisect the unknown range having the largest width. Scaling the unknown is therefore important
Note a special case that may occur if the matrix may include interval coefficients apart of the parameters or if the matrix is badly numerically conditioned. In that case it may happen that for a specific value of the parameters the sign of the determinant of the matrix cannot be ascertained (such point will be called unsafe). Hence at this point we cannot state the regularity of the matrix. But it may happen that at 2 other points the determinants will have opposite sign indicating the presence of a singularity. So the following cases may occur:
The procedure may behave in 2 different ways:
The procedure behavior is controlled through the flag `ALIAS/unsafe_det`. If this flag is set to 1 behavior 1 will be used while behavior 2 is obtained by setting the flag to 0. The default value of this flag is 0. For behavior 1 the return code of the procedure is -3 if an unsafe point is found.
The procedure reorders the boxes every `ALIAS/rand` iteration (default value=0 i.e. at each iteration). The ordering may be controlled through the `ALIAS/order` variable. Assume that the interval evaluation for a box is [a,b]. At some point the procedure will have find a box with a constant sign s for the determinant:
The conditioning may play an important role especially as the conditioned matrix is calculated symbolically. Assume for example that the first row of A is [x x] and that AK is used. If the first column of K is [a1 a2], then the first element of the conditioned matrix is a1x+a2x, that the procedure will arrange as x(a1+a2), thereby leading to an optimal form in term of interval evaluation, which is better than the numerical conditioning.
The procedure accepts an optional sixth argument which is a string such as SIMP that defines a matrix simplification procedure. The syntax of such procedure is
SIMP(int dimA,INTERVAL_MATRIX & A)where dimA is the dimension of matrix A. This procedure shall return -1 if all the matrices in the set A are regular, 0 otherwise. The C++ program corresponding to this procedure is written in the file SIMP.C. Such program may be obtained for example by using the RohnConsistency or SpectralRadiusConsistency procedures.
A parallel version of this procedure is ParallelRegularMatrix.