76 const octave_idx_type&,
const octave_idx_type&,
77 const octave_idx_type&,
const octave_idx_type&,
84 const octave_idx_type&,
float*,
85 const octave_idx_type&, octave_idx_type&,
86 octave_idx_type&,
float*, octave_idx_type&
92 const octave_idx_type&,
const octave_idx_type&,
93 const octave_idx_type&,
float*,
94 const octave_idx_type&,
float*,
95 const octave_idx_type&, octave_idx_type&
103 const octave_idx_type&,
const octave_idx_type&,
104 const octave_idx_type&,
const float&,
const float*,
105 const octave_idx_type&,
const float*,
106 const octave_idx_type&,
const float&,
float*,
107 const octave_idx_type&
113 const octave_idx_type&,
const octave_idx_type&,
114 const float&,
const float*,
115 const octave_idx_type&,
const float*,
116 const octave_idx_type&,
const float&,
float*,
117 const octave_idx_type&
121 F77_FUNC (
xsdot, XSDOT) (
const octave_idx_type&,
const float*,
122 const octave_idx_type&,
const float*,
123 const octave_idx_type&,
float&);
128 const octave_idx_type&,
const octave_idx_type&,
129 const float&,
const float*,
const octave_idx_type&,
130 const float&,
float*,
const octave_idx_type&
135 F77_FUNC (sgetrf, SGETRF) (
const octave_idx_type&,
136 const octave_idx_type&,
float*,
137 const octave_idx_type&,
138 octave_idx_type*, octave_idx_type&);
142 const octave_idx_type&,
const octave_idx_type&,
143 const float*,
const octave_idx_type&,
144 const octave_idx_type*,
float*,
145 const octave_idx_type&, octave_idx_type&
149 F77_FUNC (sgetri, SGETRI) (
const octave_idx_type&,
float*,
150 const octave_idx_type&,
const octave_idx_type*,
151 float*,
const octave_idx_type&, octave_idx_type&);
155 const octave_idx_type&,
float*,
156 const octave_idx_type&,
const float&,
float&,
157 float*, octave_idx_type*, octave_idx_type&
161 F77_FUNC (sgelsy, SGELSY) (
const octave_idx_type&,
const octave_idx_type&,
162 const octave_idx_type&,
float*,
163 const octave_idx_type&,
float*,
164 const octave_idx_type&, octave_idx_type*,
165 float&, octave_idx_type&,
float*,
166 const octave_idx_type&, octave_idx_type&);
169 F77_FUNC (sgelsd, SGELSD) (
const octave_idx_type&,
const octave_idx_type&,
170 const octave_idx_type&,
float*,
171 const octave_idx_type&,
float*,
172 const octave_idx_type&,
float*,
float&,
173 octave_idx_type&,
float*,
174 const octave_idx_type&, octave_idx_type*,
179 const octave_idx_type&,
float *,
180 const octave_idx_type&, octave_idx_type&
185 const octave_idx_type&,
float*,
186 const octave_idx_type&,
const float&,
187 float&,
float*, octave_idx_type*,
192 const octave_idx_type&,
const octave_idx_type&,
193 const float*,
const octave_idx_type&,
float*,
194 const octave_idx_type&, octave_idx_type&
200 const octave_idx_type&,
const float*,
201 const octave_idx_type&, octave_idx_type&
208 const octave_idx_type&,
const float*,
209 const octave_idx_type&,
float&,
210 float*, octave_idx_type*, octave_idx_type&
218 const octave_idx_type&,
219 const octave_idx_type&,
const float*,
220 const octave_idx_type&,
float*,
221 const octave_idx_type&, octave_idx_type&
227 F77_FUNC (slartg, SLARTG) (
const float&,
const float&,
float&,
233 const octave_idx_type&,
const octave_idx_type&,
234 const octave_idx_type&,
const float*,
235 const octave_idx_type&,
const float*,
236 const octave_idx_type&,
const float*,
237 const octave_idx_type&,
float&, octave_idx_type&
243 const octave_idx_type&,
244 const octave_idx_type&,
const float*,
245 const octave_idx_type&,
float*,
float&
288 elem (ia(i), i) = 1.0;
303 elem (i, j) =
static_cast<unsigned char> (a.
elem (i, j));
318 return !(*
this == a);
351 if (r < 0 || r >=
rows () || c < 0 || c + a_len >
cols ())
353 (*current_liboctave_error_handler) (
"range error for insert");
374 if (r < 0 || r + a_len >
rows () || c < 0 || c >=
cols ())
376 (*current_liboctave_error_handler) (
"range error for insert");
398 if (r < 0 || r + a_nr >
rows () || c < 0 || c + a_nc >
cols ())
400 (*current_liboctave_error_handler) (
"range error for insert");
404 fill (0.0, r, c, r + a_nr - 1, c + a_nc - 1);
425 if (nr > 0 && nc > 0)
444 if (r1 < 0 || r2 < 0 || c1 < 0 || c2 < 0
445 || r1 >= nr || r2 >= nr || c1 >= nc || c2 >= nc)
447 (*current_liboctave_error_handler) (
"range error for fill");
451 if (r1 > r2) { std::swap (r1, r2); }
452 if (c1 > c2) { std::swap (c1, c2); }
454 if (r2 >= r1 && c2 >= c1)
473 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
479 retval.
insert (*
this, 0, 0);
480 retval.
insert (a, 0, nc_insert);
491 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
497 retval.
insert (*
this, 0, 0);
498 retval.
insert (a, 0, nc_insert);
509 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
515 retval.
insert (*
this, 0, 0);
516 retval.
insert (a, 0, nc_insert);
527 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
533 retval.
insert (*
this, 0, 0);
534 retval.
insert (a, 0, nc_insert);
545 (*current_liboctave_error_handler)
546 (
"column dimension mismatch for stack");
552 retval.
insert (*
this, 0, 0);
553 retval.
insert (a, nr_insert, 0);
564 (*current_liboctave_error_handler)
565 (
"column dimension mismatch for stack");
571 retval.
insert (*
this, 0, 0);
572 retval.
insert (a, nr_insert, 0);
583 (*current_liboctave_error_handler)
584 (
"column dimension mismatch for stack");
590 retval.
insert (*
this, 0, 0);
591 retval.
insert (a, nr_insert, 0);
602 (*current_liboctave_error_handler)
603 (
"column dimension mismatch for stack");
609 retval.
insert (*
this, 0, 0);
610 retval.
insert (a, nr_insert, 0);
630 if (r1 > r2) { std::swap (r1, r2); }
631 if (c1 > c2) { std::swap (c1, c2); }
663 return inverse (mattype, info, rcon, 0, 0);
671 return inverse (mattype, info, rcon, 0, 0);
679 return inverse (mattype, info, rcon, force, calc_cond);
687 return inverse (mattype, info, rcon, 0, 0);
694 return inverse (mattype, info, rcon, 0, 0);
699 int force,
int calc_cond)
const
706 if (nr != nc || nr == 0 || nc == 0)
707 (*current_liboctave_error_handler) (
"inverse requires square matrix");
710 int typ = mattype.
type ();
718 nr, tmp_data, nr, info
737 nr, tmp_data, nr, rcon,
738 work, iwork, dtrcon_info
743 if (dtrcon_info != 0)
747 if (info == -1 && ! force)
757 int force,
int calc_cond)
const
764 if (nr != nc || nr == 0 || nc == 0)
765 (*current_liboctave_error_handler) (
"inverse requires square matrix");
778 F77_XFCN (sgetri, SGETRI, (nc, tmp_data, nr, pipvt,
782 lwork = (lwork < 2 *nc ? 2*nc : lwork);
791 anorm = retval.
abs ().
sum ().
row (static_cast<octave_idx_type>(0))
794 F77_XFCN (sgetrf, SGETRF, (nc, nc, tmp_data, nr, pipvt, info));
809 nc, tmp_data, nr, anorm,
810 rcon, pz, piz, dgecon_info
813 if (dgecon_info != 0)
817 if (info == -1 && ! force)
823 F77_XFCN (sgetri, SGETRI, (nc, tmp_data, nr, pipvt,
824 pz, lwork, dgetri_info));
826 if (dgetri_info != 0)
839 int force,
int calc_cond)
const
841 int typ = mattype.
type (
false);
845 typ = mattype.
type (*
this);
848 ret =
tinverse (mattype, info, rcon, force, calc_cond);
857 rcon = chol.
rcond ();
867 ret =
finverse (mattype, info, rcon, force, calc_cond);
869 if ((mattype.
is_hermitian () || calc_cond) && rcon == 0.)
894 tol = nr * sigma.
elem (0) * std::numeric_limits<double>::epsilon ();
896 tol = nc * sigma.
elem (0) * std::numeric_limits<double>::epsilon ();
899 while (r >= 0 && sigma.
elem (r) < tol)
913 #if defined (HAVE_FFTW)
923 size_t npts, nsamples;
925 if (nr == 1 || nc == 1)
927 npts = nr > nc ? nr : nc;
952 size_t npts, nsamples;
954 if (nr == 1 || nc == 1)
956 npts = nr > nc ? nr : nc;
1016 F77_FUNC (
cfftb, CFFTB) (
const octave_idx_type&, FloatComplex*,
1030 if (nr == 1 || nc == 1)
1032 npts = nr > nc ? nr : nc;
1071 if (nr == 1 || nc == 1)
1073 npts = nr > nc ? nr : nc;
1100 tmp_data[j] = tmp_data[j] / static_cast<float> (npts);
1115 if (nr == 1 || nc == 1)
1117 npts = nr > nc ? nr : nc;
1148 pwsave = wsave.fortran_vec ();
1160 prow[i] = tmp_data[i*nr + j];
1165 tmp_data[i*nr + j] = prow[i];
1181 if (nr == 1 || nc == 1)
1183 npts = nr > nc ? nr : nc;
1210 tmp_data[j] = tmp_data[j] / static_cast<float> (npts);
1217 pwsave = wsave.fortran_vec ();
1229 prow[i] = tmp_data[i*nr + j];
1234 tmp_data[i*nr + j] = prow[i] / static_cast<float> (npts);
1259 int calc_cond)
const
1262 return determinant (mattype, info, rcon, calc_cond);
1268 int calc_cond)
const
1279 (*current_liboctave_error_handler) (
"matrix must be square");
1282 volatile int typ = mattype.
type ();
1289 typ = mattype.
type (*
this);
1296 retval *=
elem (i,i);
1304 if (calc_cond) anorm =
xnorm (*
this, 1);
1326 nr, tmp_data, nr, anorm,
1334 retval *= atmp (i,i);
1336 retval = retval.
square ();
1340 (*current_liboctave_error_handler) (
"det: invalid dense matrix type");
1354 if (calc_cond) anorm =
xnorm (*
this, 1);
1356 F77_XFCN (sgetrf, SGETRF, (nr, nr, tmp_data, nr, pipvt, info));
1377 nc, tmp_data, nr, anorm,
1391 float c = atmp(i,i);
1392 retval *= (ipvt(i) != (i+1)) ? -c : c;
1406 return rcond (mattype);
1417 (*current_liboctave_error_handler) (
"matrix must be square");
1418 else if (nr == 0 || nc == 0)
1422 volatile int typ = mattype.
type ();
1425 typ = mattype.
type (*
this);
1444 nr, tmp_data, nr, rcon,
1454 (*current_liboctave_error_handler)
1455 (
"permuted triangular matrix not implemented");
1472 nr, tmp_data, nr, rcon,
1482 (*current_liboctave_error_handler)
1483 (
"permuted triangular matrix not implemented");
1496 anorm = atmp.
abs().
sum().
1497 row(static_cast<octave_idx_type>(0)).
max();
1517 nr, tmp_data, nr, anorm,
1537 anorm = atmp.
abs ().
sum ().
1538 row(static_cast<octave_idx_type>(0)).
max ();
1545 F77_XFCN (sgetrf, SGETRF, (nr, nr, tmp_data, nr, pipvt, info));
1556 nc, tmp_data, nr, anorm,
1575 float& rcon, solve_singularity_handler sing_handler,
1583 if (nr != b.
rows ())
1585 (
"matrix dimension mismatch solution of linear equations");
1586 else if (nr == 0 || nc == 0 || b.
cols () == 0)
1590 volatile int typ = mattype.
type ();
1600 (*current_liboctave_error_handler)
1601 (
"permuted triangular matrix not implemented");
1617 nr, b_nc, tmp_data, nr,
1637 nr, tmp_data, nr, rcon,
1646 volatile float rcond_plus_one = rcon + 1.0;
1648 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1653 sing_handler (rcon);
1671 float& rcon, solve_singularity_handler sing_handler,
1679 if (nr != b.
rows ())
1681 (
"matrix dimension mismatch solution of linear equations");
1682 else if (nr == 0 || nc == 0 || b.
cols () == 0)
1686 volatile int typ = mattype.
type ();
1696 (*current_liboctave_error_handler)
1697 (
"permuted triangular matrix not implemented");
1713 nr, b_nc, tmp_data, nr,
1733 nr, tmp_data, nr, rcon,
1742 volatile float rcond_plus_one = rcon + 1.0;
1744 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1749 sing_handler (rcon);
1766 float& rcon, solve_singularity_handler sing_handler,
1767 bool calc_cond)
const
1774 if (nr != nc || nr != b.
rows ())
1776 (
"matrix dimension mismatch solution of linear equations");
1777 else if (nr == 0 || b.
cols () == 0)
1781 volatile int typ = mattype.
type ();
1794 anorm = atmp.
abs().
sum().
row(static_cast<octave_idx_type>(0)).
max();
1819 nr, tmp_data, nr, anorm,
1826 volatile float rcond_plus_one = rcon + 1.0;
1828 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1833 sing_handler (rcon);
1847 nr, b_nc, tmp_data, nr,
1848 result, b.
rows (), info
1870 anorm = atmp.
abs().
sum().
row(static_cast<octave_idx_type>(0)).
max();
1877 F77_XFCN (sgetrf, SGETRF, (nr, nr, tmp_data, nr, pipvt, info));
1886 sing_handler (rcon);
1900 nc, tmp_data, nr, anorm,
1907 volatile float rcond_plus_one = rcon + 1.0;
1909 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1914 sing_handler (rcon);
1929 nr, b_nc, tmp_data, nr,
1930 pipvt, result, b.
rows (), info
1938 (*current_liboctave_error_handler) (
"incorrect matrix type");
1949 return solve (typ, b, info, rcon, 0);
1957 return solve (typ, b, info, rcon, 0);
1964 return solve (typ, b, info, rcon, 0);
1970 float& rcon, solve_singularity_handler sing_handler,
1974 int typ = mattype.
type ();
1977 typ = mattype.
type (*
this);
1981 retval =
utsolve (mattype, b, info, rcon, sing_handler,
true, transt);
1983 retval =
ltsolve (mattype, b, info, rcon, sing_handler,
true, transt);
1988 retval =
fsolve (mattype, b, info, rcon, sing_handler,
true);
1991 (*current_liboctave_error_handler) (
"unknown matrix type");
1999 retval =
lssolve (b, info, rank, rcon);
2010 return solve (typ, b, info, rcon, 0);
2018 return solve (typ, b, info, rcon, 0);
2026 return solve (typ, b, info, rcon, 0);
2053 const float *smd = sm.
data ();
2063 float& rcon, solve_singularity_handler sing_handler,
2067 tmp =
solve (typ, tmp, info, rcon, sing_handler, singular_fallback, transt);
2075 return solve (typ, b, info, rcon);
2083 return solve (typ, b, info, rcon);
2091 return solve (typ, b, info, rcon, 0);
2097 float& rcon, solve_singularity_handler sing_handler,
2101 tmp =
solve (typ, tmp, info, rcon, sing_handler,
true, transt);
2102 return tmp.
column (static_cast<octave_idx_type> (0));
2109 return tmp.
solve (typ, b);
2117 return tmp.
solve (typ, b, info);
2125 return tmp.
solve (typ, b, info, rcon);
2131 solve_singularity_handler sing_handler,
2135 return tmp.
solve (typ, b, info, rcon, sing_handler, transt);
2143 return solve (b, info, rcon, 0);
2150 return solve (b, info, rcon, 0);
2157 return solve (b, info, rcon, 0);
2162 float& rcon, solve_singularity_handler sing_handler,
2166 return solve (mattype, b, info, rcon, sing_handler,
true, transt);
2173 return tmp.
solve (b);
2180 return tmp.
solve (b, info);
2188 return tmp.
solve (b, info, rcon);
2194 solve_singularity_handler sing_handler,
2198 return tmp.
solve (b, info, rcon, sing_handler, transt);
2205 return solve (b, info, rcon);
2212 return solve (b, info, rcon);
2219 return solve (b, info, rcon, 0);
2224 float& rcon, solve_singularity_handler sing_handler,
2228 return solve (mattype, b, info, rcon, sing_handler, transt);
2235 return tmp.
solve (b);
2243 return tmp.
solve (b, info);
2251 return tmp.
solve (b, info, rcon);
2256 float& rcon, solve_singularity_handler sing_handler,
2260 return tmp.
solve (b, info, rcon, sing_handler, transt);
2269 return lssolve (b, info, rank, rcon);
2277 return lssolve (b, info, rank, rcon);
2285 return lssolve (b, info, rank, rcon);
2301 (
"matrix dimension mismatch solution of linear equations");
2302 else if (m == 0 || n == 0 || b.
cols () == 0)
2315 retval.
elem (i, j) = b.
elem (i, j);
2342 m, n, nrhs, -1, mnthr
2348 float dminmn =
static_cast<float> (minmn);
2349 float dsmlsizp1 =
static_cast<float> (smlsiz+1);
2350 float tmp =
xlog2 (dminmn / dsmlsizp1);
2362 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval, maxmn,
2364 lwork, piwork, info));
2370 if (n > m && n >= mnthr)
2373 = 9*m + 2*m*smlsiz + 8*m*nlvl + m*nrhs + (smlsiz+1)*(smlsiz+1);
2386 if (wlalsd > addend)
2391 if (work(0) < lworkaround)
2392 work(0) = lworkaround;
2397 = 12*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + (smlsiz+1)*(smlsiz+1);
2399 if (work(0) < lworkaround)
2400 work(0) = lworkaround;
2406 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval,
2407 maxmn, ps, rcon, rank,
2411 if (s.
elem (0) == 0.0)
2414 rcon = s.
elem (minmn - 1) / s.
elem (0);
2429 return tmp.
lssolve (b, info, rank, rcon);
2438 return tmp.
lssolve (b, info, rank, rcon);
2447 return tmp.
lssolve (b, info, rank, rcon);
2455 return tmp.
lssolve (b, info, rank, rcon);
2464 return lssolve (b, info, rank, rcon);
2472 return lssolve (b, info, rank, rcon);
2480 return lssolve (b, info, rank, rcon);
2496 (
"matrix dimension mismatch solution of linear equations");
2497 else if (m == 0 || n == 0)
2536 float dminmn =
static_cast<float> (minmn);
2537 float dsmlsizp1 =
static_cast<float> (smlsiz+1);
2538 float tmp =
xlog2 (dminmn / dsmlsizp1);
2550 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval, maxmn,
2552 lwork, piwork, info));
2557 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval,
2558 maxmn, ps, rcon, rank,
2564 if (s.
elem (0) == 0.0)
2567 rcon = s.
elem (minmn - 1) / s.
elem (0);
2583 return tmp.
lssolve (b, info, rank, rcon);
2593 return tmp.
lssolve (b, info, rank, rcon);
2602 return tmp.
lssolve (b, info, rank, rcon);
2610 return tmp.
lssolve (b, info, rank, rcon);
2622 if (nr != a_nr || nc != a_nc)
2643 if (nr != a_nr || nc != a_nc)
2673 len, a_len, 1, 1.0, v.
data (), len,
2674 a.
data (), 1, 0.0, c, len
2734 if (nr == 1 || nc == 1)
2738 (
"diag: expecting vector argument");
2758 if (nr > 0 && nc > 0)
2769 for (idx_j = 0; idx_j < nc; idx_j++)
2771 tmp_min =
elem (i, idx_j);
2779 float tmp =
elem (i, j);
2783 else if (tmp < tmp_min)
2790 result.
elem (i) = tmp_min;
2791 idx_arg.
elem (i) =
xisnan (tmp_min) ? 0 : idx_j;
2813 if (nr > 0 && nc > 0)
2824 for (idx_j = 0; idx_j < nc; idx_j++)
2826 tmp_max =
elem (i, idx_j);
2834 float tmp =
elem (i, j);
2838 else if (tmp > tmp_max)
2845 result.
elem (i) = tmp_max;
2846 idx_arg.
elem (i) =
xisnan (tmp_max) ? 0 : idx_j;
2868 if (nr > 0 && nc > 0)
2879 for (idx_i = 0; idx_i < nr; idx_i++)
2881 tmp_min =
elem (idx_i, j);
2889 float tmp =
elem (i, j);
2893 else if (tmp < tmp_min)
2900 result.
elem (j) = tmp_min;
2901 idx_arg.
elem (j) =
xisnan (tmp_min) ? 0 : idx_i;
2923 if (nr > 0 && nc > 0)
2934 for (idx_i = 0; idx_i < nr; idx_i++)
2936 tmp_max =
elem (idx_i, j);
2944 float tmp =
elem (i, j);
2948 else if (tmp > tmp_max)
2955 result.
elem (j) = tmp_max;
2956 idx_arg.
elem (j) =
xisnan (tmp_max) ? 0 : idx_i;
2984 if (nr > 0 && nc > 0)
2990 tmp = octave_read_value<float> (is);
2992 a.
elem (i, j) = tmp;
3006 float cc, s, temp_r;
3008 F77_FUNC (slartg, SLARTG) (
x, y, cc, s, temp_r);
3057 1, a_nr, b_nr, pa, a_nr, pb,
3058 b_nr, px, a_nr, scale, info
3094 return trans ?
'T' :
'N';
3118 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
3120 else if (a.
data () == b.
data () && a_nr == b_nc && tra != trb)
3131 a.
data (), lda, 0.0, c, a_nr
3134 for (
int j = 0; j < a_nr; j++)
3135 for (
int i = 0; i < j; i++)
3157 lda, tda, 1.0, a.
data (), lda,
3158 b.
data (), 1, 0.0, c, 1
3166 ldb, tdb, 1.0, b.
data (), ldb,
3167 a.
data (), 1, 0.0, c, 1
3176 a_nr, b_nc, a_nc, 1.0, a.
data (),
3177 lda, b.
data (), ldb, 0.0, c, a_nr
3190 return xgemm (a, b);
3195 #define EMPTY_RETURN_CHECK(T) \
3196 if (nr == 0 || nc == 0) \
3213 result(i, j) =
xmin (d, m(i, j));
3233 result(i, j) =
xmin (m(i, j), d);
3247 (*current_liboctave_error_handler)
3248 (
"two-arg min expecting args of same size");
3260 result(i, j) =
xmin (a(i, j), b(i, j));
3280 result(i, j) =
xmax (d, m(i, j));
3300 result(i, j) =
xmax (m(i, j), d);
3314 (*current_liboctave_error_handler)
3315 (
"two-arg max expecting args of same size");
3327 result(i, j) =
xmax (a(i, j), b(i, j));
3344 (
"linspace: vectors must be of equal length");
3348 retval.clear (m, n);
3350 retval(i, 0) = x1(i);
3353 float *delta = &retval(0, n-1);
3355 delta[i] = (x2(i) - x1(i)) / (n - 1);
3359 retval(i, j) = x1(i) + j*delta[i];
3362 retval(i, n-1) = x2(i);
FloatMatrix xgemm(const FloatMatrix &a, const FloatMatrix &b, blas_trans_type transa, blas_trans_type transb)
FloatMatrix extract_n(octave_idx_type r1, octave_idx_type c1, octave_idx_type nr, octave_idx_type nc) const
#define EMPTY_RETURN_CHECK(T)
#define F77_CHAR_ARG_LEN(l)
FloatMatrix & operator-=(const FloatDiagMatrix &a)
FloatComplexMatrix solve(MatrixType &typ, const FloatMatrix &b) const
void resize(octave_idx_type nr, octave_idx_type nc, float rfv=0)
FloatMatrix cumprod(int dim=-1) const
FloatMatrix finverse(MatrixType &mattype, octave_idx_type &info, float &rcon, int force, int calc_cond) const
FloatMatrix operator*(const FloatColumnVector &v, const FloatRowVector &a)
void gripe_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
#define MM_BOOL_OPS(M1, M2)
FloatMatrix abs(void) const
static int fft(const double *in, Complex *out, size_t npts, size_t nsamples=1, octave_idx_type stride=1, octave_idx_type dist=-1)
T elem(octave_idx_type r, octave_idx_type c) const
std::ostream & operator<<(std::ostream &os, const FloatMatrix &a)
FloatMatrix & insert(const FloatMatrix &a, octave_idx_type r, octave_idx_type c)
FloatMatrix min(float d, const FloatMatrix &m)
FloatMatrix Givens(float x, float y)
octave_idx_type rows(void) const
FloatMatrix sumsq(int dim=-1) const
FloatMatrix & operator+=(const FloatDiagMatrix &a)
static const idx_vector colon
static octave_idx_type nn
subroutine xslange(norm, m, n, a, lda, work, retval)
FloatNDArray cumsum(int dim=-1) const
FloatMatrix fsolve(MatrixType &typ, const FloatMatrix &b, octave_idx_type &info, float &rcon, solve_singularity_handler sing_handler, bool calc_cond=false) const
FloatMatrix transpose(void) const
void mx_inline_real(size_t n, T *r, const std::complex< T > *x)
#define SM_BOOL_OPS(S, M)
FloatDET determinant(void) const
void resize(octave_idx_type n, const float &rfv=0)
FloatMatrix & fill(float val)
Complex xmax(const Complex &x, const Complex &y)
FloatRowVector column_min(void) const
std::istream & operator>>(std::istream &is, FloatMatrix &a)
FloatNDArray diag(octave_idx_type k=0) const
octave_idx_type rows(void) const
FloatMatrix diag(octave_idx_type k=0) const
static char get_blas_trans_arg(bool trans)
FloatColumnVector row_min(void) const
FloatMatrix utsolve(MatrixType &typ, const FloatMatrix &b, octave_idx_type &info, float &rcon, solve_singularity_handler sing_handler, bool calc_cond=false, blas_trans_type transt=blas_no_trans) const
FloatNDArray sumsq(int dim=-1) const
Complex xmin(const Complex &x, const Complex &y)
subroutine xilaenv(ispec, name, opts, n1, n2, n3, n4, retval)
float & elem(octave_idx_type n)
bool is_hermitian(void) const
FloatMatrix solve(MatrixType &typ, const FloatMatrix &b) const
FloatRowVector row(octave_idx_type i) const
bool is_symmetric(void) const
FloatComplexMatrix lssolve(const FloatMatrix &b) const
subroutine cfftb(n, c, wsave)
FloatComplexMatrix ifourier(void) const
FloatMatrix tinverse(MatrixType &mattype, octave_idx_type &info, float &rcon, int force, int calc_cond) const
#define F77_XFCN(f, F, args)
octave_idx_type rows(void) const
F77_RET_T const double const double double * d
FloatMatrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
FloatNDArray abs(void) const
FloatNDArray sum(int dim=-1) const
FloatMatrix cumsum(int dim=-1) const
static int fftNd(const double *, Complex *, const int, const dim_vector &)
#define F77_CONST_CHAR_ARG2(x, l)
FloatMatrix stack(const FloatMatrix &a) const
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
base_det< float > FloatDET
static MArray< double > const octave_idx_type const octave_idx_type octave_idx_type octave_idx_type r2
subroutine cffti(n, wsave)
liboctave_error_handler current_liboctave_error_handler
int type(bool quiet=true)
FloatComplexMatrix fourier(void) const
FloatMatrix left_singular_matrix(void) const
FloatMatrix imag(const FloatComplexMatrix &a)
const Array< octave_idx_type > & col_perm_vec(void) const
FloatMatrix right_singular_matrix(void) const
FloatMatrix real(const FloatComplexMatrix &a)
FloatComplexMatrix ifourier2d(void) const
FloatColumnVector extract(octave_idx_type r1, octave_idx_type r2) const
static int ifft(const Complex *in, Complex *out, size_t npts, size_t nsamples=1, octave_idx_type stride=1, octave_idx_type dist=-1)
const float * data(void) const
FloatDiagMatrix singular_values(void) const
double norm(const ColumnVector &v)
F77_RET_T F77_CONST_CHAR_ARG_DECL
void resize(const dim_vector &dv, const T &rfv)
subroutine cfftf(n, c, wsave)
void mark_as_unsymmetric(void)
bool is_square(void) const
OCTAVE_API double xnorm(const ColumnVector &x, double p)
void gripe_singular_matrix(double rcond)
subroutine xsdot(n, dx, incx, dy, incy, retval)
FloatNDArray prod(int dim=-1) const
FloatColumnVector extract_diag(octave_idx_type k=0) const
FloatColumnVector column(octave_idx_type i) const
FloatColumnVector row_max(void) const
void mark_as_rectangular(void)
friend class FloatComplexMatrix
static int ifftNd(const Complex *, Complex *, const int, const dim_vector &)
float & xelem(octave_idx_type n)
FloatMatrix sum(int dim=-1) const
octave_idx_type cols(void) const
FloatMatrix schur_matrix(void) const
octave_idx_type length(void) const
Number of elements in the array.
FloatRowVector column_max(void) const
FloatMatrix inverse(void) const
FloatNDArray cumprod(int dim=-1) const
This is a simple wrapper template that will subclass an Array type or any later type derived from ...
void octave_write_float(std::ostream &os, float d)
F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double octave_idx_type double * V
FloatMatrix unitary_matrix(void) const
F77_RET_T F77_FUNC(xilaenv, XILAENV)(const octave_idx_type &
void resize(octave_idx_type n, const float &rfv=0)
FloatMatrix inverse(void) const
static FloatComplexMatrix unstack_complex_matrix(const FloatMatrix &sm)
FloatMatrix lssolve(const FloatMatrix &b) const
void scale(Matrix &m, double x, double y, double z)
FloatMatrix prod(int dim=-1) const
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
#define MS_BOOL_OPS(M, S)
#define MM_CMP_OPS(M1, M2)
char get_blas_char(blas_trans_type transt)
bool operator!=(const FloatMatrix &a) const
FloatNDArray & insert(const FloatNDArray &a, octave_idx_type r, octave_idx_type c)
FloatMatrix ltsolve(MatrixType &typ, const FloatMatrix &b, octave_idx_type &info, float &rcon, solve_singularity_handler sing_handler, bool calc_cond=false, blas_trans_type transt=blas_no_trans) const
std::complex< float > FloatComplex
static MArray< double > const octave_idx_type const octave_idx_type octave_idx_type octave_idx_type octave_idx_type c1
static MArray< double > const octave_idx_type const octave_idx_type octave_idx_type r1
const T * fortran_vec(void) const
FloatMatrix Sylvester(const FloatMatrix &a, const FloatMatrix &b, const FloatMatrix &c)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
octave_idx_type cols(void) const
FloatMatrix append(const FloatMatrix &a) const
static FloatMatrix stack_complex_matrix(const FloatComplexMatrix &cm)
FloatComplexMatrix fourier2d(void) const
octave_idx_type columns(void) const
octave_idx_type length(void) const
Array< float > index(const idx_vector &i) const
Indexing without resizing.
F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const octave_idx_type octave_idx_type &F77_CHAR_ARG_LEN_DECL F77_CHAR_ARG_LEN_DECL
F77_RET_T const double * x
FloatMatrix linspace(const FloatColumnVector &x1, const FloatColumnVector &x2, octave_idx_type n)
FloatMatrix max(float d, const FloatMatrix &m)
FloatMatrix pseudo_inverse(float tol=0.0) const
bool operator==(const FloatMatrix &a) const