NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ clear()

template<typename T >
void cntr::herm_matrix< T >::clear ( void  )

Sets all values to zero.

Purpose

Sets all values of all components to zero.

Definition at line 437 of file cntr_herm_matrix_impl.hpp.

437  {
438  if (size1_ == 0)
439  return;
440  memset(mat_, 0, sizeof(cplx) * (ntau_ + 1) * element_size_);
441  if (nt_ >= 0) {
442  memset(les_, 0,
443  sizeof(cplx) * ((nt_ + 1) * (nt_ + 2)) / 2 * element_size_);
444  memset(ret_, 0,
445  sizeof(cplx) * ((nt_ + 1) * (nt_ + 2)) / 2 * element_size_);
446  memset(tv_, 0,
447  sizeof(cplx) * (nt_ + 1) * (ntau_ + 1) * element_size_);
448  }
449 }
std::complex< T > cplx