Updated clang format, and restored dsd file handling that was actually broken

This commit is contained in:
emeric
2025-09-21 17:27:07 +02:00
parent 3c7f0f67cc
commit 53391e37e8
42 changed files with 205 additions and 202 deletions
+3 -3
View File
@@ -36,9 +36,9 @@ namespace lms::som
const T mean{ std::accumulate(vec.begin(), vec.end(), T{}) / size };
return std::accumulate(vec.begin(), vec.end(), T{},
[mean, size](T accumulator, const T& val) {
return accumulator + ((val - mean) * (val - mean) / (size - 1));
});
[mean, size](T accumulator, const T& val) {
return accumulator + ((val - mean) * (val - mean) / (size - 1));
});
}
DataNormalizer::DataNormalizer(std::size_t inputDimCount)
+6 -6
View File
@@ -212,9 +212,9 @@ namespace lms::som
for (const Position& neighbourPosition : neighboursPosition)
{
auto min = std::min_element(refVectorsPosition.begin(), refVectorsPosition.end(),
[this, neighbourPosition](const auto& a, const auto& b) {
return (this->getRefVectorsDistance(a, neighbourPosition) < this->getRefVectorsDistance(b, neighbourPosition));
});
[this, neighbourPosition](const auto& a, const auto& b) {
return (this->getRefVectorsDistance(a, neighbourPosition) < this->getRefVectorsDistance(b, neighbourPosition));
});
InputVector::Distance distance{ getRefVectorsDistance(neighbourPosition, *min) };
if (distance > maxDistance)
@@ -227,9 +227,9 @@ namespace lms::som
return std::nullopt;
auto min{ std::min_element(std::cbegin(neighboursInfo), std::cend(neighboursInfo),
[&](const auto& a, const auto& b) {
return a.distance < b.distance;
}) };
[&](const auto& a, const auto& b) {
return a.distance < b.distance;
}) };
return min->position;
}