Skip to content

Commit

Permalink
3 fix compilation for macos (#4)
Browse files Browse the repository at this point in the history
* Remove useless imports

* Remove the randomness class

* Forgot to use seed
  • Loading branch information
giuliabaldini authored Jun 24, 2024
1 parent 662fd48 commit 361f2e3
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 91 deletions.
11 changes: 0 additions & 11 deletions bico/_core.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
#include <Python.h>

#include <iostream>
#include <sstream>
#include <fstream>
#include <random>
#include <ctime>
#include <time.h>

#include "point/l2metric.h"
#include "point/squaredl2metric.h"
#include "point/point.h"
#include "point/pointweightmodifier.h"
#include "clustering/bico.h"
#include "misc/randomness.h"
#include "misc/randomgenerator.h"
#include "datastructure/proxysolution.h"
#include "point/pointcentroid.h"
#include "point/pointweightmodifier.h"
#include "point/realspaceprovider.h"

typedef unsigned int uint;

Expand Down
4 changes: 1 addition & 3 deletions bico/clustering/bico.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "../datastructure/proxysolution.h"
#include "../evaluation/kmeansevaluator.h"
#include "../exception/invalidruntimeconfigurationexception.h"
#include "../misc/randomness.h"

namespace CluE
{
Expand Down Expand Up @@ -541,8 +540,7 @@ minDist(std::numeric_limits<double>::infinity()),
pairwise_different(0),
numOfRebuilds(0)
{
Randomness::initialize(seed);
RandomGenerator rg = Randomness::getRandomGenerator();
std::mt19937 rg(seed);
std::vector<double> rndpoint(dimension);
rndprojections.resize(L);
bucket_radius.resize(L);
Expand Down
35 changes: 0 additions & 35 deletions bico/misc/randomgenerator.h

This file was deleted.

5 changes: 0 additions & 5 deletions bico/misc/randomness.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions bico/misc/randomness.h

This file was deleted.

1 change: 0 additions & 1 deletion build_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
name="bico._core",
sources=[
"bico/_core.cpp",
"bico/misc/randomness.cpp",
"bico/point/pointcentroid.cpp",
"bico/point/squaredl2metric.cpp",
"bico/point/point.cpp",
Expand Down

0 comments on commit 361f2e3

Please sign in to comment.