16#include <parallel/algorithm>
23 static int CLUSTER_SAMPLE_SIZE;
29 dsu(
ui size): fa(size) {
30 std::iota(fa.begin(), fa.end(), 0);
34 return fa[x] == x ? x : fa[x] = find(fa[x]);
37 void unite(
int x,
int y) {
38 fa[find(x)] = find(y);
50 static std::pair<double, double> getStat(
const std::vector<std::pair<int, int>> &pairs,
const std::vector<ui> &idMapA,
51 const std::vector<ui> &idMapB);
52 static void step2Sample(
const std::string &blkAttr,
double step2Tau, std::vector<std::pair<int, int>> &pairs,
53 const Table &tableA,
const Table &tableB,
const std::vector<ui> &idMapA,
54 const std::vector<ui> &idMapB,
bool isRS);
58 static void clusterSampleSelf(
const std::string &blkAttr,
double clusterTau,
double blkTau,
59 const std::string &pathTableA,
const std::string &pathTableB,
60 const std::string &defaultOutputDir =
"");
65 static void clusterSampleRS(
const std::string &blkAttr,
double clusterTau,
double blkTau,
double step2Tau,
66 const std::string &pathTableA,
const std::string &pathTableB,
67 const std::string &defaultOutputDir =
"");
70 static void downSample(
ui n,
ui y,
const std::string &blkAttr,
bool isRS,
71 const std::string &pathTableA,
const std::string &pathTableB,
72 const std::string &defaultOutputDir =
"");
80 static void preSample(
ui n,
int datanum,
const std::string &blkAttr,
const std::string &pathZ,
81 const std::string &pathY,
const std::string &defaultOutputDir =
"");
static void clusterSampleSelf(const std::string &blkAttr, double clusterTau, double blkTau, const std::string &pathTableA, const std::string &pathTableB, const std::string &defaultOutputDir="")
Definition sample.cc:10
static void clusterSampleRS(const std::string &blkAttr, double clusterTau, double blkTau, double step2Tau, const std::string &pathTableA, const std::string &pathTableB, const std::string &defaultOutputDir="")
Definition sample.cc:231
Sample(Sample &&other)=delete
static void preSample(ui n, int datanum, const std::string &blkAttr, const std::string &pathZ, const std::string &pathY, const std::string &defaultOutputDir="")
Definition sample.cc:322
static void downSample(ui n, ui y, const std::string &blkAttr, bool isRS, const std::string &pathTableA, const std::string &pathTableB, const std::string &defaultOutputDir="")
Definition sample.cc:292
Sample(const Sample &other)=delete
Definition dataframe.h:19
unsigned int ui
Definition type.h:8