 }
 
 public struct SimplicialComplex {
-    public let simplices: [Simplex]
+    public let simplices: Set<Simplex>
     
-    public init(_ simplices: [Simplex]) {
-        self.simplices = simplices
+    public init<S: Sequence>(_ simplices: S, generate: Bool = false) where S.Iterator.Element == Simplex {
+        self.simplices = generate ?
+            simplices.reduce(Set()) { $0.union($1.allSubsimplices()) }
+            : Set(simplices)
     }
     
     public func chainComplex<R: Ring>() -> ChainComplex<Simplex, R> {

        return Array(queue)
    }
    
    public var hashValue: Int {
        return description.hashValue
    }

                    return res + R(sgn(i)) * M(t)
                }
            }
            return F(inBasis: chns[i], outBasis: (i > 0) ? chns[i - 1] : [], mapping: map)
        }
        bmaps += [F.zero]
        
