46 #define MAYBE_CAST(VAR, CLASS) \
47 const CLASS *VAR = arg.type_id () == CLASS::static_type_id () ? \
48 dynamic_cast<const CLASS *> (&arg.get_rep ()) : 0
50 DEFUN (det, args, nargout,
52 @deftypefn {Built-in Function} {} det (@var{A})\n\
53 @deftypefnx {Built-in Function} {[@var{d}, @var{rcond}] =} det (@var{A})\n\
54 Compute the determinant of @var{A}.\n\
56 Return an estimate of the reciprocal condition number if requested.\n\
58 Programming Notes: Routines from @sc{lapack} are used for full matrices and\n\
59 code from @sc{umfpack} is used for sparse matrices.\n\
61 The determinant should not be used to check a matrix for singularity.\n\
62 For that, use any of the condition number functions: @code{cond},\n\
63 @code{condest}, @code{rcond}.\n\
64 @seealso{cond, condest, rcond}\n\
69 int nargin = args.
length ();
82 if (nr == 0 && nc == 0)
88 int arg_is_empty =
empty_arg (
"det", nr, nc);
160 retval(0) = info == -1 ? 0.0f : det.
value ();
161 if (rep) rep->matrix_type (mtype);
178 if (rep) rep->matrix_type (mtype);
197 retval(0) = info == -1 ? 0.0 : det.
value ();
206 MatrixType mtype = rep ? rep -> matrix_type ()
210 retval(0) = info == -1 ? 0.0 : det.
value ();
211 if (rep) rep->matrix_type (mtype);
237 MatrixType mtype = rep ? rep -> matrix_type ()
242 if (rep) rep->matrix_type (mtype);
FloatComplexDiagMatrix float_complex_diag_matrix_value(bool force=false) const
bool is_real_type(void) const
ComplexDET determinant(void) const
void gripe_wrong_type_arg(const char *name, const char *s, bool is_error)
octave_idx_type rows(void) const
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
OCTINTERP_API void print_usage(void)
octave_idx_type length(void) const
FloatDET determinant(void) const
#define DEFUN(name, args_name, nargout_name, doc)
bool is_perm_matrix(void) const
DET determinant(void) const
FloatDET determinant(void) const
int empty_arg(const char *, octave_idx_type nr, octave_idx_type nc)
void gripe_square_matrix_required(const char *name)
ComplexDiagMatrix complex_diag_matrix_value(bool force=false) const
octave_idx_type determinant(void) const
octave_idx_type columns(void) const
DET determinant(void) const
bool is_sparse_type(void) const
FloatDiagMatrix float_diag_matrix_value(bool force=false) const
bool is_complex_type(void) const
ComplexDET determinant(void) const
#define MAYBE_CAST(VAR, CLASS)
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
Matrix matrix_value(bool frc_str_conv=false) const
FloatComplexDET determinant(void) const
DET determinant(void) const
DiagMatrix diag_matrix_value(bool force=false) const
ComplexDET determinant(void) const
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
std::complex< float > FloatComplex
PermMatrix perm_matrix_value(void) const
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
FloatComplexDET determinant(void) const
std::complex< double > Complex
bool is_single_type(void) const
bool is_diag_matrix(void) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))