shapes.ShapeMap
- class rewalt.shapes.ShapeMap(ogmap, **params)
Bases:
OgMapAn overlay of
ogposets.OgMapfor total maps betweenShapeobjects.It is used to extend constructions of shapes functorially to their maps, in a way that is compatible with the unique representation of shapes by their underlying
ogposets.OgPosetobjects.The most common
ShapeMapobjects are created by methods ofShapesuch asShape.boundary()andShape.inflate(), or of its subclasses, such asSimplex.simplex_degeneracy()orCube.cube_connection().Nevertheless, occasionally we may need to define a map explicitly, in which case we first define an object
fof classogposets.OgMap, then upgrade it to aShapeMapwith the constructorShapeMap(f).- Parameters
ogmap (
ogposets.OgMap) – A total map between shapes.- Keyword Arguments
wfcheck (
bool) – Check whether the given map is a total map between shapes (default isTrue).
Methods
draw(**params)Bound version of
strdiags.draw().draw_boundaries(**params)Bound version of
strdiags.draw_boundaries().dual(*dims)Functorial extension of
OgPoset.dual()to maps of oriented graded posets.Shorthand for
source.generate_layering().gray(*maps)Functorial extension of
OgPoset.gray()to maps of oriented graded posets.join(*maps)Functorial extension of
OgPoset.join()to maps of oriented graded posets.then(other, *others)Returns the composite with other maps or pairs of maps of oriented graded posets, when defined.
Attributes
Returns the current layering of the map's source, composed with the map.
Returns the sequence of rewrite steps associated to the current layering of the map's source, composed with the map.
- then(other, *others)
Returns the composite with other maps or pairs of maps of oriented graded posets, when defined.
If given an
OgMapPairas argument, it returns the pair of composites of the map with each map in the pair.- Parameters
other (
OgMap|OgMapPair) – The first map or pair of maps to follow.*others (
OgMap|OgMapPair, optional) – Any number of other maps or pair of maps to follow.
- Returns
composite – The composite with all the other arguments.
- Return type
OgMap|OgMapPair
Notes
If all the maps have type
shapes.ShapeMap, their composite has the same type.
- property layers
Returns the current layering of the map’s source, composed with the map.
- Returns
layers – The source’s current layering, composed with the map.
- Return type
list[ShapeMap]
- property rewrite_steps
Returns the sequence of rewrite steps associated to the current layering of the map’s source, composed with the map.
- Returns
rewrite_steps – The source’s current sequence of rewrite steps, composed with the map.
- Return type
list[ShapeMap]
- static gray(*maps)
Functorial extension of
OgPoset.gray()to maps of oriented graded posets.This method can be called with the math operator
*, that is,fst * sndis equivalent togray(fst, snd).This static method can also be used as a bound method, that is,
fst.gray(*maps)is equivalent togray(fst, *maps).- Parameters
*maps (
OgMap) – Any number of maps of oriented graded posets.- Returns
gray – The Gray product of the arguments.
- Return type
OgMap
Notes
If all the arguments have type
shapes.ShapeMap, so does their Gray product.
- static join(*maps)
Functorial extension of
OgPoset.join()to maps of oriented graded posets.This method can be called with the shift operators
>>and<<, that is,fst >> sndis equivalent tojoin(fst, snd)andfst << sndis equivalent tojoin(snd, fst).This static method can also be used as a bound method, that is,
fst.join(*maps)is equivalent tojoin(fst, *maps).- Parameters
*maps (
OgMap) – Any number of maps of oriented graded posets.- Returns
join – The join of the arguments.
- Return type
OgMap
Notes
If all the arguments have type
shapes.ShapeMap, so does their join.
- dual(*dims)
Functorial extension of
OgPoset.dual()to maps of oriented graded posets.The dual in all dimensions can also be called with the negation operator
~, that is,~ogmapis equivalent toogmap.dual().This static method can be also used as a bound method, that is,
self.dual(*dims)is equivalent todual(self, *dims).- Parameters
ogmap (
OgMap) – A map of oriented graded posets.*dims (
int) – Any number of dimensions; if none, defaults to all dimensions.
- Returns
dual – The map dualised in the given dimensions.
- Return type
OgMap
Notes
If the map is a
ShapeMap, so is its dual.
- generate_layering()
Shorthand for
source.generate_layering().
- draw(**params)
Bound version of
strdiags.draw().Calling
f.draw(**params)is equivalent to callingstrdiags.draw(f, **params).
- draw_boundaries(**params)
Bound version of
strdiags.draw_boundaries().Calling
f.draw_boundaries(**params)is equivalent to callingstrdiags.draw_boundaries(f, **params).