Loading...
Searching...
No Matches
EmdDistance.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3// See LICENSE for details.
4
5#ifndef GPR_AUXILIARY_DISTANCE_EMDDISTANCE_H_
6#define GPR_AUXILIARY_DISTANCE_EMDDISTANCE_H_
7
8#include "../Distance.h"
9#include "DistanceBase.h"
10
11namespace aux::distance {
12
15class EmdDistance : public DistanceBase {
16public:
17 void distance(const gpr::Coord& x1, const gpr::Coord& x2,
18 const gpr::AtomsConfiguration& conf_info,
19 gpr::FieldMatrixd& dist) const override
20 {
21 aux::Distance engine;
22 engine.dist_emd(x1, x2, conf_info, dist);
23 }
24};
25
26} // namespace aux::distance
27
28#endif
Methods to calculate distances between atoms.
Definition Distance.h:154
void dist_emd(const gpr::Coord &x1, const gpr::Coord &x2, const gpr::AtomsConfiguration &conf_info, gpr::FieldMatrixd &dist)
Calculates the Earth Mover's Distance between sets of configurations.
void distance(const gpr::Coord &x1, const gpr::Coord &x2, const gpr::AtomsConfiguration &conf_info, gpr::FieldMatrixd &dist) const override
Pairwise distances between the rows of x1 and the rows of x2.
Definition EmdDistance.h:17
FieldMatrixd Coord
Definition Macros.h:35
Eigen::Matrix< double, EigenDynamic, EigenDynamic, FieldMatrixStorage > FieldMatrixd
Definition Macros.h:25
Stores configurations of all atoms in the system.
Definition Structures.h:832