Updated clang format, and restored dsd file handling that was actually broken
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user