00001 /************************************************************************ 00002 * Copyright (C) 2012 Eindhoven University of Technology (TU/e). * 00003 * All rights reserved. * 00004 ************************************************************************ 00005 * Redistribution and use in source and binary forms, with or without * 00006 * modification, are permitted provided that the following conditions * 00007 * are met: * 00008 * * 00009 * 1. Redistributions of source code must retain the above * 00010 * copyright notice, this list of conditions and the following * 00011 * disclaimer. * 00012 * * 00013 * 2. Redistributions in binary form must reproduce the above * 00014 * copyright notice, this list of conditions and the following * 00015 * disclaimer in the documentation and/or other materials * 00016 * provided with the distribution. * 00017 * * 00018 * THIS SOFTWARE IS PROVIDED BY TU/e "AS IS" AND ANY EXPRESS OR * 00019 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * 00020 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * 00021 * ARE DISCLAIMED. IN NO EVENT SHALL TU/e OR CONTRIBUTORS BE LIABLE * 00022 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * 00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * 00024 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * 00025 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * 00026 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * 00027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * 00028 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * 00029 * DAMAGE. * 00030 * * 00031 * The views and conclusions contained in the software and * 00032 * documentation are those of the authors and should not be * 00033 * interpreted as representing official policies, either expressed or * 00034 * implied, of TU/e. * 00035 ************************************************************************/ 00036 00037 #ifndef PROPERTY_H_ 00038 #define PROPERTY_H_ 00039 00040 #include "wire/core/datatypes.h" 00041 #include "problib/pdfs/PDF.h" 00042 00043 #include <string> 00044 00045 namespace mhf { 00046 00047 class IStateEstimator; 00048 00049 class Property { 00050 00051 public: 00052 00053 Property(const Attribute& attribute, const IStateEstimator& bm, const ObjectID& object_id = -1); 00054 00055 Property(const Property& orig); 00056 00057 virtual ~Property(); 00058 00059 Property* clone() const; 00060 00061 Property& operator=(const Property& other); 00062 00063 const Attribute& getAttribute() const; 00064 00065 const IStateEstimator& getEstimator() const; 00066 00067 const pbl::PDF& getValue() const; 00068 00069 //void setObjectID(const ObjectID& id); 00070 00071 const ObjectID& getObjectID() const; 00072 00073 void update(const pbl::PDF& z, const Time& time); 00074 00075 void propagate(const Time& time); 00076 00077 void reset(); 00078 00079 virtual double getLikelihood(const pbl::PDF& pdf) const; 00080 00081 std::string toString(const std::string& prefix = "") const; 00082 00083 protected: 00084 00085 Time time_; 00086 00087 //ObjectID object_id_; 00088 00089 Attribute attribute_; 00090 00091 IStateEstimator* estimator_; 00092 00093 }; 00094 00095 } 00096 00097 #endif /* PREDICATE_H_ */