Skip to content

Commit 129d71a

Browse files
author
sitaras
committed
number_of_cluster isn't default, should be given from the user
1 parent 4c9d83d commit 129d71a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cluster.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
number_of_clusters: 4
1+
number_of_clusters: 1
22
number_of_vector_hash_tables: 5
33
number_of_vector_hash_functions: 6
44
max_number_M_hypercube: 1000

mainCluster.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ int main(int argc, char *argv[]) {
145145
k_LSH=4;
146146
w=W_VALUE;
147147
readConfFile(confFile,&numOfClusters,&l,&mHyper,&probes);
148-
if(numOfClusters==-1){
148+
while(numOfClusters<2){ // clusters number should be >=2
149+
if(numOfClusters<2)
150+
printf("\n(Clusters number should be >=2)\n");
149151
printf("\n>Number of clusters: ");
150152
fflush(stdin); // clear stdin buffer
151153
if (fgets(str, sizeof(char)*200, stdin) == NULL) { // read a command

0 commit comments

Comments
 (0)