cellcomplex.gmap.gmap_tp module

class cellcomplex.gmap.gmap_tp.GMap[source]

Bases: object

add_dart()[source]

Create a new dart and return its id. Set its alpha_i to itself (fixed points)

adjacent_cells(dart, degree)[source]

Return all the elements of degree degree that are adjacent to the element dart with respect to the alpha relation of degree degree. (Typically all points sharing an edge with a point) For this iterate over all the dart of the orbit of (dart, degree). For each dart d of this orbit, get its neighbor n (alpha degree) and remove its orbit (n, degree) from the set of darts to consider. See function incident_cells for inspiration.

alpha(degree, dart)[source]
cell_center(dart, degree)[source]

Generic function to compute the center of any elements of any degree

dartdisplay(add=False, textsize=None)[source]
darts()[source]

Return a list of id representing the darts of the structure

darts2pglscene(textsize=None)[source]
display(color=[205, 205, 205], add=False)[source]
elements(degree)[source]

Return one dart per element of degree. For this, consider all darts as initial set S. Take the first dart d, remove from the set all darts of the orbit starting from d and corresponding to element of degree degree. Take then next element from set S and do the same until S is empty. Return all darts d that where use

eulercharacteristic()[source]
get_embedding_dart(dart, degree, propertydict)[source]

Check if a dart of the orbit representing the element of degree degree has already been associated with a value in propertydict. If yes, return this dart, else return the dart passed as argument

get_position(dart)[source]

Retrieve the coordinates associated to the vertex <alpha_1, alpha_2>(dart)

incident_cells(dart, degree, incidentdegree)[source]

Return all the element of degree incidentdegree that are incident to the element dart of degree degree. (Typically all edges around a point) For this iterate over all the dart of the orbit of (dart, degree). For each dart d of this orbit, get all the darts coresponding to the orbit of the element (d, incidentdegree) and remove them from the original set. See function elements for inspiration.

insert_edge(dart)[source]

Insert an edge at the point represented by dart. Return a dart corresponding to the dandling edge end.

is_free(degree, dart)[source]

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

is_valid()[source]

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

Link the two darts with a relation alpha_degree

nb_elements(degree)[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.

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.

pointvalency(pointdart)[source]

Return the valency of a vertex

print_alphas()[source]

print for each dart, the value of the different alpha applications.

set_position(dart, position)[source]

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

sew_dart(degree, dart1, dart2, merge_attribute=True)[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.

splitedge(dart)[source]

Operator to split an edge. Return a dart corresponding to the new points

splitface(dart1, dart2)[source]

split face by inserting an edge between dart1 and dart2