00001 #include "BeliefTreeNode.h" 00002 00003 BeliefTreeNode::BeliefTreeNode(void) 00004 { 00005 s = NULL; 00006 } 00007 00008 BeliefTreeNode::~BeliefTreeNode(void) 00009 { 00010 } 00011 void BeliefTreeNode::print() 00012 { 00013 cout << "BeliefTreeNode:" << endl; 00014 cout << "CacheIndex row sval " << cacheIndex.row << " " << cacheIndex.sval << endl; 00015 cout << "s beleif "; 00016 s->bvec->write(cout) << endl; 00017 cout << " sval " << s->sval << endl; 00018 00019 for(vector<BeliefTreeQEntry>::iterator iter1 = Q.begin() ; iter1 != Q.end() ; iter1 ++) 00020 { 00021 BeliefTreeQEntry& entry= *iter1; 00022 for(vector<BeliefTreeObsState*>::iterator iter2 = entry.stateOutcomes.begin() ; iter2 != entry.stateOutcomes.end() ; iter2 ++) 00023 { 00024 BeliefTreeObsState* obsState = *iter2; 00025 if( obsState == NULL) 00026 { 00027 continue; 00028 } 00029 00030 for(vector<BeliefTreeEdge*>::iterator iter3 = obsState->outcomes.begin() ; iter3 != obsState->outcomes.end() ; iter3 ++) 00031 { 00032 BeliefTreeEdge* edge = *iter3; 00033 if(edge!= NULL) 00034 { 00035 edge->nextState->print(); 00036 } 00037 } 00038 00039 } 00040 } 00041 } 00042 00043 00044 00045 BeliefTreeEdge::BeliefTreeEdge() 00046 { 00047 nextState = NULL; 00048 } 00049 BeliefTreeEdge::~BeliefTreeEdge() 00050 { 00051 00052 }