R Under development (unstable) (2024-09-15 r87152 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(supc) > supc:::.set_num_threads(2) > X <- structure( + c(-0.125290762148466, 2.03672866484442, 0.832874277517991, + 6.31905616042756, 8.06590155436307, 6.8359063231764, + 3.0974858104857, 5.14766494102584, 4.1151562703307, + 0.164244239019618, 2.1187802642435, 1.18379547432164, + 6.15642726014621, 8.01491299667304, 6.60212966082732, + 3.12396514957894, 4.9887742520942, 3.96884089865893, + -0.0788579907420699, 1.98813732065776, 1.22000507439678, + 6.15263514969151, 7.96709528074928, 6.9493276639727, + 3.13939267508095, 5.11133263973473, 3.8622488610901, + -0.0610776774312712, 0.30235623369017, 1.07796864728229, + -0.124248116108361, -0.4429399774355, 1.22498618362862, + 2.99101327819695, 2.99676194738021, 4.18876724213706, + -0.294150476779855, -0.0956300110217241, 1.08358831203994, + 0.271735910305809, -0.0205575454685991, 1.07753432231187, + 2.98923899188342, 2.72458808863428, 3.91700108734006, + -0.141499031392424, 0.0729163924273661, 1.15370658490308, + -0.0224692424300456, 0.176221545290843, 1.07962117607341, + 2.87759472134985, 3.06822393828489, 3.77412738078384 + ), + .Dim = c(27L, 2L) + ) > .group <- list( + c(1L, 2L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, + 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 2L), + c(1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 2L, + 1L, 1L, 2L, 2L, 1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+ c(2L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, + 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, + 2L) + ) > check.names.ref <- c("x", "r", "cluster", "centers", "size", "result", "iteration") > # Checking with reference object > > dist.mode("stats") > obj.supc1 <- tryCatch({ + supc1(X, r = 0.9, t = 0.75, verbose = TRUE) + }, error = function(e) { + if (conditionMessage(e) == supc:::.check.compatibility.error.msg) NULL else stop(conditionMessage(e)) + }) ....... difference: 0.25388110 ....... difference: 0.09405545 ....... difference: 0.00884583 ....... difference: 0.00006863 > obj.random.R <- supc.random(X, r = 0.9, t = 0.75, k = 2, implementation = "R", groups = .group, verbose = TRUE) difference: 0.20230519 difference: 0.11418938 difference: 0.14791505 difference: 0.07020309 difference: 0.08448187 difference: 0.05158926 difference: 0.00281246 difference: 0.00127380 difference: 0.00063267 difference: 0.00031840 difference: 0.00021305 difference: 0.00000421 > obj.random.cpp <- tryCatch({ + supc.random(X, r = 0.9, t = 0.75, k = 2, implementation = "cpp", groups = .group, verbose = TRUE) + }, error = function(e) { + if (conditionMessage(e) == supc:::.check.compatibility.error.msg) NULL else stop(conditionMessage(e)) + }) The number of thread is: 2 ........... difference: 0.20230519 ........... difference: 0.11418938 ........... difference: 0.14791505 ........... difference: 0.07020309 ........... difference: 0.08448187 ........... difference: 0.05158926 ........... difference: 0.00281246 ........... difference: 0.00127380 ........... difference: 0.00063267 ........... difference: 0.00031840 ........... difference: 0.00021305 ........... difference: 0.00000421 > > if (!is.null(obj.supc1) & !is.null(obj.random.cpp)) { + stopifnot(isTRUE(all.equal(obj.supc1$cluster, obj.random.R$cluster))) + stopifnot(isTRUE(all.equal(obj.supc1$cluster, obj.random.cpp$cluster))) + + stopifnot(isTRUE(all.equal(obj.random.R[check.names.ref], obj.random.cpp[check.names.ref]))) + stopifnot(is.null(obj.supc1$d0)) + stopifnot(is.null(obj.random.cpp$d0)) + } > > > stopif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, k = .k, implementation = "cpp", groups = .group, verbose = TRUE) + ) + }, error = function(e) { + if (conditionMessage(e) == supc:::.check.compatibility.error.msg) NULL else stop(conditionMessage(e)) + }) difference: 0.00000000 difference: 0.24393929 difference: 0.27910258 difference: 0.38114416 difference: 0.33359407 difference: 0.41561139 difference: 0.31273945 difference: 0.30986700 difference: 0.34244138 difference: 0.29767232 difference: 0.31487758 difference: 0.26383323 difference: 0.35527306 difference: 0.14479255 difference: 0.16425375 difference: 0.09516801 difference: 0.11711917 difference: 0.07617148 difference: 0.03557076 difference: 0.04341712 difference: 0.02871105 difference: 0.00844730 difference: 0.01156890 difference: 0.00624125 difference: 0.00544879 difference: 0.00069102 difference: 0.00054002 difference: 0.00028785 difference: 0.00018615 difference: 0.00008007 difference: 0.25130771 difference: 0.27910258 difference: 0.35610161 difference: 0.33289284 difference: 0.34224957 difference: 0.30202932 difference: 0.23486294 difference: 0.29826733 difference: 0.26207453 difference: 0.18909875 difference: 0.17836196 difference: 0.21258040 difference: 0.09900363 difference: 0.08066756 difference: 0.04144030 difference: 0.04628254 difference: 0.03278356 difference: 0.01778176 difference: 0.02413114 difference: 0.01141584 difference: 0.00418053 difference: 0.00298156 difference: 0.00200721 difference: 0.00186948 difference: 0.00021047 difference: 0.00016656 difference: 0.00006375 The number of thread is: 2 .......................... difference: 0.00000000 The number of thread is: 2 .......................... difference: 0.24393929 .......................... difference: 0.27910258 .......................... difference: 0.38114416 .......................... difference: 0.33359407 .......................... difference: 0.41561139 .......................... difference: 0.31273945 .......................... difference: 0.30986700 .......................... difference: 0.34244138 .......................... difference: 0.29767232 .......................... difference: 0.31487758 .......................... difference: 0.26383323 .......................... difference: 0.35527306 .......................... difference: 0.14479255 .......................... difference: 0.16425375 .......................... difference: 0.09516801 .......................... difference: 0.11711917 .......................... difference: 0.07617148 .......................... difference: 0.03557076 .......................... difference: 0.04341712 .......................... difference: 0.02871105 .......................... difference: 0.00844730 .......................... difference: 0.01156890 .......................... difference: 0.00624125 .......................... difference: 0.00544879 .......................... difference: 0.00069102 .......................... difference: 0.00054002 .......................... difference: 0.00028785 .......................... difference: 0.00018615 .......................... difference: 0.00008007 The number of thread is: 2 .......................... difference: 0.25130771 .......................... difference: 0.27910258 .......................... difference: 0.35610161 .......................... difference: 0.33289284 .......................... difference: 0.34224957 .......................... difference: 0.30202932 .......................... difference: 0.23486294 .......................... difference: 0.29826733 .......................... difference: 0.26207453 .......................... difference: 0.18909875 .......................... difference: 0.17836196 .......................... difference: 0.21258040 .......................... difference: 0.09900363 .......................... difference: 0.08066756 .......................... difference: 0.04144030 .......................... difference: 0.04628254 .......................... difference: 0.03278356 .......................... difference: 0.01778176 .......................... difference: 0.02413114 .......................... difference: 0.01141584 .......................... difference: 0.00418053 .......................... difference: 0.00298156 .......................... difference: 0.00200721 .......................... difference: 0.00186948 .......................... difference: 0.00021047 .......................... difference: 0.00016656 .......................... difference: 0.00006375 > if (!is.null(objs)) { + stopifnot(sapply(objs, class) == "supclist") + stopifnot(sapply(objs, length) == 3) + check.names.ref <- c("x", "r", "cluster", "centers", "size", "iteration", "result") + stopifnot(isTRUE(all.equal( + objs[[1]][[1]][check.names.ref], + objs[[2]][[1]][check.names.ref] + ))) + stopifnot(isTRUE(all.equal( + objs[[1]][[2]][check.names.ref], + objs[[2]][[2]][check.names.ref] + ))) + stopifnot(isTRUE(all.equal( + objs[[1]][[3]][check.names.ref], + objs[[2]][[3]][check.names.ref] + ))) + } > > proc.time() user system elapsed 0.39 0.06 0.45