cellcomplex.gmap.gmap module

class cellcomplex.gmap.gmap.DartProxy(gmap, dartid)[source]

Bases: object

alpha(degree)[source]
get_position()[source]
property position
set_alpha(degree, dart)[source]
set_position(pos)[source]
class cellcomplex.gmap.gmap.GMap(degree=2)[source]

Bases: object

add(gmap)[source]

add topology of gmap into self. Return mapping of element of gmap into self.

add_dart(dartid=None)[source]

Create a new dart and return its id

add_darts(nb)[source]
add_sdart(dartid=None)[source]
alpha(*degrees_and_dart)[source]

Return the alpha_i(alpha_j(…(dart))

are_linked_darts(degree, dart1, dart2)[source]

Are the two darts linked with a relation alpha_degree

are_sewable_dart(dart1, dart2, degree=None)[source]

Check if two elements of degree ‘degree’ that start at dart1 and dart2 are sewable.

cell_center(dart, degree)[source]
chamfering(dart, degree, geomratio=0.3)[source]
check_validity()[source]

Test the validity of the structure. Check if there is pending dart for alpha_0 and alpha_1 (fixed point)

closure()[source]
compatible_min_free_degree(dart1, dart2)[source]
contract_cell(dart, degree)[source]
copy()[source]
dart()[source]
dartdisplay(add=False, textsize=None)[source]
darts()[source]

Return a list of id representing the darts of the structure

darts2pglscene(textsize=None)[source]
decrease_degree()[source]

Find the degree of the link between the two darts

detect_sewable_cell(dart1, dart2, degree)[source]
display(degree=None, add=False, randomcolor=True)[source]
dual()[source]
eulercharacteristic()[source]
expand(gmap, degree, mapping)[source]

Insert gmap into self. links between gmap and self are specified using ‘degree’ and ‘mapping’. ‘mapping’ gives a mapping between darts of gmap to darts of self.

get_embedding_dart(propnameordict, degree, dart)[source]

Return the dart that contains the embedding. If no dart still exists, return dart

get_embedding_dart_and_value(propnameordict, degree, dart)[source]

Return the dart that contains the embedding. If no dart still exists, return dart

get_position(dart)[source]

Return the coordinates with the vertex <alpha_1,…,alpha_i>(dart)

has_position(dart)[source]

Return the coordinates with the vertex <alpha_1,…,alpha_i>(dart)

has_property(propnameordict, degree, dart)[source]
iboundary(degree=None)[source]
ichamfering(dart, degree)[source]
iclosure(degree)[source]
increase_degree()[source]
insert(gmap, degree, mapping)[source]

Insert gmap into self. links between gmap and self are specified using ‘degree’ and ‘mapping’. ‘mapping’ gives a mapping between darts of gmap to darts of self.

intuitive_sew(dart1, dart2, degree)[source]
is_contractible(dart, degree)[source]
is_expansible(gmap, degree, mapping)[source]

Test if gmap can be inserted into self. links between gmap and self are specified using ‘degree’ and ‘mapping’. ‘mapping’ gives a mapping between darts of gmap to darts of self.

is_free(dart, degree)[source]

Test if dart is free for alpha_degree (if it is a fixed point)

is_insertable(gmap, degree, mapping)[source]

Test if gmap can be inserted into self. links between gmap and self are specified using ‘degree’ and ‘mapping’. ‘mapping’ gives a mapping between darts of gmap to darts of self.

is_orientable()[source]
is_removable_cell(dart, degree)[source]
is_valid()[source]

Test the validity of the structure. Check if there is pending dart for alpha_0 and alpha_1 (fixed point)

iterate_over_each_adjacent_cell(dart, degree)[source]
iterate_over_each_connex_components()[source]
iterate_over_each_dart_of_a_i_cell(dart, degree)[source]
iterate_over_each_i_cell(degree)[source]
iterate_over_each_incident_cell(dart, degree, incidentdegree)[source]

Link the two darts with a relation alpha_degree

min_free_degree(dart)[source]

Return mninimum degree for which a dart is free

nb_cells(degree)[source]
nb_connex_components()[source]
nb_darts()[source]
orbit(dart, list_of_alpha_value)[source]

Return the orbit of dart using a list of alpha relation. Example of use: gmap.orbit(0,[0,1]). In python, you can use the set structure to process only once all darts of the orbit.

orbit_alphas_for_elements(degree, maxdegree=None)[source]

Return the alpha value for the orbit giving an element of a given degree. For instance a vertex is given by the orbit <alpha_1, …., alpha_gmap_degree>.

orbit_alphas_to_sew(degree)[source]

Return the alpha value for the orbit to sew: <0, degree -2, degree +2, …, gmap.degree alphas_for_orbits_to_sew = { 2 : { 0 : [2], 1 : None , 2 : [0] },

3 : { 0 : [2,3], 1: [3], 2 : [0], 3 : [0,1] } }

orbit_iter(dart, list_of_alpha_value)[source]

Return the orbit of dart using a list of alpha relation. Example of use: gmap.orbit(0,[0,1]). In python, you can use the set structure to process only once all darts of the orbit.

orderedorbit(dart, list_of_alpha_value)[source]

Return the orbit of dart using a list of alpha relation. Example of use. gmap.orbit(0,[0,1]). Warning: No fixed point for the given alpha should be contained.

orderedorbit_iter(dart, list_of_alpha_value)[source]

Return the orbit of dart using a list of alpha relation. Example of use. gmap.orbit(0,[0,1]). Warning: No fixed point for the given alpha should be contained.

orientation()[source]

Link the two darts with a relation alpha_degree. Do not check if they are free

pointvalency(pointdart)
print_alphas(darts=None)[source]
property(propnameordict, degree, dart)[source]
remove_cell(dart, degree)[source]
remove_dart(dart)[source]
restriction(darts)[source]

return a copy of self restricted to the given set of darts

scale(scaling)[source]
set_alpha(degree, dart, oppdart)[source]
set_position(dart, position)[source]

Associate coordinates with the vertex <alpha_1,…,alpha_i>(dart)

set_property(propnameordict, degree, dart, value)[source]
sew_dart(dart1, dart2, degree=None, verbose=False)[source]

Sew two elements of degree ‘degree’ that start at dart1 and dart2. Determine first the orbits of dart to sew. Sew pairs of corresponding darts.

translate(translation)[source]

Unlink the two darts with the relation alpha_degree. If dart2 is not given, it will uses the dart linked with dart1. If it is given, it check if it is the good one.

unsew_dart(dart1, degree=None)[source]

Sew two elements of degree ‘degree’ that start at dart1 and dart2. Determine first the orbits of dart to sew. Check if they are compatible Sew pairs of corresponding darts.

cellcomplex.gmap.gmap.pointvalency(gmap, pointdart)[source]