ba

Declared In:
See Also:

https://en.wikipedia.org/wiki/Boolean_algebra_(structure)

Introduction

The Powerset Boolean Algebra

Discussion

Class implementing a Powerset Boolean Algebra. It uses an SCSE object as its underlying distributive lattice.



Member Functions

ba(const ba &)

Copy Constructor.

ba(std :: vector, unsigned int, bool)

Constructor.

map_e

Mapping of the extrusion function.

map_s

Mapping of the space function.

~ba

Destructor.


ba(const ba &)


Copy Constructor.

public

ba( const ba<ELEM_TYPE>& BA );
Parameters
BA

already instantiated BA.

Complexity

Constant.


ba(std :: vector, unsigned int, bool)


Constructor.

public

ba( std::vector<ELEM_TYPE> atoms, unsigned int n = 1, bool inverted = false );
Parameters
atoms

set of elements to build the powerset lattice.

n

number of space/extrusion functions.

inverted

true ⊥ = atoms, ⊤ = ∅, ⨆ = ∩, ⨅ = ∪ and false ⊥ = ∅, ⊤ = atoms, ⨆ = ∪, ⨅ = ∩

Discussion

This constructor will build a Powerset BA (inverted depending on the last parameter) from the set atoms with n space/extrusion functions.

Complexity

2n where n is the number of atoms.


map_e


Mapping of the extrusion function.

public

void map_e( const std::function<std::set<ELEM_TYPE>( int, std::set<ELEM_TYPE>, std::set<ELEM_TYPE>)>& e_func );
Discussion

Maps the elements of the powerset according to a user-defined extrusion function.

Complexity

2n where n is the number of atoms.

e_func

a function with three parameters; an integer representing the index of the extrusion function, a set representing the element to map and a set representing the atoms. The result is a set (the image of the element being mapped).


map_s


Mapping of the space function.

public

void map_s( const std::function<std::set<ELEM_TYPE>( int, std::set<ELEM_TYPE>, std::set<ELEM_TYPE>)>& s_func, typename scse< std::set<ELEM_TYPE> >::E_CHOICE_FUNCTION e_func = scse< std::set<ELEM_TYPE> >::E_CHOICE_FUNCTION::EC_MANUAL );
Parameters
e_func

one of E_CHOICE_FUNCTION. The elements will be mapped according to the extrusion function option given here.

Discussion

Maps the elements of the powerset according to a user-defined space function.

Complexity

2n where n is the number of atoms.

s_func

a function with three parameters; an integer representing the index of the space function, a set representing the element to map and a set representing the atoms. The result is a set (the image of the element being mapped).


~ba


Destructor.

public

~ba( void );

Complexity

Constant.


Member Data

m_atoms
m_elems
m_n
m_scse

m_atoms


public

std::set<ELEM_TYPE> m_atoms;
Discussion

Set of elements constructing the powerset lattice


m_elems


public

std::set< std::set<ELEM_TYPE> > m_elems;
Discussion

Elements of the powerset lattice (Cons)


m_n


public

unsigned int m_n;
Discussion

Number of space/extrusion functions


m_scse


public

scse< std::set<ELEM_TYPE> > m_scse;
Discussion

SCSE representing the distributive lattice of the Powerset BA