47 template<
unsigned int Precision>
53 template<
unsigned int Precision>
60 template<
unsigned int Precision>
70 template<
unsigned int Precision>
77 template<
unsigned int Precision>
87 template<
unsigned int Precision>
94 template<
unsigned int Precision>
100 template<
unsigned int Precision>
107 template<
unsigned int Precision>
117 template<
unsigned int Precision>
124 template<
unsigned int Precision>
134 template<
unsigned int Precision>
193 template<
unsigned int Precision>
223 tauq.setbounds(0, n-1);
224 taup.setbounds(0, n-1);
228 tauq.setbounds(0, m-1);
229 taup.setbounds(0, m-1);
237 for(i=0; i<=n-1; i++)
244 reflections::generatereflection<Precision>(t, m-
i, ltau);
246 ap::vmove(a.getcolumn(i, i, m-1), t.getvector(1, m-i));
252 reflections::applyreflectionfromtheleft<Precision>(a, ltau, t,
i, m-1, i+1, n-1, work);
260 ap::vmove(t.getvector(1, n-i-1), a.getrow(i, i+1, n-1));
261 reflections::generatereflection<Precision>(t, n-1-
i, ltau);
263 ap::vmove(a.getrow(i, i+1, n-1), t.getvector(1, n-1-i));
269 reflections::applyreflectionfromtheright<Precision>(a, ltau, t, i+1, m-1, i+1, n-1, work);
283 for(i=0; i<=m-1; i++)
290 reflections::generatereflection<Precision>(t, n-
i, ltau);
292 ap::vmove(a.getrow(i, i, n-1), t.getvector(1, n-i));
298 reflections::applyreflectionfromtheright<Precision>(a, ltau, t, i+1, m-1,
i, n-1, work);
306 ap::vmove(t.getvector(1, m-1-i), a.getcolumn(i, i+1, m-1));
307 reflections::generatereflection<Precision>(t, m-1-
i, ltau);
309 ap::vmove(a.getcolumn(i, i+1, m-1), t.getvector(1, m-1-i));
315 reflections::applyreflectionfromtheleft<Precision>(a, ltau, t, i+1, m-1, i+1, n-1, work);
347 template<
unsigned int Precision>
361 if( m==0 || n==0 || qcolumns==0 )
369 q.setbounds(0, m-1, 0, qcolumns-1);
370 for(i=0; i<=m-1; i++)
372 for(j=0; j<=qcolumns-1; j++)
388 rmatrixbdmultiplybyq<Precision>(qp,
m, n, tauq, q,
m, qcolumns,
false,
false);
421 template<
unsigned int Precision>
441 if( m<=0 || n<=0 || zrows<=0 || zcolumns<=0 )
491 reflections::applyreflectionfromtheright<Precision>(z, tauq(i),
v, 0, zrows-1,
i, m-1, work);
495 reflections::applyreflectionfromtheleft<Precision>(z, tauq(i),
v,
i, m-1, 0, zcolumns-1, work);
499 while( i!=i2+istep );
539 reflections::applyreflectionfromtheright<Precision>(z, tauq(i),
v, 0, zrows-1, i+1, m-1, work);
543 reflections::applyreflectionfromtheleft<Precision>(z, tauq(i),
v, i+1, m-1, 0, zcolumns-1, work);
547 while( i!=i2+istep );
574 template<
unsigned int Precision>
588 if( m==0 || n==0 || ptrows==0 )
596 pt.setbounds(0, ptrows-1, 0, n-1);
597 for(i=0; i<=ptrows-1; i++)
599 for(j=0; j<=n-1; j++)
615 rmatrixbdmultiplybyp<Precision>(qp,
m, n, taup, pt, ptrows, n,
true,
true);
648 template<
unsigned int Precision>
668 if( m<=0 || n<=0 || zrows<=0 || zcolumns<=0 )
722 reflections::applyreflectionfromtheright<Precision>(z, taup(i),
v, 0, zrows-1, i+1, n-1, work);
726 reflections::applyreflectionfromtheleft<Precision>(z, taup(i),
v, i+1, n-1, 0, zcolumns-1, work);
730 while( i!=i2+istep );
769 reflections::applyreflectionfromtheright<Precision>(z, taup(i),
v, 0, zrows-1,
i, n-1, work);
773 reflections::applyreflectionfromtheleft<Precision>(z, taup(i),
v,
i, n-1, 0, zcolumns-1, work);
777 while( i!=i2+istep );
804 template<
unsigned int Precision>
824 for(i=0; i<=n-2; i++)
835 for(i=0; i<=m-2; i++)
849 template<
unsigned int Precision>
873 taup.setbounds(1, minmn);
874 tauq.setbounds(1, minmn);
889 reflections::generatereflection<Precision>(t, mmip1, ltau);
891 ap::vmove(a.getcolumn(i, i, m), t.getvector(1, mmip1));
897 reflections::applyreflectionfromtheleft<Precision>(a, ltau, t,
i,
m, i+1, n, work);
907 ap::vmove(t.getvector(1, nmi), a.getrow(i, ip1, n));
908 reflections::generatereflection<Precision>(t, nmi, ltau);
910 ap::vmove(a.getrow(i, ip1, n), t.getvector(1, nmi));
916 reflections::applyreflectionfromtheright<Precision>(a, ltau, t, i+1,
m, i+1, n, work);
938 reflections::generatereflection<Precision>(t, nmip1, ltau);
940 ap::vmove(a.getrow(i, i, n), t.getvector(1, nmip1));
946 reflections::applyreflectionfromtheright<Precision>(a, ltau, t, i+1,
m,
i, n, work);
956 ap::vmove(t.getvector(1, mmi), a.getcolumn(i, ip1, m));
957 reflections::generatereflection<Precision>(t, mmi, ltau);
959 ap::vmove(a.getcolumn(i, ip1, m), t.getvector(1, mmi));
965 reflections::applyreflectionfromtheleft<Precision>(a, ltau, t, i+1,
m, i+1, n, work);
980 template<
unsigned int Precision>
997 if( m==0 || n==0 || qcolumns==0 )
1005 q.setbounds(1, m, 1, qcolumns);
1014 for(j=1; j<=qcolumns; j++)
1033 reflections::applyreflectionfromtheleft<Precision>(q, tauq(i),
v,
i,
m, 1, qcolumns, work);
1038 for(i=
ap::minint(m-1, qcolumns-1); i>=1; i--)
1044 reflections::applyreflectionfromtheleft<Precision>(q, tauq(i),
v, i+1,
m, 1, qcolumns, work);
1054 template<
unsigned int Precision>
1076 if( m<=0 || n<=0 || zrows<=0 || zcolumns<=0 )
1127 reflections::applyreflectionfromtheright<Precision>(z, tauq(i),
v, 1, zrows,
i,
m, work);
1131 reflections::applyreflectionfromtheleft<Precision>(z, tauq(i),
v,
i,
m, 1, zcolumns, work);
1135 while( i!=i2+istep );
1177 reflections::applyreflectionfromtheright<Precision>(z, tauq(i),
v, 1, zrows, i+1,
m, work);
1181 reflections::applyreflectionfromtheleft<Precision>(z, tauq(i),
v, i+1,
m, 1, zcolumns, work);
1185 while( i!=i2+istep );
1195 template<
unsigned int Precision>
1212 if( m==0 || n==0 || ptrows==0 )
1220 pt.setbounds(1, ptrows, 1, n);
1227 for(i=1; i<=ptrows; i++)
1249 reflections::applyreflectionfromtheright<Precision>(pt, taup(i),
v, 1, ptrows, i+1, n, work);
1259 reflections::applyreflectionfromtheright<Precision>(pt, taup(i),
v, 1, ptrows,
i, n, work);
1269 template<
unsigned int Precision>
1291 if( m<=0 || n<=0 || zrows<=0 || zcolumns<=0 )
1347 reflections::applyreflectionfromtheright<Precision>(z, taup(i),
v, 1, zrows, i+1, n, work);
1351 reflections::applyreflectionfromtheleft<Precision>(z, taup(i),
v, i+1, n, 1, zcolumns, work);
1355 while( i!=i2+istep );
1395 reflections::applyreflectionfromtheright<Precision>(z, taup(i),
v, 1, zrows,
i, n, work);
1399 reflections::applyreflectionfromtheleft<Precision>(z, taup(i),
v,
i, n, 1, zcolumns, work);
1403 while( i!=i2+istep );
1412 template<
unsigned int Precision>
1432 for(i=1; i<=n-1; i++)
1443 for(i=1; i<=m-1; i++)
void rmatrixbdmultiplybyp(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &taup, ap::template_2d_array< amp::ampf< Precision > > &z, int zrows, int zcolumns, bool fromtheright, bool dotranspose)
void tobidiagonal(ap::template_2d_array< amp::ampf< Precision > > &a, int m, int n, ap::template_1d_array< amp::ampf< Precision > > &tauq, ap::template_1d_array< amp::ampf< Precision > > &taup)
void multiplybyqfrombidiagonal(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &tauq, ap::template_2d_array< amp::ampf< Precision > > &z, int zrows, int zcolumns, bool fromtheright, bool dotranspose)
void rmatrixbd(ap::template_2d_array< amp::ampf< Precision > > &a, int m, int n, ap::template_1d_array< amp::ampf< Precision > > &tauq, ap::template_1d_array< amp::ampf< Precision > > &taup)
static void make_assertion(bool bClause)
void unpackptfrombidiagonal(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &taup, int ptrows, ap::template_2d_array< amp::ampf< Precision > > &pt)
void unpackdiagonalsfrombidiagonal(const ap::template_2d_array< amp::ampf< Precision > > &b, int m, int n, bool &isupper, ap::template_1d_array< amp::ampf< Precision > > &d, ap::template_1d_array< amp::ampf< Precision > > &e)
int minint(int m1, int m2)
void rmatrixbdmultiplybyq(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &tauq, ap::template_2d_array< amp::ampf< Precision > > &z, int zrows, int zcolumns, bool fromtheright, bool dotranspose)
int maxint(int m1, int m2)
void setbounds(int iLow, int iHigh)
const Variable & v
< [in] a sqrfree bivariate poly
void rmatrixbdunpackpt(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &taup, int ptrows, ap::template_2d_array< amp::ampf< Precision > > &pt)
void rmatrixbdunpackq(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &tauq, int qcolumns, ap::template_2d_array< amp::ampf< Precision > > &q)
raw_vector< T > getvector(int iStart, int iEnd)
void rmatrixbdunpackdiagonals(const ap::template_2d_array< amp::ampf< Precision > > &b, int m, int n, bool &isupper, ap::template_1d_array< amp::ampf< Precision > > &d, ap::template_1d_array< amp::ampf< Precision > > &e)
void multiplybypfrombidiagonal(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &taup, ap::template_2d_array< amp::ampf< Precision > > &z, int zrows, int zcolumns, bool fromtheright, bool dotranspose)
void vmove(raw_vector< T > vdst, const_raw_vector< T > vsrc)
void unpackqfrombidiagonal(const ap::template_2d_array< amp::ampf< Precision > > &qp, int m, int n, const ap::template_1d_array< amp::ampf< Precision > > &tauq, int qcolumns, ap::template_2d_array< amp::ampf< Precision > > &q)