--- a/include/topology/chain.h Wed Apr 29 10:16:03 2009 -0700
+++ b/include/topology/chain.h Thu May 07 14:53:13 2009 -0700
@@ -77,7 +77,8 @@
/// \name Modifiers
/// @{
- void remove(const_reference x);
+ void remove(iterator i) { ChainRepresentation::erase(i); Size::operator--(); }
+ void remove(const_reference x) { remove(std::find(begin(), end(), x)); }
template<class ConsistencyComparison>
void append(const_reference x, const ConsistencyComparison& cmp);
@@ -106,8 +107,10 @@
std::string tostring(const OutputMap& outmap = OutputMap()) const;
/// @}
+ /// Technically, it's an internal operation, and should be followed by a sort()
+ using ChainRepresentation::push_back;
+
private:
- using ChainRepresentation::push_back;
using ChainRepresentation::insert;
using ChainRepresentation::erase;
--- a/include/topology/chain.hpp Wed Apr 29 10:16:03 2009 -0700
+++ b/include/topology/chain.hpp Thu May 07 14:53:13 2009 -0700
@@ -41,15 +41,6 @@
{}
template<class C>
-void
-ChainWrapper<C>::
-remove(const_reference x)
-{
- erase(std::find(begin(), end(), x));
- Size::operator--();
-}
-
-template<class C>
template<class ConsistencyCmp>
void
ChainWrapper<C>::
--- a/include/topology/dynamic-persistence.hpp Wed Apr 29 10:16:03 2009 -0700
+++ b/include/topology/dynamic-persistence.hpp Thu May 07 14:53:13 2009 -0700
@@ -75,7 +75,7 @@
if (i_in_i_prev)
{
rLog(rlTranspositions, "Case 1, U[i,i+1] = 1");
- i_prev->trail.erase(*i_in_i_prev);
+ i_prev->trail.remove(*i_in_i_prev);
}
Index k = i_prev->pair;
@@ -211,7 +211,7 @@
if (i_in_i_prev)
{
rLog(rlTranspositions, "Case 4, U[i,i+1] = 1");
- i_prev->trail.erase(*i_in_i_prev);
+ i_prev->trail.remove(*i_in_i_prev);
}
swap(i_prev, i);
rLog(rlTranspositions, "Case 4");
--- a/include/topology/static-persistence.hpp Wed Apr 29 10:16:03 2009 -0700
+++ b/include/topology/static-persistence.hpp Thu May 07 14:53:13 2009 -0700
@@ -41,7 +41,7 @@
pair_simplices(OrderIndex bg, OrderIndex end, const Visitor& visitor)
{
#if LOGGING
- typename Traits::OutputMap outmap(order_);
+ typename ContainerTraits::OutputMap outmap(order_);
#endif
// FIXME: need sane output for logging