diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-09-22 18:12:31 +0200 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-09-22 18:12:31 +0200 |
commit | be7555abfb97f02c37de96736f7a0993d4d47f03 (patch) | |
tree | 180f618a1db3a8b866f43f66210ac38c028d74dd /src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h | |
parent | e0041b766b647f3906b52f861e97edba1f089312 (diff) |
clang-format files
Diffstat (limited to 'src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h')
-rw-r--r-- | src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h b/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h index b8925d96..905d68d5 100644 --- a/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h +++ b/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Simplex_comparator.h @@ -15,48 +15,40 @@ namespace Gudhi { namespace coxeter_triangulation { -/** \class Simplex_comparator +/** \class Simplex_comparator * \brief A comparator class for Permutahedral_representation. * The comparison is in lexicographic order first on * vertices and then on ordered partitions with sorted parts. * The lexicographic order forces that any face is larger than * a coface. * - * \tparam Permutahdral_representation_ Needs to be + * \tparam Permutahdral_representation_ Needs to be * Permutahedral_representation<Vertex_, Ordered_set_partition_> * * \ingroup coxeter_triangulation */ template <class Permutahedral_representation_> struct Simplex_comparator { - /** \brief Comparison between two permutahedral representations. * Both permutahedral representations need to be valid and * the vertices of both permutahedral representations need to be of the same size. */ - bool operator() (const Permutahedral_representation_& lhs, - const Permutahedral_representation_& rhs) const { - if (lhs.vertex() < rhs.vertex()) - return true; - if (lhs.vertex() > rhs.vertex()) - return false; - - if (lhs.partition().size() > rhs.partition().size()) - return true; - if (lhs.partition().size() < rhs.partition().size()) - return false; - - if (lhs.partition() < rhs.partition()) - return true; - if (lhs.partition() > rhs.partition()) - return false; - + bool operator()(const Permutahedral_representation_& lhs, const Permutahedral_representation_& rhs) const { + if (lhs.vertex() < rhs.vertex()) return true; + if (lhs.vertex() > rhs.vertex()) return false; + + if (lhs.partition().size() > rhs.partition().size()) return true; + if (lhs.partition().size() < rhs.partition().size()) return false; + + if (lhs.partition() < rhs.partition()) return true; + if (lhs.partition() > rhs.partition()) return false; + return false; } }; -} // namespace coxeter_triangulation +} // namespace coxeter_triangulation -} // namespace Gudhi +} // namespace Gudhi #endif |