omniscient-saliency-map.C
00001
00002
00003 void State::State(Matrix& m){
00004 matrix = &m;
00005 }
00006
00007 void State::~State(){
00008 for( int i = 0 ; i < actionsList->size() ; i++){
00009 delete (*actionsList)[i] ;
00010 }
00011 delete actionsList;
00012 }
00013
00014 std::vector<Action*>* State::getActionsList(){
00015 if (actions == 0 ) actionsList = findTheActions(*matrix);
00016 return actionsList ;
00017 }
00018
00019 Matrix* State::getMatrix(){
00020 return matrix ;
00021 }
00022
00023
00024 void Action::Action( Cell& cell1, Cell& cell2){
00025 c1 = &cell1 ;
00026 c2 = &cell2 ;
00027 }
00028
00029
00030
00031 void Action::~Action(){
00032 if(c1!=0){
00033 delete c1 ;
00034 delete c2 ;
00035 }
00036 }
00037
00038
00039 std::vector<Action*>* findTheActions(Matrix& m){
00040
00041 }
00042
00043
00044
00045