operator=(const TriaAccessorBase &);
/**
- * Ordering of accessors. If #structure_dimension is less than #dimension,
- * we simply compare the index of such an object. If #structure_dimension
- * equals #dimension, we compare the level() first, and the index() only if
- * levels are equal.
+ * Comparison operator for accessors. This operator is used when comparing
+ * iterators into objects of a triangulation, for example when putting
+ * them into a `std::map`.
+ *
+ * If #structure_dimension is less than #dimension, we simply compare the
+ * index of such an object because faces and edges do not have levels. If
+ * #structure_dimension equals #dimension, we compare the level first, and
+ * the index only if levels are equal.
*/
bool
operator<(const TriaAccessorBase &other) const;
void
copy_from(const TriaAccessor &);
+ /**
+ * Comparison operator for accessors. This operator is used when comparing
+ * iterators into objects of a triangulation, for example when putting
+ * them into a `std::map`.
+ *
+ * This operator simply compares the global index of the vertex the
+ * current object points to.
+ */
+ bool
+ operator<(const TriaAccessor &other) const;
+
/**
* Pointer to the triangulation we operate on.
*/
bool
operator!=(const TriaAccessor &) const;
+ /**
+ * Comparison operator for accessors. This operator is used when comparing
+ * iterators into objects of a triangulation, for example when putting
+ * them into a `std::map`.
+ *
+ * This operator simply compares the global index of the vertex the
+ * current object points to.
+ */
+ bool
+ operator<(const TriaAccessor &other) const;
+
/**
* @}
*/
+template <int dim, int spacedim>
+inline bool
+TriaAccessor<0, dim, spacedim>::
+operator<(const TriaAccessor<0, dim, spacedim> &other) const
+{
+ Assert(tria == other.tria, TriaAccessorExceptions::ExcCantCompareIterators());
+
+ return (global_vertex_index < other.global_vertex_index);
+}
+
+
+
template <int dim, int spacedim>
inline IteratorState::IteratorStates
TriaAccessor<0, dim, spacedim>::state() const
+template <int spacedim>
+inline bool
+TriaAccessor<0, 1, spacedim>::
+operator<(const TriaAccessor<0, 1, spacedim> &other) const
+{
+ Assert(tria == other.tria, TriaAccessorExceptions::ExcCantCompareIterators());
+
+ return (global_vertex_index < other.global_vertex_index);
+}
+
+
+
template <int spacedim>
inline IteratorState::IteratorStates
TriaAccessor<0, 1, spacedim>::state()