src/Matrix/matrix.cc
// Input		mx    : Matrix (this)
//			full  : Flag for amount of output
// Output		void  : Outputs matrix status
// Note			      : Currently there is no matrix
//				type for unitary so this is 
//				tested independently
Input          mx    : Matrix (this)
full  : Flag for amount of output
Output         void  : Outputs matrix status
Note                         : Currently there is no matrix
type for unitary so this is
tested independently
Input mx : Matrix ( this ) full : Flag for amount of output Output void : Outputs matrix status Note : Currently there is no matrix type for unitary so this is tested independently
void matrix::status(int full) const
  {
  if(i_matrix_type == stored_type())		
    std::cout << "\n\tIdentity matrix";
  else if(d_matrix_type == stored_type())
    std::cout << "\n\tDiagonal matrix";
  else if(n_matrix_type == stored_type())
    std::cout << "\n\tNormal matrix";
  else if(h_matrix_type == stored_type())
    std::cout << "\n\tHermitian matrix";
  else
    std::cout << "\n\tUnknown or Null matrix type";
  std::cout << ", " << refs() << " Reference";	
  if(refs() > 1) std::cout << "s";
  double ecutoff=1.e-5;
  if(full)
    {
    int mxcnt=0, mxtypes[5]={0,0,0,0,0};
    if(i_matrix_type != stored_type() &&
                          i_matrix_type == test_type(i_matrix_type))
      {
      mxtypes[0] = 1;
      mxcnt++;
      }
    if(d_matrix_type != stored_type() &&
                          d_matrix_type == test_type(d_matrix_type, ecutoff))
      {
      mxtypes[1] = 1;
      mxcnt++;
      }
    if(h_matrix_type != stored_type() &&
                          h_matrix_type == test_type(h_matrix_type, ecutoff))
      {
      mxtypes[2] = 1;
      mxcnt++;
      }
    if(n_matrix_type != stored_type() &&
                          n_matrix_type == test_type(n_matrix_type, ecutoff))
      {
      mxtypes[3] = 1;
      mxcnt++;
      }
    if(is_unitary())
      {
      mxtypes[4] = 1;
      mxcnt++;
      }
    std::cout << "\n\tOther Possible Storage Type"; 		
    if(!mxcnt) std::cout << "s: None";
    else
      {
      if(mxcnt > 1) std::cout << "s: ";
      else          std::cout << ": ";
      mxcnt = 0;
      if(mxtypes[0])
        {
        std::cout << "Identity";
        mxcnt++;
        }
      if(mxtypes[1])
        {
        if(mxcnt) std::cout << ", ";
        std::cout << "Diagonal";
        mxcnt++;
        }
      if(mxtypes[2])
        {
        if(mxcnt) std::cout << ", ";
        std::cout << "Hermitian";
        mxcnt++;
        }
      if(mxtypes[3])
        {
        if(mxcnt) std::cout << ", ";
        std::cout << "Normal";
        mxcnt++;
        }
      if(mxtypes[4])
        {
        if(mxcnt) std::cout << ", ";
        std::cout << "Unitary";
        }
      }
    }
  std::cout << "\n";
  return;
  }
void matrix :: status ( int full ) const { if ( i_matrix_type == stored_type ( ) ) std :: cout << " \n \t " ; else if ( d_matrix_type == stored_type ( ) ) std :: cout << " \n \t " ; else if ( n_matrix_type == stored_type ( ) ) std :: cout << " \n \t " ; else if ( h_matrix_type == stored_type ( ) ) std :: cout << " \n \t " ; else std :: cout << " \n \t " ; std :: cout << " " << refs ( ) << " " ; if ( refs ( ) > 1 ) std :: cout << " " ; double ecutoff = 1.e-5 ; if ( full ) { int mxcnt = 0 , mxtypes [ 5 ] = { 0 , 0 , 0 , 0 , 0 } ; if ( i_matrix_type != stored_type ( ) && i_matrix_type == test_type ( i_matrix_type ) ) { mxtypes [ 0 ] = 1 ; mxcnt ++ ; } if ( d_matrix_type != stored_type ( ) && d_matrix_type == test_type ( d_matrix_type , ecutoff ) ) { mxtypes [ 1 ] = 1 ; mxcnt ++ ; } if ( h_matrix_type != stored_type ( ) && h_matrix_type == test_type ( h_matrix_type , ecutoff ) ) { mxtypes [ 2 ] = 1 ; mxcnt ++ ; } if ( n_matrix_type != stored_type ( ) && n_matrix_type == test_type ( n_matrix_type , ecutoff ) ) { mxtypes [ 3 ] = 1 ; mxcnt ++ ; } if ( is_unitary ( ) ) { mxtypes [ 4 ] = 1 ; mxcnt ++ ; } std :: cout << " \n \t " ; if ( ! mxcnt ) std :: cout << " " ; else { if ( mxcnt > 1 ) std :: cout << " " ; else std :: cout << " " ; mxcnt = 0 ; if ( mxtypes [ 0 ] ) { std :: cout << " " ; mxcnt ++ ; } if ( mxtypes [ 1 ] ) { if ( mxcnt ) std :: cout << " " ; std :: cout << " " ; mxcnt ++ ; } if ( mxtypes [ 2 ] ) { if ( mxcnt ) std :: cout << " " ; std :: cout << " " ; mxcnt ++ ; } if ( mxtypes [ 3 ] ) { if ( mxcnt ) std :: cout << " " ; std :: cout << " " ; mxcnt ++ ; } if ( mxtypes [ 4 ] ) { if ( mxcnt ) std :: cout << " " ; std :: cout << " " ; } } } std :: cout << " \n " ; return ; }
Input          mx    : Matrix (this)
full  : Flag for amount of output
Output         void  : Outputs matrix status
Note                         : Currently there is no matrix
type for unitary so this is
tested independently
Input mx : Matrix ( this ) full : Flag for amount of output Output void : Outputs matrix status Note : Currently there is no matrix type for unitary so this is tested independently
// Output stored matrix type // Number of references // Output possible types