NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ left_multiply() [1/2]

template<typename T >
void cntr::function< T >::left_multiply ( cplx f,
weight = 1.0 
)

Multiply function values with a matrix-valued function from the left

Purpose

Multiply the function with another matrix-valued function from the left time-pointwisely. The shape of the other matrix-valued function must be the same as the original function.

Parameters
f

the array storing the matrix-valued function.

weight

the factor that function values are multiplied with in addition to the matrix.

Definition at line 464 of file cntr_function_impl.hpp.

465 {
466  cplx *mytemp, *xtemp, *ftemp;
467  xtemp = new cplx[element_size_];
468  for (int tstp = -1; tstp <= nt_; tstp++) {
469  ftemp = f + (tstp + 1) * element_size_;
470  mytemp = ptr(tstp);
471  element_mult<T, LARGESIZE>(size1_, xtemp,
472  ftemp, mytemp);
473  element_smul<T, LARGESIZE>(size1_, xtemp, weight);
474  element_set<T, LARGESIZE>(size1_, mytemp, xtemp);
475  }
476  delete[] xtemp;
477 }
int size1_
Number of the colums in the Matrix form.
std::complex< T > cplx
int nt_
Maximum number of the time steps.