//============================================================================
/*! cast to _zhematrix */
inline _zhematrix dsymatrix::to_zhematrix() const
{
#ifdef CPPL_VERBOSE
std::cerr << "# [MARK] dsymatrix::to_zhematrix() const" << std::endl;
#endif//CPPL_VERBOSE
zhematrix newmat(N);
for(long i=0; i<N; i++){
for(long j=0; j<=i; j++){
newmat(i,j) =std::complex<double>((*this)(i,j),0.0);
}
}
return _(newmat);
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//============================================================================
/*! convert to _dgematrix */
inline _dgematrix dsymatrix::to_dgematrix() const
{
#ifdef CPPL_VERBOSE
std::cerr << "# [MARK] dsymatrix::to_dgematrix() const" << std::endl;
#endif//CPPL_VERBOSE
dgematrix newmat(N,N);
for(long i=0; i<N; i++){
for(long j=0; j<N; j++){
newmat(i,j) =(*this)(i,j);
}
}
return _(newmat);
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//============================================================================
/*! convert to _dssmatrix */
inline _dssmatrix dsymatrix::to_dssmatrix(const double eps) const
{
#ifdef CPPL_VERBOSE
std::cerr << "# [MARK] dsymatrix::to_dssmatrix() const" << std::endl;
#endif//CPPL_VERBOSE
dssmatrix newmat(N);
for(long i=0; i<N; i++){
for(long j=0; j<=i; j++){
if( fabs((*this)(i,j))>eps ){ newmat(i,j) =(*this)(i,j); }
}
}
return _(newmat);
}