#include <Distribution.h>
Inheritance diagram for prapi::Distribution:

Public Methods | |
| Distribution (int length) | |
| Create a one-dimensional distribution. | |
| Distribution (const List< int > &dimensions) | |
| Create a new multi-dimensional distribution. | |
| Distribution (const Distribution &other) | |
| Create a copy of other. | |
| Distribution & | operator= (const Distribution &other) |
| Set this distribution to be equal to other. | |
| void | normalize (void) |
| Normalize the distribution by dividing each element by the sum of all elements. | |
| void | setElementAt (const List< int > &coordinates, double value) |
| Set the value of a distribution entry. | |
| double | getElementAt (const List< int > &coordinates) const |
| Get the value of a distribution entry. | |
| double & | elementAt (const List< int > &coordinates) |
| Get the value of a distribution entry. | |
| Distribution | getMarginalDistribution (int dimension) const |
| Calculate a marginal distribution by "flattening", i.e. | |
| template<class T> void | addDistribution (const List< T > &lst) throw (InvalidArgumentException&) |
| Add the corresponding entries in lst to this distribution. | |
| template<class T> void | subtractDistribution (const List< T > &lst) throw (InvalidArgumentException&) |
| Remove the corresponding entries in lst from this distribution. | |
| template<class T> void | operator+= (const List< T > &other) |
| Add the corresponding entries in other to this distribution. | |
| template<class T> void | operator-= (const List< T > &other) |
| Remove the corresponding entries in other from this distribution. | |
Friends | |
| Distribution | operator * (const Distribution &dist, double value) |
| Multiply all values in the distribution by a constant value. | |
| Distribution | operator/ (const Distribution &dist, double value) |
| Divide all values in the distribution by a constant value. | |
| template<class T> Distribution & | operator+ (Distribution &dist, List< T > &other) |
| Sum two distributions together. | |
| template<class T> Distribution & | operator- (Distribution &dist, List< T > &other) |
| Subtract two distributions from each other. | |
|
|
Create a one-dimensional distribution.
|
|
|
Create a new multi-dimensional distribution.
|
|
|
Get the value of a distribution entry.
|
|
|
Get the value of a distribution entry.
|
|
|
Calculate a marginal distribution by "flattening", i.e. integrating over the given dimension.
|
|
||||||||||
|
Add the corresponding entries in other to this distribution. Note: in List, this operator concatenates two Lists. |
|
||||||||||
|
Remove the corresponding entries in other from this distribution. Note: in List, this operator removes entries from the target list. |
|
||||||||||||
|
Set the value of a distribution entry.
|
|
||||||||||||||||
|
Sum two distributions together.
|
|
||||||||||||||||
|
Subtract two distributions from each other.
|