Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 060f073d authored by hhakim's avatar hhakim
Browse files

Change display function for a Faust.

Especially, it replaces the RCG by the density.
parent 10720cb9
Branches
Tags
No related merge requests found
......@@ -503,7 +503,8 @@ std::string Faust::MatDense<FPP,Cpu>::to_string(const bool transpose /* set to f
//using ostringstream because it's easier for concatenation (of complex and any number)
std::ostringstream str;
str<<" type : DENSE";
str << " (" << (typeid(*getData()) == typeid(complex<double>) || typeid(*getData()) == typeid(complex<float>)?"complex":"real") << ")";
str<<" DENSE,";
str << Faust::MatGeneric<FPP,Cpu>::to_string(transpose);
if(isZeros)
str <<"zeros matrix flag" << endl;
......
......@@ -330,7 +330,8 @@ template<typename FPP>
std::string Faust::MatSparse<FPP,Cpu>::to_string(const bool transpose /* set to false by default */) const
{
std::ostringstream str;
str<<" type : SPARSE";
str << " (" << (typeid(*getValuePtr()) == typeid(complex<double>) || typeid(*getValuePtr()) == typeid(complex<float>)?"complex":"real") << ")";
str<<" SPARSE,";
str << Faust::MatGeneric<FPP,Cpu>::to_string(transpose);
if (this->dim1*this->dim2 < 100)
{
......
......@@ -905,12 +905,12 @@ std::string Faust::Transform<FPP,Cpu>::to_string(const bool transpose /* default
str<<"empty Faust"<<std::endl;
else
{
str<<"Faust of size : ";
str<<"Faust size ";
if(transpose)
str << this->getNbCol() << "x" << this->getNbRow();
else
str << this->getNbRow()<<"x"<<this->getNbCol();
str <<", nb factor "<<size()<<", RCG "<<getRCG()<< ",nnz "<<this->get_total_nnz()<<std::endl;
str <<", density "<<1.0/getRCG()<< ", nnz_sum "<<this->get_total_nnz() << ", " << size() << " factors: "<< std::endl;
int j;
for (int i=0 ; i<size() ; i++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment