OTB
9.0.0
Orfeo Toolbox
|
#include <otbMassOfBelief.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef std::set< LabelSetType > | LabelSetOfSetType |
typedef std::set< LabelType > | LabelSetType |
typedef TLabel | LabelType |
typedef std::map< LabelSetType, MassType > | MassMapType |
typedef TMass | MassType |
typedef itk::SmartPointer< Self > | Pointer |
typedef MassOfBelief | Self |
typedef itk::DataObject | Superclass |
Public Member Functions | |
void | Clear () |
void | Copy (const Self *massOfBelief) |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
void | EstimateUncertainty () |
MassType | GetBelief (const LabelSetOfSetType &containedLabelSet) const |
MassType | GetBelief (const LabelSetType &labelSet) const |
MassType | GetMass (const LabelSetType &labelSet) const |
virtual const char * | GetNameOfClass () const |
MassType | GetPlausibility (const LabelSetOfSetType &intersectedLabelSet) const |
MassType | GetPlausibility (const LabelSetType &labelSet) const |
LabelSetOfSetType | GetSupport () const |
LabelSetType | GetUniverse () const |
void | InitializePowerSetMasses (const LabelSetType &universe) |
bool | IsEmpty () const |
void | Normalize () |
void | RemoveMass (const LabelSetType &labelSet) |
void | SetMass (const LabelSetType &labelSet, const MassType &mass) |
Static Public Member Functions | |
static Pointer | New () |
static std::ostream & | PrintLabelSet (std::ostream &out, const LabelSetType &labelSet) |
static std::ostream & | PrintLabelSetOfSet (std::ostream &out, const LabelSetOfSetType &labelSet) |
Protected Member Functions | |
MassOfBelief () | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
~MassOfBelief () override | |
Private Member Functions | |
MassOfBelief (const Self &)=delete | |
void | operator= (const Self &)=delete |
Private Attributes | |
MassMapType | m_MassesMap |
This class represent a mass of belief function.
This class represent a Mass of Belief function to be used in Dempster-Shafer theory.
Template parameter TLabel is the type of the elements in the universe set, while TMass is the type of the mass. TLabel can be any type implementing ordering operator, while TMass should be a floating point type.
An element of the power-set is represented by the sub-type LabelSetType, which is a std::set<TLabel>.
A mass can be associated with a given element from the power set by calling the SetMass method. It is not necessary to associate masses with each element of the power set: mass is supposed to be null otherwise declared.
A mass associated with an element from the power-set can be removed using the RemoveMass method, and all masses can be cleared using the Clear() function.
The mass associated with a given element from the power-set can be retrieved using the GetMass method. If no mass has been associated with this element, null is returned.
The Normalize() method allows normalizing all masses so that they sum to 1. The EstimateUncertainty() method allows associating to the uncertain set (i.e. the universe set) a mass so that all masses sum to 1.
The GetUniverse() method allows retrieving the set of all symbols (i.e. the universal set), while the GetSupport() method allows retrieving the set of all elements of the power-set for which a mass has been associated. This method returns a LabelSetOfSetType, which is a std::set<std::set<TLabel> >.
The mass function can be optionally initialized from a given universe set by building the power-set and associating a null mass with every elements of this power-set. This allows ensuring that two mass functions will share the exact same universe and power-set, but is not mandatory, since mass is supposed to be null for any set if not stated otherwise.
Once masses are set, the GetPlausibility() and GetBelief() function allow computing the belief and plausibility for an element of the power-set, or directly for a set of elements of the power-set intersecting (resp. contained in) a given hypothesis.
Definition at line 90 of file otbMassOfBelief.h.
typedef itk::SmartPointer<const Self> otb::MassOfBelief< TLabel, TMass >::ConstPointer |
Definition at line 97 of file otbMassOfBelief.h.
typedef std::set<LabelSetType> otb::MassOfBelief< TLabel, TMass >::LabelSetOfSetType |
Definition at line 109 of file otbMassOfBelief.h.
typedef std::set<LabelType> otb::MassOfBelief< TLabel, TMass >::LabelSetType |
Definition at line 107 of file otbMassOfBelief.h.
typedef TLabel otb::MassOfBelief< TLabel, TMass >::LabelType |
Definition at line 103 of file otbMassOfBelief.h.
typedef std::map<LabelSetType, MassType> otb::MassOfBelief< TLabel, TMass >::MassMapType |
Definition at line 108 of file otbMassOfBelief.h.
typedef TMass otb::MassOfBelief< TLabel, TMass >::MassType |
Definition at line 106 of file otbMassOfBelief.h.
typedef itk::SmartPointer<Self> otb::MassOfBelief< TLabel, TMass >::Pointer |
Definition at line 96 of file otbMassOfBelief.h.
typedef MassOfBelief otb::MassOfBelief< TLabel, TMass >::Self |
Standard class typedefs
Definition at line 94 of file otbMassOfBelief.h.
typedef itk::DataObject otb::MassOfBelief< TLabel, TMass >::Superclass |
Definition at line 95 of file otbMassOfBelief.h.
|
inlineprotected |
Constructor
Definition at line 178 of file otbMassOfBelief.h.
|
inlineoverrideprotected |
Destructor
Definition at line 183 of file otbMassOfBelief.h.
|
privatedelete |
void otb::MassOfBelief< TLabel, TMass >::Clear |
Clear all masses
Definition at line 173 of file otbMassOfBelief.hxx.
void otb::MassOfBelief< TLabel, TMass >::Copy | ( | const Self * | massOfBelief | ) |
Copy masses of two mass functions
Definition at line 309 of file otbMassOfBelief.hxx.
References otb::MassOfBelief< TLabel, TMass >::m_MassesMap.
virtual::itk::LightObject::Pointer otb::MassOfBelief< TLabel, TMass >::CreateAnother | ( | void | ) | const |
void otb::MassOfBelief< TLabel, TMass >::EstimateUncertainty |
Associate to uncertainty a mass such that the sum of masses equals 1
Definition at line 144 of file otbMassOfBelief.hxx.
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetBelief | ( | const LabelSetOfSetType & | containedLabelSet | ) | const |
Get the belief for an hypothesis containing a given set of elements from the power-set
Definition at line 277 of file otbMassOfBelief.hxx.
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetBelief | ( | const LabelSetType & | labelSet | ) | const |
Get the belief of a given element of the power-set
Definition at line 216 of file otbMassOfBelief.hxx.
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetMass | ( | const LabelSetType & | labelSet | ) | const |
Retrieve the mass associated with the given element of the power set
Definition at line 56 of file otbMassOfBelief.hxx.
|
virtual |
Run-time type information (and related methods).
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetPlausibility | ( | const LabelSetOfSetType & | intersectedLabelSet | ) | const |
Get the belief for an hypothesis intersecting a given set of elements from the power set.
Definition at line 293 of file otbMassOfBelief.hxx.
MassOfBelief< TLabel, TMass >::MassType otb::MassOfBelief< TLabel, TMass >::GetPlausibility | ( | const LabelSetType & | labelSet | ) | const |
Get the plausibility of a given element of the power-set
Definition at line 247 of file otbMassOfBelief.hxx.
MassOfBelief< TLabel, TMass >::LabelSetOfSetType otb::MassOfBelief< TLabel, TMass >::GetSupport |
Retrieve the support of the mass of belief (i.e. a vector of element of the power set for which the mass of belief is not null)
Definition at line 72 of file otbMassOfBelief.hxx.
MassOfBelief< TLabel, TMass >::LabelSetType otb::MassOfBelief< TLabel, TMass >::GetUniverse |
Get the set of universe symbols for this mass function
Definition at line 92 of file otbMassOfBelief.hxx.
void otb::MassOfBelief< TLabel, TMass >::InitializePowerSetMasses | ( | const LabelSetType & | universe | ) |
Initialize with all elements from the power set with null masses. Please note that this is not mandatory and only allows to ensure that two mass functions share the same universe, even if most of masses are null.
Definition at line 179 of file otbMassOfBelief.hxx.
bool otb::MassOfBelief< TLabel, TMass >::IsEmpty |
Return true if the support set is null
Definition at line 319 of file otbMassOfBelief.hxx.
|
static |
Method for creation through the object factory.
void otb::MassOfBelief< TLabel, TMass >::Normalize |
Normalize mass set sot that the sum of masses equals 1
Definition at line 119 of file otbMassOfBelief.hxx.
|
privatedelete |
|
static |
Define a Print static method for label sets Do not overload << for std::set since it causes namespace issues.
Definition at line 351 of file otbMassOfBelief.hxx.
|
static |
Define a Print static method for label sets Do not overload << for std::set since it causes namespace issues.
Definition at line 376 of file otbMassOfBelief.hxx.
|
overrideprotected |
PrintSelf method
Definition at line 325 of file otbMassOfBelief.hxx.
void otb::MassOfBelief< TLabel, TMass >::RemoveMass | ( | const LabelSetType & | labelSet | ) |
Remove mass from the support
Definition at line 45 of file otbMassOfBelief.hxx.
void otb::MassOfBelief< TLabel, TMass >::SetMass | ( | const LabelSetType & | labelSet, |
const MassType & | mass | ||
) |
Register a mass associated with an element of the power-set
Definition at line 35 of file otbMassOfBelief.hxx.
|
private |
The masses map
Definition at line 195 of file otbMassOfBelief.h.
Referenced by otb::MassOfBelief< TLabel, TMass >::Copy().