26 #if defined (HAVE_CONFIG_H)
40 template <
typename MT>
51 template <
typename MT>
56 if (U.issquare () && fact.
regular ())
143 int nargin = args.length ();
144 bool issparse = (nargin > 0 && args(0).issparse ());
146 if (nargin < 1 || (issparse && nargin > 3) || (! issparse && nargin > 2))
155 if (args(
n).is_string ())
157 std::string tmp = args(
n++).string_value ();
162 error (
"lu: unrecognized string argument");
167 error (
"lu: can not define pivoting threshold THRESH for full matrices");
169 Matrix tmp = args(
n++).matrix_value ();
170 if (tmp.
numel () == 1)
176 else if (tmp.
numel () == 2)
179 error (
"lu: THRESH must be a 1- or 2-element vector");
184 bool scale = (nargout == 5);
203 "lu: function may fail when called with less than 4 output arguments and a sparse input");
271 "lu: function may fail when called with less than 4 output arguments and a sparse input");
575 DEFUN (luupdate, args, ,
620 int nargin = args.length ();
622 if (nargin != 4 && nargin != 5)
625 bool pivoted = (nargin == 5);
636 error (
"luupdate: L, U, X, and Y must be numeric");
639 error (
"luupdate: dimension mismatch");
charNDArray min(char d, const charNDArray &m)
void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
octave_idx_type numel(void) const
Number of elements in the array.
void resize(octave_idx_type nr, octave_idx_type nc, double rfv=0)
static PermMatrix eye(octave_idx_type n)
PermMatrix transpose(void) const
void update(const VT &u, const VT &v)
void update_piv(const VT &u, const VT &v)
ColumnVector P_vec(void) const
PermMatrix Pc_mat(void) const
ColumnVector Pc_vec(void) const
PermMatrix Pr_mat(void) const
const octave_idx_type * row_perm(void) const
ColumnVector Pr_vec(void) const
const octave_idx_type * col_perm(void) const
SparseMatrix R(void) const
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
octave_idx_type rows(void) const
bool isnumeric(void) const
octave_idx_type columns(void) const
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
PermMatrix perm_matrix_value(void) const
bool is_single_type(void) const
bool is_undefined(void) const
Matrix matrix_value(bool frc_str_conv=false) const
bool is_perm_matrix(void) const
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
bool iscomplex(void) const
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning_with_id(const char *id, const char *fmt,...)
void error(const char *fmt,...)
void err_wrong_type_arg(const char *name, const char *s)
void scale(Matrix &m, double x, double y, double z)
static bool check_lu_dims(const octave_value &l, const octave_value &u, const octave_value &p)
static octave_value get_lu_u(const octave::math::lu< MT > &fact)
static octave_value get_lu_l(const octave::math::lu< MT > &fact)
F77_RET_T const F77_DBLE * x
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value::octave_value(const Array< char > &chm, char type) return retval
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.