NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ set_matrixelement() [2/2]

template<typename T >
void cntr::function< T >::set_matrixelement ( int  i1,
int  i2,
function< T > &  g,
int  j1,
int  j2 
)

Set a matrix element from a function object

Purpose

Set a matrix element from a function object at all time steps. The function should have the same size as the original function.

Parameters
i1

the first index of the matrix element to be set

i2

the second index of the matrix element to be set

g

the function object used to set the elements.

j1

the first index of the matrix element used to set

j2

the second index of the matrix element used to set

Definition at line 685 of file cntr_function_impl.hpp.

685  {
686  assert(0<=i1 && i1<size1_ && 0<=i2 && i2<size2_);
687  assert(0<=j1 && j1<g.size1() && 0<=j2 && j2<g.size2());
688 
689  for(int tstp=-1;tstp<=nt_;tstp++){
690  cdmatrix M;
691  g.get_value(tstp,M);
692  set_matrixelement(tstp,i1,i2,M,j1,j2);
693  }
694 
695 }
int size2_
Number of the rows in the Matrix form.
int size1_
Number of the colums in the Matrix form.
void set_matrixelement(int tstp, int i1, int i2, EigenMatrix &M, int j1, int j2)
Set a matrix element from an Eigen matrix
int nt_
Maximum number of the time steps.