scse

Superclass:
scs<ELEM_TYPE>
Declared In:
See Also:

https://hal.archives-ouvertes.fr/hal-01242971

Introduction

The Spatial Constraint System with Extrusion class.

Discussion

Derived constraint systems inherit the functionality of this class. It implements extrusion functions with property-checking on them.



Member Functions

e

Gets the image of element c in the extrusion function i.

e_inv

Gets the inverse image of element c in the extrusion function i.

e_map

eᵢ(elems) = image

e_properties

Checks whether the extrusion function i satisfies certain property.

print_efunc

Prints (on std::cout) the extrusion function i using elements' ID's.

scse(const scs &, E_CHOICE_FUNCTION)

Constructor.

scse(const scse &)

Copy Constructor.

~scse

Destructor.


e


Gets the image of element c in the extrusion function i.

protected

ELEM_TYPE e( unsigned int i, ELEM_TYPE c );
Parameters
i

index of the extrusion function.

c

element to retrieve its image.

Return Value

eᵢ(c)

Complexity

Constant.


e_inv


Gets the inverse image of element c in the extrusion function i.

protected

std::vector<ELEM_TYPE> e_inv( unsigned int i, ELEM_TYPE c );
Parameters
i

index of the extrusion function.

c

element to retrieve its fiber.

Return Value

eᵢ-1(c)

Complexity

O(n) where n is the number of elements of the SCS.


e_map


eᵢ(elems) = image

protected

void e_map( unsigned int i, std::vector<ELEM_TYPE> elems, ELEM_TYPE image );
Parameters
i

index of the extrusion function.

elems

elements to map.

image

image to map elements to.

Discussion

The function will do nothing if the elements or the image are not in the elements of the SCS.

Complexity

O(n) where n is the number of elements to map.


e_properties


Checks whether the extrusion function i satisfies certain property.

protected

bool e_properties( unsigned int i, E_FUNCTION_PROPERTY property );
Parameters
i

the index of the eztrusion function.

property

one of E_FUNCTION_PROPERTY.

Return Value

true if the extrusion function satisfies the property, false otherwise. Prints to std::cerr the troublesome elements' ID's.

Complexity

O(n) if property = EP_TOTAL or property = EP_RIGHT_INVERSE_S and O(n²) otherwise.


print_efunc


Prints (on std::cout) the extrusion function i using elements' ID's.

protected

void print_efunc( unsigned int i );
Parameters
i

the index of the extrusion function.

Complexity

O(n) where n is the number of elements of the SCS.


scse(const scs &, E_CHOICE_FUNCTION)


Constructor.

protected

scse ( const scs<ELEM_TYPE>& SCS, E_CHOICE_FUNCTION e_choice );
Parameters
SCS

a SCS

e_choice

one of E_CHOICE_FUNCTION

Discussion

This constructor will create n extrusion functions and map them according to e_choice

Complexity

O(n) where n is the number of elements in the SCS.


scse(const scse &)


Copy Constructor.

protected

scse ( const scse<ELEM_TYPE>& SCSE );
Parameters
SCSE

already instantiated SCSE.

Complexity

Constant.


~scse


Destructor.

protected

~scse( void );

Complexity

Constant.


Typedefs

E_CHOICE_FUNCTION

Enumeration of possible canonical ways of constructing the extrusion functions.

E_FUNCTION_PROPERTY

Enumeration of possible properties of a space function.


E_CHOICE_FUNCTION


Enumeration of possible canonical ways of constructing the extrusion functions.

public

enum class E_CHOICE_FUNCTION { EC_SUPREMA, EC_INFIMA, EC_MANUAL, EC_RANDOM };
Discussion

can be

- EC_SUPREMA: eᵢ(c) = ⨆(sᵢ-1(c)) (i.e. each element is mapped to the LUB of its fiber in the corresponding space function).

- EC_INFIMA: eᵢ(c) = ⨅(sᵢ-1(c)) (i.e. each element is mapped to the GLB of its fiber in the corresponding space function).

- EC_MANUAL: elements are mapped manually using e_map.

- EC_RANDOM: elements are mapped to a random element of their respective fibers in the corresponding space function.


E_FUNCTION_PROPERTY


Enumeration of possible properties of a space function.

protected

enum class E_FUNCTION_PROPERTY { EP_TOTAL, EP_SURJECTIVE, EP_INJECTIVE, EP_BIJECTIVE, EP_JOIN_DISTRIBUTIVE, EP_MEET_DISTRIBUTIVE, EP_RIGHT_INVERSE_S };
Discussion

each property has a one-on-one correspondance with the properties of FUNCTION_PROPERTY(specified in SCS) with one adition

-EP_RIGHT_INVERSE_S: function is the right inverse of its corresponding space function (i.e. it satisfies E.1).


Member Data

e_func

e_func


protected

std::vector< std::map<ELEM_TYPE, ELEM_TYPE> > e_func;
Discussion

Vector containing the extrusion functions of the CS.