NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ resize()

template<typename T >
void cntr::function< T >::resize ( int  nt,
int  size1 
)

Resize the time length and/or matrix dimension of a square-matrix function

Purpose

Resize the time length and/or matrix dimension of a square-matrix function

Parameters
nt

the new number of time-steps.

size1

the new leading dimension of the matrix

Definition at line 255 of file cntr_function_impl.hpp.

255  {
256  int len = (nt + 2) * size1 * size1;
257  assert(nt >= -1 && size1 >= 0);
258  if (data_ != 0)
259  delete[] data_;
260  if (len == 0)
261  data_ = 0;
262  else {
263  data_ = new cplx[len];
264  }
265  size1_ = size1;
266  size2_ = size1;
267  element_size_ = size1_ * size1_;
268  nt_ = nt;
269  total_size_ = len;
270 }
int size2_
Number of the rows in the Matrix form.
int size1(void) const
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.
int nt(void) const
std::complex< T > cplx
int nt_
Maximum number of the time steps.