MultiAgentDecisionProcess  Release 0.2.1
TransitionModelMappingSparse.cpp
Go to the documentation of this file.
1 
29 
30 using namespace std;
31 
33  TransitionModelDiscrete(nrS, nrJA)
34 {
35  SparseMatrix *T;
36  for(int a=0;a!=nrJA;++a)
37  {
38  T=new SparseMatrix(nrS,nrS);
39  _m_T.push_back(T);
40  }
41 }
42 
46 {
47  SparseMatrix *T;
48  for(unsigned int a=0;a!=TM._m_T.size();++a)
49  {
50  T=new SparseMatrix(*TM._m_T[a]);
51  _m_T.push_back(T);
52  }
53 }
54 
56 {
57  for(vector<SparseMatrix*>::iterator it=_m_T.begin();
58  it!=_m_T.end(); ++it)
59  delete(*it);
60  _m_T.clear();
61 }