NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ operator=() [1/2]

template<typename T >
herm_matrix_timestep< T > & cntr::herm_matrix_timestep< T >::operator= ( const herm_matrix_timestep< T > &  g)

Definition at line 185 of file cntr_herm_matrix_timestep_impl.hpp.

185  {
186  if (this == &g)
187  return *this;
188  if (total_size_ != g.total_size_) {
189  delete[] data_;
190  total_size_ = g.total_size_;
191  if (total_size_ > 0)
192  data_ = new cplx[total_size_];
193  else
194  data_ = 0;
195  }
196  tstp_ = g.tstp_;
197  ntau_ = g.ntau_;
198  size1_ = g.size1_;
199  size2_ = g.size1_;
200  sig_ = g.sig_;
201  element_size_ = size1_ * size1_;
202  if (total_size_ > 0)
203  memcpy(data_, g.data_, sizeof(cplx) * total_size_);
204  return *this;
205 }