CProbabilisticSet Class

# CProbabilisticSet Class Reference

[CADIHash.h Index] [CADIHash.h Hierarchy]

More...

`#include <../libBayesian/include/CProbabilisticSet.h>`

## Public Members

- CProbabilisticSet (LCCutoffFunction* inInformationCutoff=0, LCCutoffFunction* inSetCutoff=0, CProbabilityCombiner* inIntersectStrategy=0, CProbabilityCombiner* inUniteStrategy=0, CInformationCalculator* inInformationCalculator=0, CDrawer* inDrawStrategy=0)
- CProbabilisticSet (const CProbabilisticSet<T>& inSet, bool inWithContent=true)
- CProbabilisticSet<T>* cloneWithoutContent ()
- CProbabilisticSet<T>* clone ()
- ~CProbabilisticSet ()
- void unite (CProbabilisticSet& inSet)
- double intersect (CProbabilisticSet& inSet)
- double probabilityThatMember (const T& inElement)
- void addElement (const T&, double inProbability=1.0, double inWeight=1.0)
- void addElement (CProbabilisticSetElement<T> const&)
- void sortIfUnsorted ()
- void removeDoubles ()
- void setUniteStrategy (CProbabilityCombiner const*)
- void setIntersectStrategy (CProbabilityCombiner const*)
- void setInformationCalculator (CInformationCalculator const*)
- void setDrawStrategy (CDrawer const*)
- void setValidInterval (double inLowerCutoff, double inUpperCutoff)
- double calculateInformation ()
- CContentElement const& draw ()
- CProbabilisticSet<T>* drawSet (long inWantedSize)
- CProbabilisticSet<T>* getTopNSet (long inN)
- CSequence* drawSequence (long inWantedSize)
- CSequence* getTopNSequence (long inN)
- double getProbabilityMax ()
- int countAboveThreshold ()
- double getProbabilitySum ()
- void multiplyProbabilities (double inMultiplier)
- double normalize ()
- long size ()
- ostream& output (ostream&)
- void getContent (CElementVector& outVector)
- CProbabilisticSet<T>& operator= (const T& inT)
- CProbabilisticSet<T>& operator= (const pair<T,double>& inT)
- CProbabilisticSet<T>& operator++ ()
- void clear ()

## Protected Members

- void prepareDraw ()

## CProbabilisticSet(LCCutoffFunction* inInformationCutoff=0, LCCutoffFunction* inSetCutoff=0, CProbabilityCombiner.html">CProbabilityCombiner* inIntersectStrategy=0, CProbabilityCombiner.html">CProbabilityCombiner* inUniteStrategy=0, CInformationCalculator* inInformationCalculator=0, CDrawer* inDrawStrategy=0)

Giving parameters to this constructor, one obtains strategies, which will NOT be clonedwhen this set is cloned with or without content. If one uses the defaults, new strategies are generated which will be cloned, if this is cloned or copied. Actually the former will be the normal case: We are rather interested in having strategies which we can access and modify from the outside of this,

## void unite(CProbabilisticSet& inSet)

unite two probabilistic sets

## double intersect(CProbabilisticSet& inSet)

intersect two probabilistic sets.the return value is the normalizing factor which has to be applied after intersection

## double probabilityThatMember(const T& inElement)

Is inElement a member?

## void addElement(const T&, double inProbability=1.0, double inWeight=1.0)

add an Element to the set

## void addElement(CProbabilisticSetElement<T> const&)

add an Element to the set

## void sortIfUnsorted()

sorts this if it is unsorted;

## void removeDoubles()

sorts this if it is unsorted;

## void setDrawStrategy(CDrawer const*)

uniform etc.

## double calculateInformation()

Calculates the entropy (or something similar) of the distribution

## CContentElement const& draw()

draws a ContentElement from the

## CProbabilisticSet<T>* drawSet(long inWantedSize)

draws a (unique!) set from this set

## CSequence* drawSequence(long inWantedSize)

draws a (unique!) set from this set

## double getProbabilityMax()

gets the current sum of probabilities in this set

## int countAboveThreshold()

gets the current sum of probabilities in this set

## double getProbabilitySum()

gets the current sum of probabilities in this set

## void multiplyProbabilities(double inMultiplier)

a helper function for normalizing

## double normalize()

Normalizes the distribution

## CProbabilisticSet<T>& operator=(const T& inT)

this makes CProbabilisticSet its own input iterator

## CProbabilisticSet<T>& operator=(const pair<T,double>& inT)

this makes CProbabilisticSet its own input iterator

## CProbabilisticSet<T>& operator++()

this makes CProbabilisticSet its own input iterator

## void clear()

gives it a uniform way of being deleted

| Kdoc