Skip to content

Commit

Permalink
Again fix code style (this commit will be merged with previous 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya-y committed May 13, 2024
1 parent e0e7ce4 commit 4c95ec1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/core/algorithms/fd/eulerfd/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ namespace algos {

void Cluster::ShuffleData(RandomStrategy rand) {
if (cluster_data_.size() == 0) {
return;
return;
}
for (size_t i = cluster_data_.size() - 1; i > 0; i--) {
std::swap(cluster_data_[i], cluster_data_[rand() % (i + 1)]);
std::swap(cluster_data_[i], cluster_data_[rand() % (i + 1)]);
}
}

Expand Down
20 changes: 10 additions & 10 deletions src/tests/test_fd_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ class ApproximateFDTest : public ::testing::Test {
// testing data
template <typename Alg>
struct ApproximateDatasets {
inline static std::vector<CSVConfigHash> const light_datasets_;
inline static std::vector<CSVConfigHash> const heavy_datasets_;
inline static std::vector<CSVConfigHash> const kLightDatasets;
inline static std::vector<CSVConfigHash> const kHeavyDatasets;
};

// specialization fd for EulerFD
template <>
struct ApproximateDatasets<algos::EulerFD> {
inline static std::vector<CSVConfigHash> const light_datasets_ = {{
inline static std::vector<CSVConfigHash> const kLightDataset = {{
{tests::kCIPublicHighway10k, 33398},
{tests::kNeighbors10k, 43368},
{tests::kWdcAstronomical, 2902}, // answer is 9 / 15
Expand All @@ -143,13 +143,13 @@ struct ApproximateDatasets<algos::EulerFD> {
{tests::kWdcKepler, 17294}, // empty answer, 0 clusters after stripping
}};

inline static std::vector<CSVConfigHash> const heavy_datasets_ = {
{{tests::kAdult, 23075},
{tests::kCIPublicHighway, 13035},
{tests::kEpicMeds, 26201}, // answer is 15 / 16
{tests::kEpicVitals, 2083},
{tests::kIowa1kk, 57837}, // answer is 2531 / 1584 (average 2k, it is bad seed :(
{tests::kLegacyPayors, 43612},
inline static std::vector<CSVConfigHash> const kHeavyDatasets = {{
{tests::kAdult, 23075},
{tests::kCIPublicHighway, 13035},
{tests::kEpicMeds, 26201}, // answer is 15 / 16
{tests::kEpicVitals, 2083},
{tests::kIowa1kk, 57837}, // answer is 2531 / 1584 (average 2k, it is bad seed :(
{tests::kLegacyPayors, 43612},
}};
};

Expand Down

0 comments on commit 4c95ec1

Please sign in to comment.