MultiLatticeSearch: Remove reduced function
This commit is contained in:
@@ -105,25 +105,3 @@ std::vector<MultiLatticeSearchResult> MultiLatticeSearch(const std::vector<Cryst
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<MultiLatticeSearchResult> MultiLatticeSearchReduced(const std::vector<CrystalLattice> &lattices,
|
||||
float dist_tolerance,
|
||||
float angle_tolerance_deg) {
|
||||
if (lattices.empty())
|
||||
return {};
|
||||
|
||||
// Reduce lattice 0 to its primitive Niggli setting; that becomes the reference basis.
|
||||
std::vector<CrystalLattice> reduced;
|
||||
reduced.reserve(lattices.size());
|
||||
|
||||
// Reduce every candidate the same way so metric comparison and rotation
|
||||
// are all done in the reduced setting.
|
||||
for (const auto & lattice : lattices)
|
||||
reduced.push_back(lattice.NiggliReduce());
|
||||
|
||||
auto ret = MultiLatticeSearch(reduced, dist_tolerance, angle_tolerance_deg);
|
||||
|
||||
// Keep input_lattice pointing at the original (un-reduced) lattices for debugging.
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -22,12 +22,4 @@ struct MultiLatticeSearchResult {
|
||||
// proper rotation R mapping reference -> lattice and store output_lattice = R * reference.
|
||||
std::vector<MultiLatticeSearchResult> MultiLatticeSearch(const std::vector<CrystalLattice> &lattices,
|
||||
float dist_tolerance = 0.03f,
|
||||
float angle_tolerance_deg = 3.0f);
|
||||
|
||||
// Same as above, but first runs LatticeSearch on lattice 0 to obtain a
|
||||
// Niggli-reduced / conventional reference, and reduces every candidate the
|
||||
// same way before comparing/rotating. Rotations are returned in the reduced
|
||||
// reference setting.
|
||||
std::vector<MultiLatticeSearchResult> MultiLatticeSearchReduced(const std::vector<CrystalLattice> &lattices,
|
||||
float dist_tolerance = 0.03f,
|
||||
float angle_tolerance_deg = 3.0f);
|
||||
float angle_tolerance_deg = 3.0f);
|
||||
Reference in New Issue
Block a user