void NN2::next(){ //now you keep calling next() k times... while(k <= K){//general center: k>1 <<<<<<<<<<<<<<<<<<<<<<<<<<< //setup for general center: k>1 <<<<<<<<<<<<<<<<<<<<<<<<<<< auto r = max_line(ps_alphas); // get max alpha index cs.insert(r.first); //add pi to centers ps_alphas = min_c_dist(cs, ps); //update the clusters //ps.erase(r.first); //remove pi from points k++; } //setup for general<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< }
static void display_args(char **args) { int lin; int col; int scnt; lin = max_line(); col = max_col(); scnt = 1; while (args[scnt] != NULL) { ft_putendl(args[scnt]); ft_putchar('\n'); scnt++; } }