$search
00001 /* 00002 * EvidenceSet.cpp 00003 * 00004 * Created on: May 24, 2012 00005 * Author: sdries 00006 */ 00007 00008 #include "wire/core/EvidenceSet.h" 00009 #include "wire/core/Evidence.h" 00010 00011 namespace mhf { 00012 00013 EvidenceSet::EvidenceSet() : timestamp_(-1) { 00014 } 00015 00016 EvidenceSet::~EvidenceSet() { 00017 } 00018 00019 00020 void EvidenceSet::add(Evidence* ev) { 00021 evidence_.push_back(ev); 00022 00023 // all evidence added to the evidence set should have same timestamp 00024 assert(timestamp_ < 0 || fabs(ev->getTimestamp() - timestamp_) < 1e-10); 00025 00026 timestamp_ = ev->getTimestamp(); 00027 } 00028 00029 unsigned int EvidenceSet::size() const { 00030 return evidence_.size(); 00031 } 00032 00033 const Time& EvidenceSet::getTimestamp() const { 00034 return timestamp_; 00035 } 00036 00037 std::vector<Evidence*>::const_iterator EvidenceSet::begin() const { 00038 return evidence_.begin(); 00039 } 00040 00041 std::vector<Evidence*>::const_iterator EvidenceSet::end() const { 00042 return evidence_.end(); 00043 } 00044 00045 }