26#if defined (HAVE_CONFIG_H)
47solve_singularity_warning (
double rcond)
49 octave::warn_singular_matrix (rcond);
52template <
typename T1,
typename T2>
64 octave::err_nonconformant (R
"(operator \)", a_nr, a_nc, b_nr, b_nc);
70#define INSTANTIATE_MX_LEFTDIV_CONFORM(T1, T2) \
71 template bool mx_leftdiv_conform (const T1&, const T2&)
86template <
typename T1,
typename T2>
98 octave::err_nonconformant (
"operator /", a_nr, a_nc, b_nr, b_nc);
104#define INSTANTIATE_MX_DIV_CONFORM(T1, T2) \
105 template bool mx_div_conform (const T1&, const T2&)
146 Matrix result = btmp.
solve (btyp, atmp, info, rcond,
147 solve_singularity_warning);
167 = btmp.
solve (btyp, atmp, info, rcond, solve_singularity_warning);
187 = btmp.
solve (btyp, atmp, info, rcond, solve_singularity_warning);
207 = btmp.
solve (btyp, atmp, info, rcond, solve_singularity_warning);
227 solve_singularity_warning);
247 = btmp.
solve (btyp, atmp, info, rcond, solve_singularity_warning);
267 = btmp.
solve (btyp, atmp, info, rcond, solve_singularity_warning);
288 = btmp.
solve (btyp, atmp, info, rcond, solve_singularity_warning);
294template <
typename RT,
typename SM,
typename DM>
312 typedef typename DM::element_type DM_elt_type;
313 const DM_elt_type zero = DM_elt_type ();
319 const DM_elt_type s =
d.dgelem (j);
321 r.xcidx (j) = k_result;
325 r.xdata (k_result) = a.data (k) / s;
326 r.xridx (k_result) = a.ridx (k);
330 r.xcidx (nc) = k_result;
332 r.maybe_compress (
true);
340 return do_rightdiv_sm_dm<SparseMatrix> (a, b);
347 return do_rightdiv_sm_dm<SparseComplexMatrix> (a, b);
354 return do_rightdiv_sm_dm<SparseComplexMatrix> (a, b);
361 return do_rightdiv_sm_dm<SparseComplexMatrix> (a, b);
380 if (octave::math::isnan (a))
382 result =
Matrix (nr, nc, octave::numeric_limits<double>::NaN ());
386 result =
Matrix (nr, nc, octave::numeric_limits<double>::NaN ());
388 result =
Matrix (nr, nc, octave::numeric_limits<double>::Inf ());
390 result =
Matrix (nr, nc, -octave::numeric_limits<double>::Inf ());
409 if (octave::math::isnan (a))
412 Complex (octave::numeric_limits<double>::NaN (),
413 octave::numeric_limits<double>::NaN ()));
418 Complex (octave::numeric_limits<double>::NaN (),
419 octave::numeric_limits<double>::NaN ()));
422 Complex (octave::numeric_limits<double>::Inf (),
423 octave::numeric_limits<double>::Inf ()));
426 Complex (-octave::numeric_limits<double>::Inf (),
427 -octave::numeric_limits<double>::Inf ()));
497 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
509 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
521 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
533 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
545 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
557 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
569 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
582 return a.
solve (typ, b, info, rcond, solve_singularity_warning);
585template <
typename RT,
typename DM,
typename SM>
603 typedef typename DM::element_type DM_elt_type;
604 const DM_elt_type zero = DM_elt_type ();
611 r.xcidx (j) = k_result;
617 const DM_elt_type s =
d.dgelem (i);
620 r.xdata (k_result) = a.data (k) / s;
621 r.xridx (k_result) = i;
627 r.xcidx (a_nc) = k_result;
629 r.maybe_compress (
true);
637 return do_leftdiv_dm_sm<SparseMatrix> (
d, a);
644 return do_leftdiv_dm_sm<SparseComplexMatrix> (
d, a);
651 return do_leftdiv_dm_sm<SparseComplexMatrix> (
d, a);
659 return do_leftdiv_dm_sm<SparseComplexMatrix> (
d, a);
662OCTAVE_END_NAMESPACE(octave)
charNDArray min(char d, const charNDArray &m)
T & elem(octave_idx_type n)
Size of the specified dimension.
ComplexMatrix hermitian() const
MatrixType transpose() const
SparseComplexMatrix hermitian() const
ComplexMatrix solve(MatrixType &mattype, const Matrix &b) const
SparseMatrix transpose() const
Matrix solve(MatrixType &typ, const Matrix &b) const
octave_idx_type cols() const
octave_idx_type rows() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::complex< double > Complex
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
Matrix elem_xdiv(double a, const SparseMatrix &b)
Matrix xdiv(const Matrix &a, const SparseMatrix &b, MatrixType &typ)
bool mx_leftdiv_conform(const T1 &a, const T2 &b)
bool mx_div_conform(const T1 &a, const T2 &b)
RT do_rightdiv_sm_dm(const SM &a, const DM &d)
#define INSTANTIATE_MX_LEFTDIV_CONFORM(T1, T2)
#define INSTANTIATE_MX_DIV_CONFORM(T1, T2)
Matrix xleftdiv(const SparseMatrix &a, const Matrix &b, MatrixType &typ)
RT do_leftdiv_dm_sm(const DM &d, const SM &a)