//=============================================================================
/*! cast to _zrovector */
inline _zrovector drovector::to_zrovector() const
{VERBOSE_REPORT;
zrovector newvec(l);
for(long i=0; i<l; i++){
newvec.array[i] =comple(array[i], 0.);
}
return _(newvec);
}
//=============================================================================
/*! cast to drovector_small */
template<long _l>
inline drovector_small<_l> drovector::to_drovector_small() const
{VERBOSE_REPORT;
#ifdef CPPL_DEBUG
if( l!=_l ){
std::cerr << "[ERROR]@drovector::to_drovector_small() const" << std::endl
<< "size mismatch." << std::endl
<< "Your input was from (" << l << ") to (" << _l << ")." << std::endl;
exit(1);
}
#endif//CPPL_DEBUG
drovector_small<_l> newvec;
for(long i=0; i<l; i++){
newvec(i) =(*this)(i);
}
return newvec;
}