NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ function() [4/5]

template<typename T >
cntr::function< T >::function ( const function< T > &  g)

Initializes the function class from an existing function object

Purpose

Initializes the function class from an existing function object. It copies all data from the existing function object.

Parameters
g

the function object one wants to copy

Definition at line 113 of file cntr_function_impl.hpp.

113  {
114  int len;
115  nt_ = g.nt_;
116  size1_ = g.size1_;
117  size2_ = g.size2_;
118  element_size_ = size1_ * size2_;
119  len = (nt_ + 2) * size1_ * size2_;
120  if (len > 0) {
121  total_size_ = len;
122  data_ = new cplx[len];
123  memcpy(data_, g.data_, sizeof(cplx) * len);
124  } else {
125  data_ = 0;
126  }
127 }
int size2_
Number of the rows in the Matrix form.
int total_size_
Size of the data stored for the function on the real-time axis including ; * size1 * size2 ...
cplx * data_
Pointer to the function in the Matrix form on the real-time axis ( ) ; &#39;data_+ element_size&#39; corresp...
int size1_
Number of the colums in the Matrix form.
std::complex< T > cplx
int nt_
Maximum number of the time steps.