|
realroot_doc 0.1.1
|
#include <solver_binary.hpp>
Definition at line 256 of file solver_binary.hpp.
| typedef K::ieee C |
Definition at line 261 of file solver_binary.hpp.
Definition at line 269 of file solver_binary.hpp.
| typedef K::floating floating |
Definition at line 260 of file solver_binary.hpp.
| typedef K::integer integer |
Definition at line 258 of file solver_binary.hpp.
| typedef K::rational rational |
Definition at line 259 of file solver_binary.hpp.
| typedef unsigned sz_t |
Definition at line 263 of file solver_binary.hpp.
| typedef bigunsigned<bitquo+(sz_t)(bitrem!=0)> unsigned_t |
Definition at line 268 of file solver_binary.hpp.
| void get_flags | ( | output & | o | ) | [inline] |
Definition at line 363 of file solver_binary.hpp.
References binary_subdivision< K >::data, and data_t::m_res.
| void Loop | ( | bool | isole = true | ) | [inline] |
Definition at line 316 of file solver_binary.hpp.
References binary_subdivision< K >::data, bound::e, bound::m, data_t::m_data, data_t::m_dmn, data_t::m_limit, data_t::m_s, data_t::mstore(), binary_subdivision< K >::sgncnt(), binary_subdivision< K >::split(), and data_t::sstore().
Referenced by binary_subdivision< K >::run_loop().
{
// std::cout <<"Starting simple solver loop"<<std::endl;
creal_t * pup, * pdw;
int d;
sz_t h,a,s,cup,cdw;
unsigned_t v;
s = data.m_s;
pup = data.m_data;
data.m_dmn[0].m = 0;
data.m_dmn[0].e = 0;
for( a = 0, d = 0; d >= 0; d--, a -= s )
{
cup = sgncnt(pup+a,s);
if ( cup )
{
if ( isole && cup == 1 ) { data.sstore(d); continue; };
if ( data.m_dmn[d].e == data.m_limit-1 )
{
if ( cup == 1 )
{
if ( *(pup+a) != 0 )
{
if ( *(pup+a+s-1) == 0 )
data.sstore(d,0);
else
data.sstore(d);
};
}
else
{
data.mstore(d);
//std::cout<<"s "<<cup<<" "<<d<<" "<<data.m_limit<<std::endl;
}
continue;
};
split(pup+a,pup+a+s,s);
split(data.m_dmn[d],data.m_dmn[d+1]);
d += 2;
a += 2*s;
};
};
//std::cout <<"End of simple solver loop"<<std::endl;
};
Definition at line 308 of file solver_binary.hpp.
Referenced by binary_sleeve_subdivision< K >::writebounds().
{
std::cout << "[";
for ( sz_t i = 0; i < n-1; i ++ )
std::cout << p[i] << ",";
std::cout << p[n-1] << " ]";
};
| void run_loop | ( | const input & | in, |
| const creal_t & | eps, | ||
| bool | isole, | ||
| texp::false_t | |||
| ) | [inline] |
Definition at line 371 of file solver_binary.hpp.
References data_t::alloc(), mmx::numerics::bitprec(), mmx::sparse::copy(), binary_subdivision< K >::data, binary_subdivision< K >::Loop(), and data_t::m_data.
Definition at line 287 of file solver_binary.hpp.
Referenced by binary_sleeve_subdivision< K >::Loop(), and binary_subdivision< K >::Loop().
Definition at line 298 of file solver_binary.hpp.
References bound::e, and bound::m.
{
r.m <<= 1;
l.m = r.m;
r.m |= 1;
r.e ++;
l.e = r.e;
};
Definition at line 274 of file solver_binary.hpp.
Referenced by binary_sleeve_subdivision< K >::dwsplit(), binary_sleeve_subdivision< K >::Loop(), binary_subdivision< K >::Loop(), and binary_sleeve_subdivision< K >::upsplit().
{
creal_t * er, * p;
er = r + (sz-1);
for ( er = r + (sz-1); er != r; er--, l++ )
{
*l = *r;
for ( p = r; p != er; p ++ )
*p = (*p+*(p+1))/2;
};
*l = *r;
};
const sz_t bitquo = numerics::bit_resolution<C>::nbit / numerics::hdwi<sz_t>::nbit [static] |
Definition at line 265 of file solver_binary.hpp.
const sz_t bitrem = numerics::bit_resolution<C>::nbit % numerics::hdwi<sz_t>::nbit [static] |
Definition at line 266 of file solver_binary.hpp.
Definition at line 271 of file solver_binary.hpp.
Referenced by binary_subdivision< K >::get_flags(), binary_subdivision< K >::Loop(), and binary_subdivision< K >::run_loop().