| 1 | initial version |
I do not know whether it is the "best" way, but at least a short and readable way to transform a set of sets S into a list of lists L:
sage: S = Set([Set([1,2]),Set([2,3])]) ; S
{{1, 2}, {2, 3}}
sage: L = [i.list() for i in S] ; L
[[1, 2], [2, 3]]
sage: C = SimplicialComplex(L) ; C
Simplicial complex with vertex set (1, 2, 3) and facets {(1, 2), (2, 3)}
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.