--- a/include/topology/simplex.hpp Fri May 11 10:25:57 2012 -0700
+++ b/include/topology/simplex.hpp Fri May 11 17:06:55 2012 -0700
@@ -21,21 +21,21 @@
Simplex<V,T>,
boost::use_default,
Simplex<V,T> > Parent;
-
+
BoundaryIterator() {}
explicit BoundaryIterator(Iterator iter, const VertexContainer& vertices):
Parent(iter), vertices_(vertices) {}
-
+
private:
friend class boost::iterator_core_access;
- Simplex<V,T> dereference() const
- {
+ Simplex<V,T> dereference() const
+ {
typedef std::not_equal_to<Vertex> NotEqualVertex;
return Self(boost::make_filter_iterator(std::bind2nd(NotEqualVertex(), *(this->base())), vertices_.begin(), vertices_.end()),
boost::make_filter_iterator(std::bind2nd(NotEqualVertex(), *(this->base())), vertices_.end(), vertices_.end()));
}
-
+
const VertexContainer& vertices_;
};
@@ -61,17 +61,17 @@
bool
Simplex<V,T>::
contains(const Vertex& v) const
-{
+{
// TODO: would std::find() be faster? (since most simplices we deal with are low dimensional)
- typename VertexContainer::const_iterator location = std::lower_bound(vertices().begin(), vertices().end(), v);
- return ((location != vertices().end()) && (*location == v));
+ typename VertexContainer::const_iterator location = std::lower_bound(vertices().begin(), vertices().end(), v);
+ return ((location != vertices().end()) && (*location == v));
}
-
+
template<class V, class T>
bool
Simplex<V,T>::
contains(const Self& s) const
-{
+{
return std::includes( vertices().begin(), vertices().end(),
s.vertices().begin(), s.vertices().end());
}
@@ -82,21 +82,21 @@
add(const Vertex& v)
{
// TODO: would find() or lower_bound() followed by insert be faster?
- vertices().push_back(v); std::sort(vertices().begin(), vertices().end());
+ vertices().push_back(v); std::sort(vertices().begin(), vertices().end());
}
-
+
template<class V, class T>
template<class Iterator>
void
Simplex<V,T>::
join(Iterator bg, Iterator end)
-{
+{
vertices().insert(vertices().end(), bg, end);
- std::sort(vertices().begin(), vertices().end());
+ std::sort(vertices().begin(), vertices().end());
}
template<class V, class T>
-std::ostream&
+std::ostream&
Simplex<V,T>::
operator<<(std::ostream& out) const
{
@@ -111,17 +111,17 @@
return out;
}
-
+
template<class V, class T>
template<class Archive>
-void
+void
Simplex<V,T>::
-serialize(Archive& ar, version_type )
-{
- ar & make_nvp("vertices", vertices());
- ar & make_nvp("data", data());
+serialize(Archive& ar, version_type )
+{
+ ar & boost::serialization::make_nvp("vertices", vertices());
+ ar & boost::serialization::make_nvp("data", data());
}
template<class V, class T>
-std::ostream& operator<<(std::ostream& out, const Simplex<V,T>& s)
+std::ostream& operator<<(std::ostream& out, const Simplex<V,T>& s)
{ return s.operator<<(out); }
--- a/include/utilities/indirect.h Fri May 11 10:25:57 2012 -0700
+++ b/include/utilities/indirect.h Fri May 11 17:06:55 2012 -0700
@@ -15,7 +15,7 @@
struct IndirectComparison
{
typedef Comparison_ Comparison;
-
+
IndirectComparison(const Comparison& cmp):
cmp_(cmp)
{}
@@ -60,10 +60,10 @@
ThreeOutcomeCompare(const Comparison& cmp = Comparison()): Comparison(cmp) {}
- int compare(first_argument_type a, second_argument_type b) const
- { if (operator()(a,b)) return -1;
- else if (operator()(b,a)) return 1;
- else return 0;
+ int compare(first_argument_type a, second_argument_type b) const
+ { if (this->operator()(a,b)) return -1;
+ else if (this->operator()(b,a)) return 1;
+ else return 0;
}
};
--- a/tools/CMakeLists.txt Fri May 11 10:25:57 2012 -0700
+++ b/tools/CMakeLists.txt Fri May 11 17:06:55 2012 -0700
@@ -1,4 +1,4 @@
-find_package (Qt4)
+#find_package (Qt4)
#if (QT4_FOUND)
# set (QT_USE_QTOPENGL TRUE)