# bag.h File Reference

`#include <bdd.h>`

Go to the source code of this file.

## Functions
double | getOcc (bdd feature, bdd family)
bdd | setOcc (int feature, int occ, bdd &family)
bdd | bagUnion (bdd b1, bdd b2)
bdd | bagIntersection (bdd b1, bdd b2)

## Function Documentation

bdd bagIntersection | ( | bdd | b1,
|  | bdd | b2 |
| ) |  |  |

This function returns the bag intersection between two given bags b1,b2. The the result will contain the elements that the given original bags contain.

bdd bagUnion | ( | bdd | b1,
|  | bdd | b2 |
| ) |  |  |

This functions unions two bags, b1 and b2, and returns the resultant bag containing the elements in the original two bags.

double getOcc | ( | bdd | feature,
|  | bdd | family |
| ) |  |  |

Given an element, and a bag, this function get the number of occurances of that element in the bag.

bdd setOcc | ( | int | feature,
|  | int | occ,
|  | bdd & | family |
| ) |  |  |

Given an element number, the number of occurances and a bag, family, this funciton sets the number of occurances of the element in the family. The function returns a bag(bdd) with the occurance changed.