--- a/include/topology/simplex.h Tue Sep 09 18:04:04 2008 -0700
+++ b/include/topology/simplex.h Mon Sep 15 16:38:54 2008 -0700
@@ -60,6 +60,7 @@
bool contains(const Vertex& v) const;
const VertexContainer& vertices() const { return vertices_; }
void add(const Vertex& v);
+ void join(const Self& other);
/// @}
/// \name Assignment and comparison
--- a/include/topology/simplex.hpp Tue Sep 09 18:04:04 2008 -0700
+++ b/include/topology/simplex.hpp Mon Sep 15 16:38:54 2008 -0700
@@ -38,6 +38,15 @@
SimplexWithVertices<V>::
add(const Vertex& v)
{ vertices_.push_back(v); std::sort(vertices_.begin(), vertices_.end()); }
+
+template<class V>
+void
+SimplexWithVertices<V>::
+join(const Self& other)
+{
+ vertices_.insert(vertices_.end(), other.vertices_.begin(), other.vertices_.end());
+ std::sort(vertices_.begin(), vertices_.end());
+}
template<class V>
std::ostream&