MultiAgentDecisionProcess  Release 0.2.1
ObservationModelMappingSparse.cpp
Go to the documentation of this file.
1 
29 
30 using namespace std;
31 
33  int nrJA,
34  int nrJO) :
35  ObservationModelDiscrete(nrS, nrJA, nrJO)
36 {
37  SparseMatrix *O;
38  for(int a=0;a!=nrJA;++a)
39  {
40  O=new SparseMatrix(nrS,nrJO);
41  _m_O.push_back(O);
42  }
43 }
44 
48 {
49  SparseMatrix *O;
50  for(unsigned int a=0;a!=OM._m_O.size();++a)
51  {
52  O=new SparseMatrix(*OM._m_O[a]);
53  _m_O.push_back(O);
54  }
55 }
56 
58 {
59  for(vector<SparseMatrix*>::iterator it=_m_O.begin();
60  it!=_m_O.end(); ++it)
61  delete(*it);
62  _m_O.clear();
63 }