#include <string>
#include "CmplxAEPBAL.h"
#include "fCmplxAEPBAL.h"
#include "dbleAEPBAL.h"
#include "floatAEPBAL.h"
#include "CmplxGEPBAL.h"
#include "fCmplxGEPBAL.h"
#include "dbleGEPBAL.h"
#include "floatGEPBAL.h"
#include "quit.h"
#include "defun-dld.h"
#include "error.h"
#include "f77-fcn.h"
#include "gripes.h"
#include "oct-obj.h"
#include "utils.h"
Go to the source code of this file.
Functions | |
DEFUN_DLD (balance, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{AA} =} balance (@var{A})\n\ @deftypefnx {Loadable Function} {@var{AA} =} balance (@var{A}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{DD}, @var{AA}] =} balance (@var{A}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{D}, @var{P}, @var{AA}] =} balance (@var{A}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{CC}, @var{DD}, @var{AA}, @var{BB}] =} balance (@var{A}, @var{B}, @var{opt})\n\ \n\ Compute @code{@var{AA} = @var{DD} \\ @var{A} * @var{DD}} in which @var{AA}\n\ is a matrix whose row and column norms are roughly equal in magnitude, and\n\ @code{@var{DD} = @var{P} * @var{D}}, in which @var{P} is a permutation\n\ matrix and @var{D} is a diagonal matrix of powers of two. This allows the\n\ equilibration to be computed without round-off. Results of eigenvalue\n\ calculation are typically improved by balancing first.\n\ \n\ If two output values are requested, @code{balance} returns\n\ the diagonal @var{D} and the permutation @var{P} separately as vectors.\n\ In this case, @code{@var{DD} = eye(n)(:,@var{P}) * diag (@var{D})}, where\n\ @math{n} is the matrix size.\n\ \n\ If four output values are requested, compute @code{@var{AA} =\n\ @var{CC}*@var{A}*@var{DD}} and @code{@var{BB} = @var{CC}*@var{B}*@var{DD}},\n\ in which @var{AA} and @var{BB} have non-zero elements of approximately the\n\ same magnitude and @var{CC} and @var{DD} are permuted diagonal matrices as\n\ in @var{DD} for the algebraic eigenvalue problem.\n\ \n\ The eigenvalue balancing option @var{opt} may be one of:\n\ \n\ @table @asis\n\ @item \"noperm\", \"S\"\n\ Scale only; do not permute.\n\ \n\ @item \"noscal\", \"P\"\n\ Permute only; do not scale.\n\ @end table\n\ \n\ Algebraic eigenvalue balancing uses standard @sc{lapack} routines.\n\ \n\ Generalized eigenvalue problem balancing uses Ward's algorithm\n\ (SIAM Journal on Scientific and Statistical Computing, 1981).\n\ @end deftypefn") |
DEFUN_DLD | ( | balance | , | |
args | , | |||
nargout | ||||
) |
Definition at line 49 of file balance.cc.
References GEPBALANCE::balanced_matrix(), ComplexGEPBALANCE::balanced_matrix(), FloatGEPBALANCE::balanced_matrix(), FloatComplexGEPBALANCE::balanced_matrix(), base_aepbal< MatrixT, VectorT >::balanced_matrix(), GEPBALANCE::balanced_matrix2(), ComplexGEPBALANCE::balanced_matrix2(), FloatGEPBALANCE::balanced_matrix2(), FloatComplexGEPBALANCE::balanced_matrix2(), GEPBALANCE::balancing_matrix(), ComplexGEPBALANCE::balancing_matrix(), FloatGEPBALANCE::balancing_matrix(), FloatComplexGEPBALANCE::balancing_matrix(), AEPBALANCE::balancing_matrix(), ComplexAEPBALANCE::balancing_matrix(), FloatAEPBALANCE::balancing_matrix(), FloatComplexAEPBALANCE::balancing_matrix(), GEPBALANCE::balancing_matrix2(), ComplexGEPBALANCE::balancing_matrix2(), FloatGEPBALANCE::balancing_matrix2(), FloatComplexGEPBALANCE::balancing_matrix2(), error(), error_state, gripe_nonconformant(), gripe_square_matrix_required(), nn, base_aepbal< MatrixT, VectorT >::permuting_vector(), print_usage(), base_aepbal< MatrixT, VectorT >::scaling_vector(), and warning().