--- a/examples/grid/grid2D.h Wed Mar 19 12:43:33 2008 -0400
+++ b/examples/grid/grid2D.h Wed Mar 26 05:52:39 2008 -0400
@@ -11,6 +11,7 @@
#include <map>
#include <set>
#include <limits>
+#include <iostream>
//#include <cmath>
#include <boost/serialization/access.hpp>
--- a/include/topology/filtrationcontainer.h Wed Mar 19 12:43:33 2008 -0400
+++ b/include/topology/filtrationcontainer.h Wed Mar 26 05:52:39 2008 -0400
@@ -19,21 +19,21 @@
{
public:
typedef FltrSmplx FiltrationSimplex;
- typedef ConsistencyList<FiltrationSimplex> ConsistencyList;
+ typedef ConsistencyList<FiltrationSimplex> ConsistencyLst;
/// \name Cycles and Trails
/// @{
/// Index is and therfore acts like an iterator. The name is preserved for historical reasons.
- typedef typename ConsistencyList::iterator Index;
+ typedef typename ConsistencyLst::iterator Index;
/// const_Index is a const_iterator
- typedef typename ConsistencyList::const_iterator const_Index;
+ typedef typename ConsistencyLst::const_iterator const_Index;
/// @}
/// \name Cycles and Trails
/// @{
- typedef typename ConsistencyList::GreaterThanComparison CyclesComparator;
- typedef typename ConsistencyList::LessThanComparison TrailsComparator;
- typedef typename ConsistencyList::ConsistencyComparison ConsistencyComparator;
+ typedef typename ConsistencyLst::GreaterThanComparison CyclesComparator;
+ typedef typename ConsistencyLst::LessThanComparison TrailsComparator;
+ typedef typename ConsistencyLst::ConsistencyComparison ConsistencyComparator;
typedef ::Cycle<Index, CyclesComparator, ConsistencyComparator> Cycle;
typedef ::Cycle<Index, TrailsComparator, ConsistencyComparator> Trail;
/// @}
--- a/include/topology/filtrationsimplex.h Wed Mar 19 12:43:33 2008 -0400
+++ b/include/topology/filtrationsimplex.h Wed Mar 26 05:52:39 2008 -0400
@@ -47,12 +47,12 @@
typedef FiltrationContainer<Self> Container;
typedef Simplex Parent;
- typedef Vine<Simplex> Vine;
+ typedef Vine<Simplex> VineS;
typedef typename Container::Cycle Cycle;
typedef typename Container::Trail Trail;
typedef typename Container::Index Index;
- typedef Evaluator<Simplex> Evaluator;
+ typedef Evaluator<Simplex> EvaluatorS;
FiltrationSimplex(const Simplex& s):
Simplex(s), vine_(0) {}
@@ -63,7 +63,7 @@
void set_pair(Index pair) { pair_ = pair; }
bool sign() const { return cycles_column.empty(); }
bool is_paired() const { return pair() != pair()->pair(); }
- void set_vine(Vine* v) { vine_ = v; }
+ void set_vine(VineS* v) { vine_ = v; }
using Parent::dimension;
/// @}
@@ -75,14 +75,14 @@
const Cycle& cycle() const { return cycles_column; }
const Trail& trail() const { return trails_row; }
Index pair() const { return pair_; }
- Vine* vine() const { return vine_; }
+ VineS* vine() const { return vine_; }
/// @}
private:
Cycle cycles_column;
Trail trails_row;
Index pair_;
- Vine* vine_;
+ VineS* vine_;
};
#endif // __FILTRATIONSIMPLEX_H__
--- a/include/topology/vineyard.h Wed Mar 19 12:43:33 2008 -0400
+++ b/include/topology/vineyard.h Wed Mar 26 05:52:39 2008 -0400
@@ -30,14 +30,14 @@
public:
typedef FltrSmplx FiltrationSimplex;
typedef typename FiltrationSimplex::Simplex Simplex;
- typedef Vine<Simplex> Vine;
- typedef Knee<Simplex> Knee;
- typedef std::list<Vine> VineList;
+ typedef Vine<Simplex> VineS;
+ typedef Knee<Simplex> KneeS;
+ typedef std::list<VineS> VineList;
typedef std::vector<VineList> VineListVector;
typedef typename FiltrationSimplex::Cycle Cycle;
typedef typename FiltrationSimplex::Index Index;
- typedef typename FiltrationSimplex::Evaluator Evaluator;
+ typedef typename FiltrationSimplex::EvaluatorS Evaluator;
public:
Vineyard(Evaluator* eval = 0):
@@ -52,7 +52,7 @@
void save_edges(const std::string& filename) const;
protected:
- typename Knee::SimplexList resolve_cycle(Index i) const;
+ typename KneeS::SimplexList resolve_cycle(Index i) const;
private:
void record_knee(Index i);
@@ -112,15 +112,15 @@
{
public:
typedef S Simplex;
- typedef Knee<Simplex> Knee;
- typedef std::list<Knee> VineRepresentation;
+ typedef Knee<Simplex> KneeS;
+ typedef std::list<KneeS> VineRepresentation;
typedef typename VineRepresentation::const_iterator const_knee_iterator;
Vine() {}
- Vine(const Knee& k) { add(k); }
+ Vine(const KneeS& k) { add(k); }
- void add(RealType b, RealType d, RealType t) { push_back(Knee(b,d,t)); }
- void add(const Knee& k) { push_back(k); }
+ void add(RealType b, RealType d, RealType t) { push_back(KneeS(b,d,t)); }
+ void add(const KneeS& k) { push_back(k); }
using VineRepresentation::begin;
using VineRepresentation::end;
--- a/include/topology/vineyard.hpp Wed Mar 19 12:43:33 2008 -0400
+++ b/include/topology/vineyard.hpp Wed Mar 26 05:52:39 2008 -0400
@@ -23,7 +23,7 @@
if (dim >= vines.size())
{
AssertMsg(dim == vines.size(), "New dimension has to be contiguous");
- vines.push_back(std::list<Vine>());
+ vines.push_back(std::list<VineS>());
}
start_vine(cur);
@@ -36,8 +36,8 @@
Vineyard<FS>::
switched(Index i, Index j)
{
- Vine* i_vine = i->vine();
- Vine* j_vine = j->vine();
+ VineS* i_vine = i->vine();
+ VineS* j_vine = j->vine();
i->set_vine(j_vine);
j->set_vine(i_vine);
@@ -60,7 +60,7 @@
AssertMsg(i->sign(), "Can only start vines for positive simplices");
Dimension dim = i->dimension();
- vines[dim].push_back(Vine());
+ vines[dim].push_back(VineS());
i->set_vine(&vines[dim].back());
i->pair()->set_vine(i->vine());
}
@@ -94,7 +94,7 @@
std::string fn = filename + os.str() + ".edg";
std::ofstream out(fn.c_str());
for (typename VineList::const_iterator vi = vines[i].begin(); vi != vines[i].end(); ++vi)
- for (typename Vine::const_iterator ki = vi->begin(), kiprev = ki++; ki != vi->end(); kiprev = ki++)
+ for (typename VineS::const_iterator ki = vi->begin(), kiprev = ki++; ki != vi->end(); kiprev = ki++)
{
if (kiprev->is_infinite() || ki->is_infinite()) continue;
out << kiprev->birth << ' ' << kiprev->death << ' ' << kiprev->time << std::endl;
@@ -120,7 +120,7 @@
else
{
rLog(rlVineyard, "Creating knee");
- Knee k(evaluator->value(*i), evaluator->value(*(i->pair())), evaluator->time());
+ KneeS k(evaluator->value(*i), evaluator->value(*(i->pair())), evaluator->time());
rLog(rlVineyard, "Knee created: %s", tostring(k).c_str());
if (!k.is_diagonal() || i->vine()->empty()) // non-diagonal k, or empty vine
@@ -147,7 +147,7 @@
}
template<class FS>
-typename Vineyard<FS>::Knee::SimplexList
+typename Vineyard<FS>::KneeS::SimplexList
Vineyard<FS>::
resolve_cycle(Index i) const
{
@@ -155,7 +155,7 @@
const Cycle& cycle = i->cycle();
// Resolve simplices
- typename Knee::SimplexList lst;
+ typename KneeS::SimplexList lst;
for (typename Cycle::const_iterator cur = cycle.begin(); cur != cycle.end(); ++cur)
lst.push_back(**cur);