On Thursday, June 8, 2017 at 5:16:15 PM UTC-7, David Joyner wrote:
>
> Hi all:
>
> This is kind of a newbie question, as I'm not an expert on simplicial
> complexes. It's also a minor technical issue on the documentation, not
> the code.
>
> I'm trying to debug some code of mine and, on reading the
> documentation for chain_complex on
>
> http://doc.sagemath.org/html/en/reference/homology/sage/homology/simplicial_complex.html,
>
>
> found this: "The rows and columns of the boundary matrices are indexed
> by the lists given by the n_cells() method, which by default are
> sorted." On the other hand, the documentation for n_cells has this
> statement: "Sort the list if the argument sort is True. If sort is
> None (the default), then sort depending on the value of the
> sort_facets parameter (from the initialization of the simplicial
> complex)." However, the sort_facets parameter (unless I'm mistaken)
> does not sort the individual faces but rather sorts the vertices in
> each facet.
The documentation means that if "sort_facets" was True originally, then
n_cells will also sort its result before returning it. ("then sort
depending on the value of the sort_facets parameter": so if sort_facets was
True, then n_cells should also sort. It doesn't mean "sort using the effect
of the sort_facets parameter", but sort depending on its value, which is
True or False. This could be made clearer, I guess.)
I don't know if there is ever a good reason to specify sort_facets=False.
Maybe we should deprecate it?
> In my code, I expected the faces of a fixed dimension to
> be returned as a deterministic sorted list not a set whose ordering
> could be random. Now, it *does* seem as though the faces are sorted.
> It's just that, to me, the documentation of n_cells doesn't make that
> clear.
>
> I'm asking if I'm mis-understanding something here or not.
>
> - David Joyner
>
--
John
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.