generics.card

generics.card(s, p=None, **kwargs)

Counts the number of p-dimensional simplices of a simplicial object s.

If s has an existing method s.card(p), then that method is called with additional keyword arguments kwargs.

Otherwise, the behavior of this function depends on the type-class of s and whether p is specified. Namely, - If s is complex like, then card(s) returns a tuple containing the number of simplices in s in each dimension, and card(s, p) the number of simplices in s with dimension p.