# set.cpp File Reference

`#include "set.h"`
`#include <bdd.h>`

## Functions
bdd | setUnion (bdd s1, bdd s2)
bdd | setIntersection (bdd s1, bdd s2)
bdd | setXOR (bdd s1, bdd s2)
bool | setIsMember (bdd feature, bdd family)
bdd | setComplement (bdd family)
void | setInsert (bdd feature, bdd &family)
void | setRemove (bdd feature, bdd &family)
bool | setIsEmpty (bdd family)
void | setEnumerate (bdd family)

## Function Documentation

bdd setComplement | ( | bdd | family | ) |

This function returns the complement set of a given set.

void setEnumerate | ( | bdd | family | ) |

This function displays the contaent of a given set, family in this format: e.g.: {1,3,9}, where 1,3,9 are the elements in the set.

void setInsert | ( | bdd | feature,
|  | bdd & | family |
| ) |  |  |

Given an element, feature, this function inserts it into a set, family.

bdd setIntersection | ( | bdd | s1,
|  | bdd | s2 |
| ) |  |  |

This funtions the set intersection between two sets. The returned set contains the elements that are shared in the original sets.

bool setIsEmpty | ( | bdd | family | ) |

This function checks if a given set, family, is empty. If so, it returns true and false otherwise.

bool setIsMember | ( | bdd | feature,
|  | bdd | family |
| ) |  |  |

This function checks if an element is is a member in a set. It returns true of false.

void setRemove | ( | bdd | feature,
|  | bdd & | family |
| ) |  |  |

Given an element, feature, this function removes it from a given set, family.

bdd setUnion | ( | bdd | s1,
|  | bdd | s2 |
| ) |  |  |

Set Operations Module This module contains the operations on sets. It is used when we use the set model. The operations takes place on the bdd level. Every bdd in a set model, is a set and hence these functions operate on sets (bdds). This function is the set uinon between two sets. The returned set contains both the elements of the unioned sets.

bdd setXOR | ( | bdd | s1,
|  | bdd | s2 |
| ) |  |  |

This function is the xor between two sets. The returned set contains all the elements in both the sets except the common ones.