* installing *source* package ‘geokmeans’ ...
** this is package ‘geokmeans’ version ‘0.1.0’
** package ‘geokmeans’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
specified C++17
using C++ compiler: ‘g++ (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7)’
using C++17
make[1]: Entering directory '/data/gannet/ripley/R/packages/tests-devel/geokmeans/src'
g++ -std=gnu++17 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG -DGEOKM_R_BUILD -I'/data/gannet/ripley/R/test-dev/Rcpp/include' -I'/data/gannet/ripley/R/test-dev/RcppEigen/include' -I/usr/local/include -fpic -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Wp,-D_FORTIFY_SOURCE=3 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++17 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG -DGEOKM_R_BUILD -I'/data/gannet/ripley/R/test-dev/Rcpp/include' -I'/data/gannet/ripley/R/test-dev/RcppEigen/include' -I/usr/local/include -fpic -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Wp,-D_FORTIFY_SOURCE=3 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection -c kmeans_rcpp.cpp -o kmeans_rcpp.o
In file included from kmeans_rcpp.cpp:44:
IOutils.h: In function ‘std::pair<_ForwardIterator, _ForwardIterator> readSimulatedData(std::string, std::vector<std::vector<T> >&, std::vector<Tint>&, bool, bool)’:
IOutils.h:179:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
179 | if (head_present)
| ^~
IOutils.h:181:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
181 | numRows-=1;
| ^~~~~~~
In file included from kmeans_rcpp.cpp:45:
algo_utils.h: In member function ‘bool algorithm_utils::check_convergence(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, T1, float&, float&, int&, int&)’:
algo_utils.h:652:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
652 | for (j=0; j< new_centroids[i].size(); j++)
| ^~~
algo_utils.h:654:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
654 | diff += (temp_diff * temp_diff);
| ^~~~
In file included from kmeans_rcpp.cpp:53:
ball_kmeans_xf.h: At global scope:
ball_kmeans_xf.h:31:1: warning: ‘typedef’ was ignored in this declaration
31 | typedef struct Neighbor
| ^~~~~~~
ball_kmeans_xf.h: In function ‘bool check_convergence(MatrixOur&, MatrixOur&, float)’:
ball_kmeans_xf.h:97:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
97 | for (j=0; j<new_centroids.cols(); j++)
| ^~~
ball_kmeans_xf.h:99:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
99 | diff = diff + (temp_diff * temp_diff);
| ^~~~
ball_kmeans_xf.h: In function ‘float get_ballkm_sse(MatrixOur&, MatrixOur&, ClusterIndexVector, int)’:
ball_kmeans_xf.h:254:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
254 | for(int j = 0; j < cluster_point_index[i].size(); j++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ball_kmeans_xf.h: In function ‘output_data ball_k_means_Ring(MatrixOur&, bool, int, double, int, std::string, int)’:
ball_kmeans_xf.h:335:30: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
335 | while (iteration_counter < iters) {
| ~~~~~~~~~~~~~~~~~~^~~~~~~
ball_kmeans_xf.h:399:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
399 | for (int i = 0; i < clusters_neighbors_index[now_ball].size(); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ball_kmeans_xf.h:454:62: warning: comparison of integer expressions of different signedness: ‘Eigen::DenseCoeffsBase<Eigen::Matrix<int, -1, 1>, 1>::Scalar’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]
454 | if (labels[now_data_index[j - 1][i]] != new_label) {
ball_kmeans_xf.h:434:21: warning: unused variable ‘lenth’ [-Wunused-variable]
434 | int lenth = old_now_index.size();
| ^~~~~
ball_kmeans_xf.h: In function ‘MatrixOur ball_k_means_noRing(MatrixOur&, MatrixOur&, bool, double, int)’:
ball_kmeans_xf.h:581:30: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
581 | while (iteration_counter < iters) {
| ~~~~~~~~~~~~~~~~~~^~~~~~~
ball_kmeans_xf.h:646:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
646 | for (int i = 0; i < clusters_neighbors_index[now_ball].size(); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ball_kmeans_xf.h:692:51: warning: comparison of integer expressions of different signedness: ‘Eigen::DenseCoeffsBase<Eigen::Matrix<int, -1, 1>, 1>::Scalar’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]
692 | if (labels[now_data_index[i]] != new_label) {
ball_kmeans_xf.h:553:18: warning: variable ‘now_centers_rows’ set but not used [-Wunused-but-set-variable]
553 | unsigned int now_centers_rows;
| ^~~~~~~~~~~~~~~~
ball_kmeans_xf.h:570:10: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]
570 | auto start = std::chrono::high_resolution_clock::now();
| ^~~~~
ball_kmeans_xf.h: In function ‘MatrixOur cal_ring_dist_Ring(unsigned int, unsigned int, unsigned int, MatrixOur&, MatrixOur&, ClusterIndexVector&)’:
ball_kmeans_xf.h:1102:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
1102 | for(int k=0; k<dataset_cols;k++){
| ~^~~~~~~~~~~~~
In file included from annulus.h:12,
from kmeans_rcpp.cpp:51:
annulus_utils.h: In instantiation of ‘Tfloat annulus_utils::point_point_inner_product(std::vector<T>&) [with Tfloat = float]’:
annulus.h:38:51: required from here
38 | float temp = ann.point_point_inner_product(centroids[c1]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
annulus_utils.h:28:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
28 | for(int i=0; i< point.size(); i++){
| ~^~~~~~~~~~~~~~
In file included from kmeans_rcpp.cpp:47:
lloyd_kmeans.h: In instantiation of ‘output_data lloyd_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’:
kmeans_rcpp.cpp:134:31: required from here
134 | output_data r = lloyd_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lloyd_kmeans.h:36:17: warning: unused variable ‘pu’ [-Wunused-variable]
36 | print_utils pu;
| ^~
lloyd_kmeans.h:44:9: warning: unused variable ‘tt’ [-Wunused-variable]
44 | int tt = 1;
| ^~
In file included from kmeans_rcpp.cpp:49:
elkan.h: In instantiation of ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’:
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elkan.h:92:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
92 | for(i=0; i<cluster_count.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~
elkan.h:97:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
97 | for(i=0; i<dataset.size(); i++){
| ~^~~~~~~~~~~~~~~
elkan.h:110:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
110 | for(j=0 ; j< centroids.size(); j++){
| ~^~~~~~~~~~~~~~~~~~
elkan.h:182:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
182 | for(int i=0; i<assigned_clusters.size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
elkan.h:56:40: warning: unused variable ‘k’ [-Wunused-variable]
56 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
elkan.h:56:47: warning: unused variable ‘l’ [-Wunused-variable]
56 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
elkan.h:56:54: warning: unused variable ‘m’ [-Wunused-variable]
56 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
elkan.h:57:37: warning: unused variable ‘vec_sum’ [-Wunused-variable]
57 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0;
| ^~~~~~~
elkan.h:61:9: warning: unused variable ‘tt’ [-Wunused-variable]
61 | int tt = 1;
| ^~
elkan.h:67:16: warning: unused variable ‘dc_utils’ [-Wunused-variable]
67 | dckm_utils dc_utils;
| ^~~~~~~~
In file included from kmeans_rcpp.cpp:50:
hamerly.h: In instantiation of ‘output_data hamerly_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’:
kmeans_rcpp.cpp:156:33: required from here
156 | output_data r = hamerly_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hamerly.h:66:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
66 | for(i=0; i< cluster_count.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~~
hamerly.h:70:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
70 | for(i=0; i<dataset.size(); i++){
| ~^~~~~~~~~~~~~~~
hamerly.h:87:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
87 | for(j=0 ; j< centroids.size(); j++){
| ~^~~~~~~~~~~~~~~~~~
hamerly.h:109:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
109 | for(int i=0; i<assigned_clusters.size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
hamerly.h:38:40: warning: unused variable ‘k’ [-Wunused-variable]
38 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
hamerly.h:38:47: warning: unused variable ‘l’ [-Wunused-variable]
38 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
hamerly.h:38:54: warning: unused variable ‘m’ [-Wunused-variable]
38 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
hamerly.h:39:37: warning: unused variable ‘vec_sum’ [-Wunused-variable]
39 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0, max123 = 0, dist =0;
| ^~~~~~~
hamerly.h:42:9: warning: unused variable ‘tt’ [-Wunused-variable]
42 | int tt = 12;
| ^~
hamerly.h:48:16: warning: unused variable ‘dc_utils’ [-Wunused-variable]
48 | dckm_utils dc_utils;
| ^~~~~~~~
annulus.h: In instantiation of ‘output_data annulus(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’:
kmeans_rcpp.cpp:167:26: required from here
167 | output_data r = annulus(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
annulus.h:110:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
110 | for (int i = 0; i < dataset.size(); ++i) {
| ~~^~~~~~~~~~~~~~~~
annulus.h:135:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
135 | for(i=0; i< cluster_count.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~~
annulus.h:143:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
143 | for (int i = 0; i < dataset.size(); ++i) {
| ~~^~~~~~~~~~~~~~~~
annulus.h:199:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
199 | for(int i=0; i<assigned_clusters.size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
annulus.h:88:24: warning: unused variable ‘k’ [-Wunused-variable]
88 | Tint i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
annulus.h:88:31: warning: unused variable ‘l’ [-Wunused-variable]
88 | Tint i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
annulus.h:88:38: warning: unused variable ‘m’ [-Wunused-variable]
88 | Tint i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
annulus.h:89:37: warning: unused variable ‘vec_sum’ [-Wunused-variable]
89 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0, max = 0, dist2 =0;
| ^~~~~~~
annulus.h:89:50: warning: unused variable ‘max’ [-Wunused-variable]
89 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0, max = 0, dist2 =0;
| ^~~
annulus.h:97:9: warning: unused variable ‘v’ [-Wunused-variable]
97 | int v = 0;
| ^
In file included from kmeans_rcpp.cpp:52:
exponion.h: In instantiation of ‘output_data exponion(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’:
kmeans_rcpp.cpp:178:27: required from here
178 | output_data r = exponion(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exponion.h:107:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
107 | for(i=0; i< cluster_count.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~~
exponion.h:123:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
123 | for (int i = 0; i < dataset.size(); ++i) {
| ~~^~~~~~~~~~~~~~~~
exponion.h:170:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
170 | for(int i=0; i<assigned_clusters.size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
exponion.h:68:24: warning: unused variable ‘k’ [-Wunused-variable]
68 | Tint i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
exponion.h:68:31: warning: unused variable ‘l’ [-Wunused-variable]
68 | Tint i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
exponion.h:68:38: warning: unused variable ‘m’ [-Wunused-variable]
68 | Tint i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
exponion.h:69:37: warning: unused variable ‘vec_sum’ [-Wunused-variable]
69 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0, max = 0, dist2 =0;
| ^~~~~~~
exponion.h:69:50: warning: unused variable ‘max’ [-Wunused-variable]
69 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0, max = 0, dist2 =0;
| ^~~
exponion.h:72:19: warning: unused variable ‘ann’ [-Wunused-variable]
72 | annulus_utils ann;
| ^~~
exponion.h:87:9: warning: unused variable ‘tt’ [-Wunused-variable]
87 | int tt = 1;
| ^~
exponion.h:88:9: warning: unused variable ‘my_point’ [-Wunused-variable]
88 | int my_point = 424;
| ^~~~~~~~
In file included from kmeans_rcpp.cpp:48:
geokmeans.h: In instantiation of ‘output_data geokmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’:
kmeans_rcpp.cpp:189:28: required from here
189 | output_data r = geokmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokmeans.h:97:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
97 | for(int i=0; i<cluster_size.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~
geokmeans.h:58:10: warning: unused variable ‘my_cluster’ [-Wunused-variable]
58 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^~~~~~~~~~
geokmeans.h:58:40: warning: unused variable ‘k’ [-Wunused-variable]
58 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
geokmeans.h:58:47: warning: unused variable ‘l’ [-Wunused-variable]
58 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
geokmeans.h:58:54: warning: unused variable ‘m’ [-Wunused-variable]
58 | Tint my_cluster = 0, i = 0, j = 0, k = 0, l = 0, m = 0;
| ^
geokmeans.h:59:37: warning: unused variable ‘vec_sum’ [-Wunused-variable]
59 | Tfloat temp_diff = 0, diff = 0, vec_sum = 0;
| ^~~~~~~
algo_utils.h: In instantiation of ‘void algorithm_utils::init_centroids(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, T2, T2, std::string) [with T1 = float; T2 = int; std::string = std::__cxx11::basic_string<char>]’:
lloyd_kmeans.h:47:29: required from ‘output_data lloyd_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
47 | alg_utils.init_centroids(centroids, dataset, num_clusters, seed, init_type);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:134:31: required from here
134 | output_data r = lloyd_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:207:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
207 | for(j=0; j <dataset[i].size(); j++){
| ~~^~~~~~~~~~~~~~~~~~
algo_utils.h:214:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
214 | for(j=0; j<dataset[0].size(); j++){
| ~^~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘void algorithm_utils::calculate_distances(const std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, T2, std::vector<Tint>&, std::vector<std::vector<T> >&, long long unsigned int&) [with T1 = float; T2 = int]’:
lloyd_kmeans.h:49:34: required from ‘output_data lloyd_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
49 | alg_utils.calculate_distances(dataset, centroids,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
50 | num_clusters, assigned_clusters, cluster_size, dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:134:31: required from here
134 | output_data r = lloyd_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:354:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
354 | for (i=0; i < dataset.size(); i++){
| ~~^~~~~~~~~~~~~~~~
algo_utils.h:358:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
358 | for (j=0; j < centroids.size(); j++){
| ~~^~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘void algorithm_utils::update_centroids(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<Tint>&, std::vector<std::vector<T> >&, T2) [with T1 = float; T2 = int]’:
lloyd_kmeans.h:58:35: required from ‘output_data lloyd_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
58 | alg_utils.update_centroids(dataset, new_centroids, assigned_clusters,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 | cluster_size, numCols);
| ~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:134:31: required from here
134 | output_data r = lloyd_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:561:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
561 | for (index=0; index<dataset.size(); index++){
| ~~~~~^~~~~~~~~~~~~~~
algo_utils.h:569:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
569 | for(int i=0; i<new_centroids.size();i++){
| ~^~~~~~~~~~~~~~~~~~~~~
algo_utils.h:572:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
572 | for (j = 0; j < new_centroids[i].size(); j++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘bool algorithm_utils::check_convergence(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, T1, float&, float&, int&, int&) [with T1 = float]’:
lloyd_kmeans.h:63:40: required from ‘output_data lloyd_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
63 | if (alg_utils.check_convergence(new_centroids, centroids, threshold, diff, temp_diff, i, j)){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:134:31: required from here
134 | output_data r = lloyd_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:651:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
651 | for (i=0; i<new_centroids.size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~
algo_utils.h:652:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
652 | for (j=0; j< new_centroids[i].size(); j++)
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘void algorithm_utils::reinit(std::vector<std::vector<T> >&) [with T1 = float]’:
lloyd_kmeans.h:76:25: required from ‘output_data lloyd_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
76 | alg_utils.reinit(new_centroids);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
kmeans_rcpp.cpp:134:31: required from here
134 | output_data r = lloyd_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:115:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
115 | for(int i=0;i<container.size(); i++){
| ~^~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘void algorithm_utils::calculate_distances_test(const std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, T2, std::vector<Tint>&, long long unsigned int&) [with T1 = float; T2 = int]’:
elkan.h:72:39: required from ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
72 | alg_utils.calculate_distances_test(dataset, centroids,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
73 | num_clusters, assigned_clusters, dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:486:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
486 | for (i=0; i < dataset.size(); i++){
| ~~^~~~~~~~~~~~~~~~
algo_utils.h:491:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
491 | for (j=0; j < centroids.size(); j++){
| ~~^~~~~~~~~~~~~~~~~~
In file included from elkan.h:8:
elkan_utils.h: In instantiation of ‘void find_centroid_distances(const std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, long long unsigned int&) [with Tfloat = float]’:
elkan.h:86:32: required from ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
86 | find_centroid_distances(centroids, centroid_dists, closest_center_dist, dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elkan_utils.h:33:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
33 | for (int i=0; i<centroids.size(); i++){
| ~^~~~~~~~~~~~~~~~~
elkan_utils.h:37:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
37 | for (int j=i+1; j < centroids.size(); j++){
| ~~^~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘float algorithm_utils::calc_euclidean(const std::vector<T>&, const std::vector<T>&, long long unsigned int&) [with T1 = float]’:
elkan.h:132:52: required from ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
132 | dist = alg_utils.calc_euclidean(dataset[i], centroids[my_cluster], dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:288:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
288 | for (int i=0; i < point.size(); i++){
| ~~^~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘void algorithm_utils::update_centroids_ham(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<Tint>&, std::vector<int>&, T2, long long unsigned int&) [with T1 = float; T2 = int]’:
elkan.h:193:39: required from ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
193 | alg_utils.update_centroids_ham(dataset, new_centroids, centroids, centroid_motion,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194 | assigned_clusters, cluster_count, numCols, dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:621:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
621 | for (index=0; index<dataset.size(); index++){
| ~~~~~^~~~~~~~~~~~~~~
algo_utils.h:629:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
629 | for(int i=0; i<new_centroids.size();i++){
| ~^~~~~~~~~~~~~~~~~~~~~
algo_utils.h:633:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
633 | for (j = 0; j < new_centroids[i].size(); j++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘bool algorithm_utils::check_convergence_ub_lb(std::vector<T>&, T1, float&, float&, int&, int&) [with T1 = float]’:
elkan.h:197:46: required from ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
197 | if (alg_utils.check_convergence_ub_lb(centroid_motion, threshold, diff, temp_diff, i, j)){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:673:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
673 | for (i=0; i<centroids_movement.size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
elkan_utils.h: In instantiation of ‘void update_elk_bounds(std::vector<T>&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<Tint>&) [with Tfloat = float; Tint = int]’:
elkan.h:206:26: required from ‘output_data elkan_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
206 | update_elk_bounds(upper_bounds, lower_bounds, centroid_motion, assigned_clusters);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:145:31: required from here
145 | output_data r = elkan_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elkan_utils.h:59:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
59 | for (int i = 0; i < assigned_clusters.size(); i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
elkan_utils.h:62:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
62 | for (int j = 0; j<centroid_motion.size(); j++){
| ~^~~~~~~~~~~~~~~~~~~~~~~
In file included from geokmeans.h:9:
geokm_utils.h: In instantiation of ‘void find_closest_center(std::vector<std::vector<T> >&, std::vector<T>&, long long unsigned int&) [with Tfloat = float]’:
hamerly.h:61:28: required from ‘output_data hamerly_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
61 | find_closest_center(centroids, closest_center_dist, dist_counter);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:156:33: required from here
156 | output_data r = hamerly_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:161:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
161 | for (int i=0; i<closest_center_dist.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:164:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
164 | for (int i=0; i<centroids.size(); i++){
| ~^~~~~~~~~~~~~~~~~
geokm_utils.h:165:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
165 | for (int j=i+1; j<centroids.size(); j++){
| ~^~~~~~~~~~~~~~~~~
geokm_utils.h: In instantiation of ‘void update_bounds(std::vector<T>&, std::vector<T>&, std::vector<T>&, std::vector<Tint>&) [with Tfloat = float; Tint = int]’:
hamerly.h:127:22: required from ‘output_data hamerly_kmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
127 | update_bounds(upper_bound, lower_bound, centroid_motion, assigned_clusters);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:156:33: required from here
156 | output_data r = hamerly_kmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:642:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
642 | for (int i = 0; i < centroid_motion.size(); i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:655:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
655 | for (int i = 0; i < assigned_clusters.size(); i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h: In instantiation of ‘float calc_squared_dist(const std::vector<T>&, const std::vector<T>&) [with T1 = float]’:
annulus.h:154:41: required from ‘output_data annulus(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
154 | float u2 = calc_squared_dist(dataset[i], centroids[my_cluster]);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:167:26: required from here
167 | output_data r = annulus(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
algo_utils.h:308:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
308 | for (int i=0; i < point.size(); i++){
| ~~^~~~~~~~~~~~~~
geokm_utils.h: In instantiation of ‘void find_exp_neighbors(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<std::vector<std::pair<_T1, _T2> > >&, long long unsigned int&) [with TD = float; Tint = int]’:
exponion.h:101:27: required from ‘output_data exponion(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
101 | find_exp_neighbors(centroids, center_dist_mat, closest_center_dist, center_center_dist, dist_counter);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:178:27: required from here
178 | output_data r = exponion(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:443:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
443 | for (int i=0; i<closest_center.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:448:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
448 | for(curr_center=0; curr_center<centroids.size(); curr_center++){
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
geokm_utils.h:454:48: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
454 | for (ot_center=curr_center+1; ot_center<centroids.size();
| ~~~~~~~~~^~~~~~~~~~~~~~~~~
geokm_utils.h:437:8: warning: unused variable ‘radius’ [-Wunused-variable]
437 | TD radius = 0;
| ^~~~~~
geokm_utils.h:441:41: warning: unused variable ‘cnt’ [-Wunused-variable]
441 | int curr_center = 0, ot_center = 0, cnt = 0;
| ^~~
geokm_utils.h: In instantiation of ‘void find_neighbors(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<std::vector<T> >&, std::vector<std::vector<Tint> >&, std::vector<std::vector<std::vector<T> > >&, std::vector<std::vector<std::vector<T> > >&, long long unsigned int&) [with TD = float; TI = int]’:
geokmeans.h:92:23: required from ‘output_data geokmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
92 | find_neighbors(new_centroids, center_dist_mat, closest_center, cluster_size, neighbors,
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93 | mid_points, affine_vectors, dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:189:28: required from here
189 | output_data r = geokmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:193:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
193 | for (int i=0; i<closest_center.size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:198:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
198 | for(curr_center=0; curr_center<centroids.size(); curr_center++){
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
geokm_utils.h:202:48: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
202 | for (ot_center=curr_center+1; ot_center<centroids.size();
| ~~~~~~~~~^~~~~~~~~~~~~~~~~
geokm_utils.h:221:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
221 | for(curr_center=0; curr_center<centroids.size(); curr_center++){
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
geokm_utils.h:226:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<float> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
226 | for (ot_center=0; ot_center<centroids.size();
| ~~~~~~~~~^~~~~~~~~~~~~~~~~
geokm_utils.h:191:11: warning: unused variable ‘shortestDist2’ [-Wunused-variable]
191 | float shortestDist2 = 0;
| ^~~~~~~~~~~~~
geokm_utils.h: In instantiation of ‘void determine_data_expression(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<Tint>&, std::vector<std::vector<Tint> >&, std::vector<std::vector<std::vector<T> > >&, std::vector<std::vector<std::vector<T> > >&, long long unsigned int&, std::vector<Tint>&) [with Tfloat = float; Tint = int]’:
geokmeans.h:100:34: required from ‘output_data geokmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
100 | determine_data_expression(dataset, new_centroids, cluster_size, center_dist_mat, closest_center,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | assigned_clusters, neighbors, affine_vectors, mid_points,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102 | dist_counter, temp1);
| ~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:189:28: required from here
189 | output_data r = geokmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:501:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
501 | for (i = 0; i < assigned_clusters.size(); i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:522:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
522 | for (j=0; j<neighbors[my_cluster].size(); j++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h: In instantiation of ‘void find_midpoints(const std::vector<T>&, const std::vector<T>&, std::vector<std::vector<std::vector<T> > >&, std::vector<std::vector<std::vector<T> > >&, int&, int&) [with Tfloat = float]’:
geokm_utils.h:236:31: required from ‘void find_neighbors(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<std::vector<T> >&, std::vector<std::vector<Tint> >&, std::vector<std::vector<std::vector<T> > >&, std::vector<std::vector<std::vector<T> > >&, long long unsigned int&) [with TD = float; TI = int]’
236 | find_midpoints(centroids[curr_center], centroids[ot_center], mid_points, affine_vectors, curr_center, ot_center);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokmeans.h:92:23: required from ‘output_data geokmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
92 | find_neighbors(new_centroids, center_dist_mat, closest_center, cluster_size, neighbors,
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93 | mid_points, affine_vectors, dist_counter);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:189:28: required from here
189 | output_data r = geokmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:102:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
102 | for (int i=0; i<center1.size(); i++){
| ~^~~~~~~~~~~~~~~
geokm_utils.h: In instantiation of ‘bool find_context_direction(const std::vector<T>&, const std::vector<T>&, const std::vector<T>&, float&) [with Tfloat = float]’:
geokm_utils.h:526:39: required from ‘void determine_data_expression(std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<std::vector<T> >&, std::vector<T>&, std::vector<Tint>&, std::vector<std::vector<Tint> >&, std::vector<std::vector<std::vector<T> > >&, std::vector<std::vector<std::vector<T> > >&, long long unsigned int&, std::vector<Tint>&) [with Tfloat = float; Tint = int]’
526 | if (find_context_direction(dataset[i], affine_vectors[my_cluster][neighbors[my_cluster][j]],
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
527 | mid_points[my_cluster][neighbors[my_cluster][j]], temp_result)){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokmeans.h:100:34: required from ‘output_data geokmeans(std::vector<std::vector<T> >&, Tint, Tfloat, Tint, Tint, std::string, Tint) [with Tfloat = float; Tint = int; std::string = std::__cxx11::basic_string<char>]’
100 | determine_data_expression(dataset, new_centroids, cluster_size, center_dist_mat, closest_center,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | assigned_clusters, neighbors, affine_vectors, mid_points,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102 | dist_counter, temp1);
| ~~~~~~~~~~~~~~~~~~~~
kmeans_rcpp.cpp:189:28: required from here
189 | output_data r = geokmeans(X, num_clusters, static_cast<float>(threshold),
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190 | num_iterations, data.ncol(), init_type, seed);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geokm_utils.h:119:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
119 | for (int i=0; i<midpoint.size(); i++){
| ~^~~~~~~~~~~~~~~~
g++ -std=gnu++17 -shared -L/usr/local/lib64 -o geokmeans.so RcppExports.o kmeans_rcpp.o
make[1]: Leaving directory '/data/gannet/ripley/R/packages/tests-devel/geokmeans/src'
make[1]: Entering directory '/data/gannet/ripley/R/packages/tests-devel/geokmeans/src'
make[1]: Leaving directory '/data/gannet/ripley/R/packages/tests-devel/geokmeans/src'
installing to /data/gannet/ripley/R/packages/tests-devel/geokmeans.Rcheck/00LOCK-geokmeans/00new/geokmeans/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (geokmeans)