]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed indentation.
authorLuca Heltai <luca.heltai@sissa.it>
Sun, 13 Aug 2017 23:35:15 +0000 (17:35 -0600)
committerLuca Heltai <luca.heltai@sissa.it>
Sun, 13 Aug 2017 23:35:15 +0000 (17:35 -0600)
include/deal.II/numerics/kdtree_distance.h
source/numerics/kdtree_distance.cc
tests/numerics/kdtree_distance_01.cc

index 96767965318b2e3094080d8e45b82b8d0a90e259..08e048aa103ae7a8365306c015172dbf3f3e6c76 100644 (file)
@@ -193,8 +193,8 @@ public:
    * @return vector of indices and distances of the matching points
    */
   std::vector<std::pair<unsigned int, double> > get_points_within_ball(const Point<dim> &target,
-                                                                       const double &radius,
-                                                                       bool sorted=false) const;
+      const double &radius,
+      bool sorted=false) const;
 
   /**
    * Fill two vectors with the indices and distances of the closest
@@ -209,7 +209,7 @@ public:
    * @return a vector of pairs of indices and distances of the matching points
    */
   std::vector<std::pair<unsigned int, double> >  get_closest_points(const Point<dim> &target,
-                                                                    const unsigned int n_points) const;
+      const unsigned int n_points) const;
 
 private:
   /**
index 72cb1c863b490ad147b283b4e0f25bbb413fc429..04345d5125f2e3a5c94a13806a81a959a9f7a936 100644 (file)
@@ -19,8 +19,8 @@ KDTreeDistance<dim>::KDTreeDistance(const unsigned int &max_leaf_size,
 
 template<int dim>
 std::vector<std::pair<unsigned int, double> > KDTreeDistance<dim>::get_points_within_ball(const Point<dim> &center,
-                                                                                          const double &radius,
-                                                                                          bool sorted) const
+    const double &radius,
+    bool sorted) const
 {
   std::vector<std::pair<unsigned int, double> > matches;
   Assert(adaptor, ExcNotInitialized());
@@ -37,7 +37,7 @@ std::vector<std::pair<unsigned int, double> > KDTreeDistance<dim>::get_points_wi
 
 template<int dim>
 std::vector<std::pair<unsigned int, double> > KDTreeDistance<dim>::get_closest_points(const Point<dim> &target,
-                                                                                      const unsigned int n_points) const
+    const unsigned int n_points) const
 {
   Assert(adaptor, ExcNotInitialized());
   Assert(kdtree, ExcInternalError());
@@ -46,7 +46,7 @@ std::vector<std::pair<unsigned int, double> > KDTreeDistance<dim>::get_closest_p
   std::vector<std::pair<unsigned int, double> > matches(n_points);
 
   kdtree->knnSearch(&target[0], n_points, &indices[0], &distances[0]);
-  for(unsigned int i=0; i<n_points; ++i)
+  for (unsigned int i=0; i<n_points; ++i)
     matches[i] = std::make_pair(indices[i], distances[i]);
   return matches;
 }
index 3946f396dc031bce2ac6a7fdc4cc2b2800e71ec2..2c0ae731e67fa166de612a1dd4e9d5083f1dadc0 100644 (file)
@@ -43,14 +43,16 @@ int main ()
 
   kdtree.set_points(points);
 
-  for (auto &p : test_points) {
+  for (auto &p : test_points)
+    {
       auto res = kdtree.get_closest_points(p,1)[0];
-     deallog << "P: " << p << ", distance: " << res.second << ", index: " << res.first << std::endl;
+      deallog << "P: " << p << ", distance: " << res.second << ", index: " << res.first << std::endl;
     }
 
   deallog << "Consistency checking: the following are all the points in the set." << std::endl;
-  for (auto &p : points) {
-    auto res = kdtree.get_closest_points(p,1)[0];
-    deallog << "P: " << p << ", distance: " << res.second << ", index: " << res.first << std::endl;
+  for (auto &p : points)
+    {
+      auto res = kdtree.get_closest_points(p,1)[0];
+      deallog << "P: " << p << ", distance: " << res.second << ", index: " << res.first << std::endl;
     }
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.