Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 24, 2024
1 parent ad11eee commit 8434d9f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions cpp/box/export_Box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace nb = nanobind;

namespace freud { namespace box { namespace wrap {

void makeAbsolute(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1, 3>> vecs,
void makeAbsolute(const std::shared_ptr<Box>& box, nb_array<float, nb::shape<-1, 3>> vecs,
nb_array<float, nb::shape<-1, 3>> out)
{
unsigned int Nvecs = vecs.shape(0);
Expand All @@ -16,7 +16,7 @@ void makeAbsolute(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1,
box->makeAbsolute(vecs_data, Nvecs, out_data);
}

void makeFractional(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1, 3>> vecs,
void makeFractional(const std::shared_ptr<Box>& box, nb_array<float, nb::shape<-1, 3>> vecs,
nb_array<float, nb::shape<-1, 3>> out)
{
unsigned int Nvecs = vecs.shape(0);
Expand All @@ -25,7 +25,7 @@ void makeFractional(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-
box->makeFractional(vecs_data, Nvecs, out_data);
}

void getImages(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1, 3>> vecs,
void getImages(const std::shared_ptr<Box>& box, nb_array<float, nb::shape<-1, 3>> vecs,
nb_array<int, nb::shape<-1, 3>> images)
{
const unsigned int Nvecs = vecs.shape(0);
Expand All @@ -34,7 +34,7 @@ void getImages(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1, 3>
box->getImages(vecs_data, Nvecs, images_data);
}

void wrap(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1, 3>> vecs,
void wrap(const std::shared_ptr<Box>& box, nb_array<float, nb::shape<-1, 3>> vecs,
nb_array<float, nb::shape<-1, 3>> out)
{
const unsigned int Nvecs = vecs.shape(0);
Expand All @@ -43,7 +43,7 @@ void wrap(const std::shared_ptr<Box> &box, nb_array<float, nb::shape<-1, 3>> vec
box->wrap(vecs_data, Nvecs, out_data);
}

void unwrap(const std::shared_ptr<Box> &box, nb_array<float> vecs, nb_array<int> images, nb_array<float> out)
void unwrap(const std::shared_ptr<Box>& box, nb_array<float> vecs, nb_array<int> images, nb_array<float> out)
{
const unsigned int Nvecs = vecs.shape(0);
auto vecs_data = reinterpret_cast<vec3<float>*>(vecs.data());
Expand All @@ -52,7 +52,7 @@ void unwrap(const std::shared_ptr<Box> &box, nb_array<float> vecs, nb_array<int>
box->unwrap(vecs_data, images_data, Nvecs, out_data);
}

std::vector<float> centerOfMass(const std::shared_ptr<Box> &box, nb_array<float> vecs,
std::vector<float> centerOfMass(const std::shared_ptr<Box>& box, nb_array<float> vecs,
nb_array<float, nb::shape<-1>> masses)
{
const unsigned int Nvecs = vecs.shape(0);
Expand All @@ -62,15 +62,15 @@ std::vector<float> centerOfMass(const std::shared_ptr<Box> &box, nb_array<float>
return {com.x, com.y, com.z};
}

void center(const std::shared_ptr<Box> &box, nb_array<float> vecs, nb_array<float, nb::ndim<1>> masses)
void center(const std::shared_ptr<Box>& box, nb_array<float> vecs, nb_array<float, nb::ndim<1>> masses)
{
const unsigned int Nvecs = vecs.shape(0);
auto vecs_data = reinterpret_cast<vec3<float>*>(vecs.data());
auto reinterpret_cast<float*>(masses.data());
box->center(vecs_data, Nvecs, masses_data);
}

void computeDistances(const std::shared_ptr<Box> &box, nb_array<float> query_points, nb_array<float> points,
void computeDistances(const std::shared_ptr<Box>& box, nb_array<float> query_points, nb_array<float> points,
nb_array<float, nb::ndim<1>> distances)
{
const unsigned int n_query_points = query_points.shape(0);
Expand All @@ -85,8 +85,8 @@ void computeDistances(const std::shared_ptr<Box> &box, nb_array<float> query_poi
box->computeDistances(query_points_data, n_query_points, points_data, n_points, distances_data);
}

void computeAllDistances(const std::shared_ptr<Box> &box, nb_array<float> query_points, nb_array<float> points,
nb_array<float, nb::ndim<2>> distances)
void computeAllDistances(const std::shared_ptr<Box>& box, nb_array<float> query_points,
nb_array<float> points, nb_array<float, nb::ndim<2>> distances)
{
const unsigned int n_query_points = query_points.shape(0);
auto query_points_data = reinterpret_cast<vec3<float>*>(query_points.data());
Expand All @@ -96,7 +96,8 @@ void computeAllDistances(const std::shared_ptr<Box> &box, nb_array<float> query_
box->computeAllDistances(query_points_data, n_query_points, points_data, n_points, distances_data);
}

void contains(const std::shared_ptr<Box> &box, nb_array<float> points, nb_array<bool, nb::ndim<1>> contains_mask)
void contains(const std::shared_ptr<Box>& box, nb_array<float> points,
nb_array<bool, nb::ndim<1>> contains_mask)
{
const unsigned int n_points = points.shape(0);
auto points_data = reinterpret_cast<vec3<float>*>(points.data());
Expand Down

0 comments on commit 8434d9f

Please sign in to comment.