NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ smul() [2/2]

template<typename T >
void cntr::herm_matrix< T >::smul ( int  tstp,
cplx  weight 
)

Multiplies all component of the herm_matrix with a complex scalar.

Purpose

Multiplies all component of the herm_matrix at a given time step tstp with a complex scalar weight.

Parameters
tstp

[int] The time step at which the contour object is weighted with a factor.

weight

[T] The weight.

Definition at line 3387 of file cntr_herm_matrix_impl.hpp.

3387  {
3388  int m;
3389  cplx *x0;
3390  assert(tstp >= -1 && tstp <= nt_ && "tstp >= -1 && tstp <= nt_");
3391  if (tstp == -1) {
3392  x0 = matptr(0);
3393  for (m = 0; m <= ntau_; m++) {
3394  element_smul<T, LARGESIZE>(size1_, x0 + m * element_size_,
3395  weight);
3396  }
3397  } else {
3398  x0 = retptr(tstp, 0);
3399  for (m = 0; m <= tstp; m++) {
3400  element_smul<T, LARGESIZE>(size1_, x0 + m * element_size_,
3401  weight);
3402  }
3403  x0 = tvptr(tstp, 0);
3404  for (m = 0; m <= ntau_; m++) {
3405  element_smul<T, LARGESIZE>(size1_, x0 + m * element_size_,
3406  weight);
3407  }
3408  x0 = lesptr(0, tstp);
3409  for (m = 0; m <= tstp; m++) {
3410  element_smul<T, LARGESIZE>(size1_, x0 + m * element_size_,
3411  weight);
3412  }
3413  }
3414 }
std::complex< T > cplx