Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

plCndProbTable Class Reference

This class implements a Conditional Probability Table. More...

#include <plCndProbTable.h>

Inheritance diagram for plCndProbTable:

Inheritance graph
[legend]
Collaboration diagram for plCndProbTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 plCndProbTable (const plVariablesConjunction &left, const plVariablesConjunction &right)
 Constructs a Conditional Probability Table on variables {left} having {n} possible values.
 plCndProbTable (const plVariablesConjunction &left, const plVariablesConjunction &right, const plExternalFunction &fknown)
 Constructs a Conditional Probability Table on Variables {left} having {n} possible values.
virtual ~plCndProbTable ()
 Destructor.

Protected Member Functions

 plCndProbTable ()
 Default void constructor.

Detailed Description

This class implements a Conditional Probability Table.

When instantiated, this class returns a {plProbTable}.

Definition at line 42 of file plCndProbTable.h.


Constructor & Destructor Documentation

plCndProbTable::plCndProbTable const plVariablesConjunction left,
const plVariablesConjunction right
 

Constructs a Conditional Probability Table on variables {left} having {n} possible values.

The values of the probability table are fixed by those of the {n} variables {right}. example: plCndProbTable p(H | B1^B2^...^Bn); where {H} can take n values: 1, ..., n. When it is instantiated with B1 = b1, ..., Bn = bn, it constructs a probability table on P(H) with the values:

  • P([H=1]) = b1
  • P([H=2]) = b2
    .
    .
    .
  • P([H=n]) = bn

In multi-dimensional cases ({H = H1^H2}), where {H1} and {H2} can take n and m values respectively, the values {bi} for p(H1^H2 | B1^B2^...^Bn*m) are taken so that:

  • P([H1=0, H2=0]) = b1
  • P([H1=0, H2=1]) = b2
    .
    .
    .
  • P([H1=0, H2=m-1]) = bm
  • P([H1=1, H2=0]) = b(m+1)
  • P([H1=1, H2=1]) = b(m+2)
    .
    .
    .
  • P([H1=1, H2=m-1]) = b(2*m)
    .
    .
    .
  • P([H1=n-1, H2=m-1]) = b(n*m)

plCndProbTable::plCndProbTable const plVariablesConjunction left,
const plVariablesConjunction right,
const plExternalFunction fknown
 

Constructs a Conditional Probability Table on Variables {left} having {n} possible values.

The values of the probability table are fixed by calling the n-dimensional external function {fknown} on the the values of the {m} variables {right}. example: plCndProbTable p(H | X1^X2^...^Xm, fknown); where H can take n values: 0, 1, ..., n-1. When it is instantiated with X1 = x1, X2 = x2, ...., Xm = xm, it constructs the probability table on P(H) with the values:

  • P([H=0]) = fknown(x1, x2, ..., xm)[0]
  • P([H=1]) = fknown(x1, x2, ..., xm)[1]
    .
    .
    .
  • P([H=n-1]) = fknown(x1, x2, ..., xm)[n-1]

In multi-dimensional cases ({H = H1^H2}), where {H1} and {H2} can take n1 and n2 values respectively, it constructs the probability table on P(H) with the values:

  • P([H1=0, H2=0]) = fknown(x1, x2, ..., xm)[0]
  • P([H1=0, H2=1]) = fknown(x1, x2, ..., xm)[1]
    .
    .
    .
  • P([H1=0, H2=n2-1]) = fknown(x1, x2, ..., xm)[n2-1]

  • P([H1=1, H2=0]) = fknown(x1, x2, ..., xm)[n2])
  • P([H1=1, H2=1]) = fknown(x1, x2, ..., xm)[n2+1]
    .
    .
    .
  • P([H1=1, H2=n2-1]) = fknown(x1, x2, ..., xm)[2*n2-1]
    .
    .
    .
  • P([H1=n1-1, H2=n2-1]) = fknown(x1, x2, ..., xm)[n1*n2-1)]


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 10:58:38 2005 for ProBT by  doxygen 1.4.1