==43205== Memcheck, a memory error detector ==43205== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==43205== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==43205== Command: /data/blackswan/ripley/R/R-devel-vg/bin/exec/R --vanilla ==43205== R Under development (unstable) (2017-10-23 r73595) -- "Unsuffered Consequences" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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. Natural language support but running in an English locale 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. > pkgname <- "gmum.r" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('gmum.r') > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > cleanEx() > nameEx("CEC") > ### * CEC > > flush(stderr()); flush(stdout()) > > ### Name: CEC > ### Title: Cross-Entropy Clustering > ### Aliases: CEC > > ### ** Examples > > ## Not run: > ##D CEC(k=3, x=dataset) > ##D > ##D CEC(k=3, x=dataset, control.nstart=10, method.type='spherical', control.eps=0.05) > ##D > ##D CEC(k=2, x=dataset, method.type='spherical', method.init='centroids', > ##D params.centroids=list(c(-0.5,0.5),c(0,0))) > ##D > ##D CEC(k=5, x=dataset, method.type='fixed_spherical', params.r=0.01, > ##D control.nstart=10, control.eps=0.07) > ##D > ##D CEC(k=5, x=dataset, method.type='fixed_covariance', > ##D params.cov=matrix(c(0.03,0,0,0.01),2), control.nstart=10, control.eps=0.06) > ##D > ##D CEC(k=1, x=dataset, method.type='func', > ##D params.function='name_of_my_own_function') > ##D > ##D fixed_spherical_cluster_param = list(method.type = 'fixed_spherical', params.r = 0.001), > ##D covariance_cluster_param = list(method.type = 'fixed_covariance', > ##D params.cov=matrix(c(0.05, 0, 0, 0.001), 2)) > ##D CEC(x = dataset, params.mix = list(covariance_cluster_param, > ##D fixed_spherical_cluster_param, fixed_spherical_cluster_param, > ##D fixed_spherical_cluster_param, fixed_spherical_cluster_param), control.nstart = 10) > ##D > ##D p1 = list(method.type='spherical', k=3) > ##D p2 = list(method.type='diagonal', k=2) > ##D CEC(x=dataset, params.mix=list(p1, p2)) > ## End(Not run) > > > > cleanEx() > nameEx("calculateCentroids") > ### * calculateCentroids > > flush(stderr()); flush(stdout()) > > ### Name: calculateCentroids > ### Title: calculateCentroids > ### Aliases: calculateCentroids > > ### ** Examples > > ## Not run: > ##D gng <- GNG(gng.preset.sphere(100)) > ##D print(node(gng, calculateCentroids(gng)[1])$pos) > ## End(Not run) > > > > cleanEx() > nameEx("caret.gmumSvmLinear") > ### * caret.gmumSvmLinear > > flush(stderr()); flush(stdout()) > > ### Name: caret.gmumSvmLinear > ### Title: Caret model representation for SVM with linear kernel > ### Aliases: caret.gmumSvmLinear > ### Keywords: datasets > > ### ** Examples > > ## Not run: > ##D model <- train(Class ~ ., data = training, > ##D method = caret.gmumSvmLinear, > ##D preProc = c("center", "scale"), > ##D tuneLength = 8, > ##D trControl = fitControl, > ##D tuneGrid = expand.grid(C=10^(c(-4:4)), gamma=10^(c(-4:4))), > ##D core = "libsvm", # gmum.R parameter - pick library > ##D verbosity = 0 # no outputs > ##D ) > ## End(Not run) > > > > cleanEx() > nameEx("caret.gmumSvmPoly") > ### * caret.gmumSvmPoly > > flush(stderr()); flush(stdout()) > > ### Name: caret.gmumSvmPoly > ### Title: Caret model representation for SVM with linear kernel > ### Aliases: caret.gmumSvmPoly > ### Keywords: datasets > > ### ** Examples > > ## Not run: > ##D model <- train(Class ~ ., data = training, > ##D method = caret.gmumSvmPoly, > ##D preProc = c("center", "scale"), > ##D tuneLength = 8, > ##D trControl = fitControl, > ##D tuneGrid = expand.grid(C=10^(c(-4:4)), gamma=10^(c(-4:4))), > ##D core = "libsvm", # gmum.R parameter - pick library > ##D verbosity = 0 # no outputs > ##D ) > ## End(Not run) > > > > cleanEx() > nameEx("caret.gmumSvmRadial") > ### * caret.gmumSvmRadial > > flush(stderr()); flush(stdout()) > > ### Name: caret.gmumSvmRadial > ### Title: Caret model representation for SVM with radial kernel > ### Aliases: caret.gmumSvmRadial > ### Keywords: datasets > > ### ** Examples > > ## Not run: > ##D model <- train(Class ~ ., data = training, > ##D method = caret.gmumSvmRadial, > ##D preProc = c("center", "scale"), > ##D tuneLength = 8, > ##D trControl = fitControl, > ##D tuneGrid = expand.grid(C=10^(c(-4:4)), gamma=10^(c(-4:4))), > ##D core = "libsvm", # gmum.R parameter - pick library > ##D verbosity = 0 # no outputs > ##D ) > ## End(Not run) > > > > cleanEx() > nameEx("centers") > ### * centers > > flush(stderr()); flush(stdout()) > > ### Name: centers > ### Title: centers > ### Aliases: centers centers,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D centers(c) > ## End(Not run) > > > > cleanEx() > nameEx("clustering-methods") > ### * clustering-methods > > flush(stderr()); flush(stdout()) > > ### Name: clustering > ### Title: clustering > ### Aliases: clustering clustering.Rcpp_CecModel clustering.Rcpp_GNGServer > > ### ** Examples > > ## Not run: > ##D clustering(c) > ## End(Not run) > ## Not run: > ##D clustering(c) > ## End(Not run) > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > clustering(gng) [1] 5 53 39 69 101 41 80 82 126 79 21 18 5 59 6 7 112 95 [19] 75 109 127 54 32 76 66 133 57 31 73 122 68 87 13 65 51 116 [37] 83 27 93 1 42 50 4 89 136 30 90 11 20 16 55 126 37 28 [55] 3 49 35 144 89 85 191 112 34 2 10 165 22 3 71 38 25 61 [73] 44 14 166 17 29 112 67 146 86 48 45 8 9 23 93 63 40 173 [91] 12 26 52 114 107 70 74 47 132 19 > > > > cleanEx() > nameEx("covMatrix") > ### * covMatrix > > flush(stderr()); flush(stdout()) > > ### Name: covMatrix > ### Title: covMatrix > ### Aliases: covMatrix covMatrix,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D covMatrix(c) > ## End(Not run) > > > > cleanEx() > nameEx("energy") > ### * energy > > flush(stderr()); flush(stdout()) > > ### Name: energy > ### Title: energy > ### Aliases: energy energy,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D energy(c) > ## End(Not run) > > > > cleanEx() > nameEx("errorStatistics") > ### * errorStatistics > > flush(stderr()); flush(stdout()) > > ### Name: errorStatistics > ### Title: errorStatistics > ### Aliases: errorStatistics > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > errorStatistics(gng) [1] 1.906907e-01 1.356672e-01 9.009277e-02 8.310644e-02 6.809506e-02 [6] 6.304455e-02 6.391535e-02 4.638122e-02 4.777854e-02 3.566630e-02 [11] 3.455739e-02 3.561190e-02 2.999317e-02 2.282268e-02 1.967010e-02 [16] 1.721363e-02 1.574564e-02 1.362679e-02 1.225303e-02 9.951784e-03 [21] 9.227304e-03 7.739302e-03 6.694677e-03 5.513128e-03 5.066045e-03 [26] 4.793951e-03 3.944235e-03 3.782047e-03 3.115513e-03 2.832403e-03 [31] 2.645440e-03 2.372520e-03 2.735199e-03 2.363496e-03 1.861255e-03 [36] 1.871032e-03 2.045189e-03 1.604367e-03 1.603538e-03 1.459247e-03 [41] 1.205325e-03 1.069454e-03 9.589522e-04 8.181746e-04 6.674468e-04 [46] 6.222075e-04 5.345222e-04 5.327427e-04 4.362633e-04 3.654881e-04 [51] 3.100395e-04 2.834068e-04 2.764903e-04 2.407488e-04 1.985787e-04 [56] 1.414679e-04 1.202736e-04 1.197921e-04 7.954914e-05 7.279618e-05 [61] 5.999713e-05 4.896054e-05 4.370984e-05 4.603231e-05 3.207924e-05 [66] 2.940099e-05 2.493490e-05 2.595008e-05 2.566265e-05 2.008600e-05 > > > > cleanEx() > nameEx("findClosests") > ### * findClosests > > flush(stderr()); flush(stdout()) > > ### Name: findClosests > ### Title: findClosests > ### Aliases: findClosests > > ### ** Examples > > ## Not run: > ##D gng <- GNG(gng.preset.sphere(100)) > ##D # Find closest centroid to c(1,1,1) > ##D found.centroids <- calculateCentroids(gng) > ##D findClosests(gng, found.centroids, c(1,1,1)) > ## End(Not run) > > > > cleanEx() > nameEx("getDataset") > ### * getDataset > > flush(stderr()); flush(stdout()) > > ### Name: getDataset > ### Title: getDataset > ### Aliases: getDataset getDataset,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D getDataset(c) > ## End(Not run) > > > > cleanEx() > nameEx("gng") > ### * gng > > flush(stderr()); flush(stdout()) > > ### Name: GNG > ### Title: Constructor of GrowingNeuralGas object. > ### Aliases: GNG > > ### ** Examples > > ## Not run: > ##D X <- gng.preset.sphere(100) > ##D y <- round(runif(100)) > ##D # Train in an offline manner > ##D gng <- GNG(X, labels=y, max.nodes=20) > ##D # Plot > ##D plot(gng) > ##D > ##D # Train in an online manner with utility (erasing obsolete nodes) > ##D gng <- GNG(max.nodes=20, train.online=TRUE, k=1.3, dim=3) > ##D insertExamples(gng, X, labels=y) > ##D run(gng) > ##D Sys.sleep(10) > ##D terminate(gng) > ##D # Plot > ##D plot(gng) > ## End(Not run) > > > > cleanEx() > nameEx("gng.preset.cube") > ### * gng.preset.cube > > flush(stderr()); flush(stdout()) > > ### Name: gng.preset.cube > ### Title: gng.preset.cube > ### Aliases: gng.preset.cube > > ### ** Examples > > X <- gng.preset.cube(100) > gng <- GNG(X) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > > > > cleanEx() > nameEx("gng.preset.plane") > ### * gng.preset.plane > > flush(stderr()); flush(stdout()) > > ### Name: gng.preset.plane > ### Title: gng.preset.plane > ### Aliases: gng.preset.plane > > ### ** Examples > > X <- gng.preset.plane(100) > gng <- GNG(X) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > > > > cleanEx() > nameEx("gng.preset.sphere") > ### * gng.preset.sphere > > flush(stderr()); flush(stdout()) > > ### Name: gng.preset.sphere > ### Title: gng.preset.sphere > ### Aliases: gng.preset.sphere > > ### ** Examples > > X <- gng.preset.sphere(100) > gng <- GNG(X) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > > > > cleanEx() > nameEx("insertExamples") > ### * insertExamples > > flush(stderr()); flush(stdout()) > > ### Name: insertExamples > ### Title: insertExamples > ### Aliases: insertExamples > > ### ** Examples > > X <- gng.preset.sphere(100) > gng <- GNG(X, train.online=TRUE) it is advised to scale data for optimal algorithm behavior to mean=1 std=0 > # Add more examples > X = gng.preset.sphere(100) > insertExamples(gng, X) it is advised to scale data for optimal algorithm behavior to mean=1 std=0 > ==43205== Thread 2: ==43205== Invalid read of size 8 ==43205== at 0x1CF528C0: gmum::RAMGNGGraph::get_dist(double const*, double const*) const (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_graph.hpp:117) ==43205== by 0x1CF3656D: gmum::GNGAlgorithm::_getNearestNeurons(double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:837) ==43205== by 0x1CF366ED: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:302) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e927e18 is 792 bytes inside a block of size 2,400 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== ==43205== Invalid read of size 8 ==43205== at 0x1CF528D9: gmum::RAMGNGGraph::get_dist(double const*, double const*) const (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_graph.hpp:116) ==43205== by 0x1CF3656D: gmum::GNGAlgorithm::_getNearestNeurons(double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:837) ==43205== by 0x1CF366ED: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:302) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e927e28 is 808 bytes inside a block of size 2,400 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== ==43205== Invalid read of size 8 ==43205== at 0x1CF528C5: gmum::RAMGNGGraph::get_dist(double const*, double const*) const (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_graph.hpp:117) ==43205== by 0x1CF36736: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:308) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e927e18 is 792 bytes inside a block of size 2,400 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== ==43205== Invalid read of size 8 ==43205== at 0x1CF36790: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:332) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e927e18 is 792 bytes inside a block of size 2,400 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== ==43205== Invalid read of size 8 ==43205== at 0x1CF367C6: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:336) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e1ad388 is 264 bytes inside a block of size 800 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57B00: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:163) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57B00: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:163) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== ==43205== Invalid read of size 8 ==43205== at 0x1CF36868: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:349) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e927e18 is 792 bytes inside a block of size 2,400 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57AE2: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:154) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== ==43205== Invalid read of size 8 ==43205== at 0x1CF36915: gmum::GNGAlgorithm::adapt(double const*, double const*) (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:355) ==43205== by 0x1CF37BDD: gmum::GNGAlgorithm::runAlgorithm() (packages/tests-vg/gmum.r/src/gng/gng_algorithm.cpp:614) ==43205== by 0x1CF530E0: GNGServer::_run(void*) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_server.h:144) ==43205== by 0x1CF3098E: tthread::thread::wrapper_function(void*) (packages/tests-vg/gmum.r/src/utils/tinythread.cpp:169) ==43205== by 0x730336C: start_thread (in /usr/lib64/libpthread-2.25.so) ==43205== by 0x762BBBE: clone (in /usr/lib64/libc-2.25.so) ==43205== Address 0x1e1ad388 is 264 bytes inside a block of size 800 free'd ==43205== at 0x4C301E8: operator delete(void*) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/ext/new_allocator.h:125) ==43205== by 0x1CF5319E: deallocate (/usr/include/c++/7/bits/alloc_traits.h:462) ==43205== by 0x1CF5319E: _M_deallocate (/usr/include/c++/7/bits/stl_vector.h:180) ==43205== by 0x1CF5319E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:78) ==43205== by 0x1CF57B00: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:163) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== Block was alloc'd at ==43205== at 0x4C2F1CA: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.13.0/coregrind/m_replacemalloc/vg_replace_malloc.c:334) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/ext/new_allocator.h:111) ==43205== by 0x1CF5316E: allocate (/usr/include/c++/7/bits/alloc_traits.h:436) ==43205== by 0x1CF5316E: _M_allocate (/usr/include/c++/7/bits/stl_vector.h:172) ==43205== by 0x1CF5316E: _M_allocate_and_copy > (/usr/include/c++/7/bits/stl_vector.h:1260) ==43205== by 0x1CF5316E: std::vector >::reserve(unsigned long) (/usr/include/c++/7/bits/vector.tcc:73) ==43205== by 0x1CF57B00: gmum::GNGDatasetSimple::insertExamples(double const*, double const*, double const*, unsigned int) (packages/tests-vg/gmum.r/src/../inst/include/gng/gng_dataset.h:163) ==43205== by 0x1CF4D145: GNGServer::insertExamples(double*, double*, double*, unsigned int, unsigned int) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:263) ==43205== by 0x1CF52109: GNGServer::RinsertLabeledExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:427) ==43205== by 0x1CF5244D: GNGServer::RinsertExamples(Rcpp::Matrix<14, Rcpp::PreserveStorage>&) (packages/tests-vg/gmum.r/src/gng/gng_server.cpp:383) ==43205== by 0x1CF44EE9: Rcpp::CppMethod1&>::operator()(GNGServer*, SEXPREC**) (R-devel/site-library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:130) ==43205== by 0x1CF47414: Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) (R-devel/site-library/Rcpp/include/Rcpp/module/class.h:212) ==43205== by 0x154B6043: CppMethod__invoke_void(SEXPREC*) (/tmp/RtmpcZQbJ7/R.INSTALL1656192e002c/Rcpp/src/Module.cpp:200) ==43205== by 0x497CC6: do_External (svn/R-devel/src/main/dotcode.c:548) ==43205== by 0x4DB91A: Rf_eval (svn/R-devel/src/main/eval.c:728) ==43205== by 0x4DE23C: do_begin (svn/R-devel/src/main/eval.c:2209) ==43205== > > > cleanEx() > nameEx("isRunning") > ### * isRunning > > flush(stderr()); flush(stdout()) > > ### Name: isRunning > ### Title: isRunning > ### Aliases: isRunning > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > # FALSE, because did not pass train.online to constructor > print(isRunning(gng)) [1] FALSE > > > > cleanEx() > nameEx("iterations") > ### * iterations > > flush(stderr()); flush(stdout()) > > ### Name: iterations > ### Title: iterations > ### Aliases: iterations iterations,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D iterations(c) > ## End(Not run) > > > > cleanEx() > nameEx("logClusters") > ### * logClusters > > flush(stderr()); flush(stdout()) > > ### Name: logClusters > ### Title: logClusters > ### Aliases: logClusters logClusters,Rcpp_CecModel-method > ### Keywords: datasets > > ### ** Examples > > ## Not run: > ##D logClusters(c) > ## End(Not run) > > > > cleanEx() > nameEx("logEnergy") > ### * logEnergy > > flush(stderr()); flush(stdout()) > > ### Name: logEnergy > ### Title: logEnergy > ### Aliases: logEnergy logEnergy,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D logEnergy(c) > ## End(Not run) > > > > cleanEx() > nameEx("meanError") > ### * meanError > > flush(stderr()); flush(stdout()) > > ### Name: meanError > ### Title: meanError > ### Aliases: meanError > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > meanError(gng) [1] 1.963817e-05 > > > > cleanEx() > nameEx("node-methods") > ### * node-methods > > flush(stderr()); flush(stdout()) > > ### Name: node > ### Title: node > ### Aliases: node > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > print(node(gng, 10)$pos) [1] 0.5638474 0.9732792 0.3519112 > > > > cleanEx() > nameEx("optimized-gng") > ### * optimized-gng > > flush(stderr()); flush(stdout()) > > ### Name: OptimizedGNG > ### Title: Constructor of Optimized GrowingNeuralGas object. > ### Aliases: OptimizedGNG > > ### ** Examples > > ## Not run: > ##D # Train online optimizedGNG. All values in this dataset are in the range (-4.3, 4.3) > ##D X <- gng.preset.sphere(100) > ##D gng <- OptimizedGNG(train.online = TRUE, value.range=c(min(X), max(X)), dim=3, max.nodes=20) > ##D insertExamples(gng, X) > ##D run(gng) > ##D Sys.sleep(10) > ##D pause(gng) > ## End(Not run) > > > > cleanEx() > nameEx("pause") > ### * pause > > flush(stderr()); flush(stdout()) > > ### Name: pause > ### Title: pause > ### Aliases: pause > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > pause(gng) > print(isRunning(gng)) [1] FALSE > > > > cleanEx() > nameEx("plot.cec") > ### * plot.cec > > flush(stderr()); flush(stdout()) > > ### Name: plot.Rcpp_CecModel > ### Title: plot > ### Aliases: plot.Rcpp_CecModel > > ### ** Examples > > ## Not run: > ##D plot(cec) > ##D plot(cec, slice=c(1,3), ellipses=TRUE) > ##D plot(cec, slice=c(1,2,3)) > ##D plot(cec, ellipses=TRUE, centers=FALSE) > ##D plot(cec, pca=TRUE, ellipses=TRUE, centers=FALSE) > ## End(Not run) > > > > cleanEx() > nameEx("plot.gng") > ### * plot.gng > > flush(stderr()); flush(stdout()) > > ### Name: plot.Rcpp_GNGServer > ### Title: plot GNG object > ### Aliases: plot.Rcpp_GNGServer > > ### ** Examples > > ## Not run: > ##D gng <- GNG(scaled.wine) > ##D # Plots igraph using first 2 coordinates and colors according to clusters > ##D plot(gng, mode=gng.plot.2d.errors, layout=gng.plot.layout.v2d, vertex.color=gng.plot.color.cluster) > ##D > ##D # For more possibilities see gng.plot.* constants > ## End(Not run) > > > > cleanEx() > nameEx("plot.svm") > ### * plot.svm > > flush(stderr()); flush(stdout()) > > ### Name: plot.Rcpp_SVMClient > ### Title: Plot SVM object > ### Aliases: plot.Rcpp_SVMClient > > ### ** Examples > > ## Not run: > ##D # here we ause svm is a trained SVM model > ##D plot(svm) > ##D plot(svm, X=x, cols=c(1,3)) > ##D plot(svm, mode="pca", radius=5) > ## End(Not run) > > > > cleanEx() > nameEx("predict.gng") > ### * predict.gng > > flush(stderr()); flush(stdout()) > > ### Name: predict.gng > ### Title: predict > ### Aliases: predict.Rcpp_GNGServer predict.gng > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > predict(gng, c(1,2,2)) [1] 61 > > > > cleanEx() > nameEx("predict.svm") > ### * predict.svm > > flush(stderr()); flush(stdout()) > > ### Name: predict.Rcpp_SVMClient > ### Title: Predict using SVM object > ### Aliases: predict.Rcpp_SVMClient > > ### ** Examples > > ## Not run: > ##D # firstly, SVM model needs to be trained > ##D svm <- SVM(x, y, core="libsvm", kernel="linear", C=1) > ##D # then we can use it to predict unknown samples > ##D predcit(svm, x_test) > ## End(Not run) > > > > cleanEx() > nameEx("predictComponent-methods") > ### * predictComponent-methods > > flush(stderr()); flush(stdout()) > > ### Name: predictComponent > ### Title: predictComponent > ### Aliases: predictComponent > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > # Find closest component to c(1,1,1) > predictComponent(gng, c(1,1,1)) [1] 7 > > > > cleanEx() > nameEx("run-methods") > ### * run-methods > > flush(stderr()); flush(stdout()) > > ### Name: run > ### Title: run > ### Aliases: run > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > run(gng) > print(isRunning(gng)) [1] FALSE > > > > cleanEx() > nameEx("runAll") > ### * runAll > > flush(stderr()); flush(stdout()) > > ### Name: runAll > ### Title: runAll > ### Aliases: runAll runAll,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D runAll(c) > ## End(Not run) > > > > cleanEx() > nameEx("runOneIteration") > ### * runOneIteration > > flush(stderr()); flush(stdout()) > > ### Name: runOneIteration > ### Title: runOneIteration > ### Aliases: runOneIteration runOneIteration,Rcpp_CecModel-method > > ### ** Examples > > ## Not run: > ##D runOneIteration(c) > ## End(Not run) > > > > cleanEx() > nameEx("svm") > ### * svm > > flush(stderr()); flush(stdout()) > > ### Name: SVM > ### Title: Create SVM object > ### Aliases: SVM SVM.default SVM.formula > > ### ** Examples > > ## Not run: > ##D # train SVM from data in x and labels in y > ##D svm <- SVM(x, y, core="libsvm", kernel="linear", C=1) > ##D > ##D # train SVM using a dataset with both data and lables and a formula pointing to labels > ##D formula <- target ~ . > ##D svm <- SVM(formula, data, core="svmlight", kernel="rbf", gamma=1e3) > ##D > ##D # train a model with 2eSVM algorithm > ##D data(svm_breast_cancer_dataset) > ##D ds <- svm.breastcancer.dataset > ##D svm.2e <- SVM(x=ds[,-1], y=ds[,1], core="libsvm", kernel="linear", prep = "2e", C=10); > ##D # more at \url{http://r.gmum.net/samples/svm.2e.html} > ##D > ##D # train SVM on a multiclass data set > ##D data(iris) > ##D # with "one vs rest" strategy > ##D svm.ova <- SVM(Species ~ ., data=iris, class.type="one.versus.all", verbosity=0) > ##D # or with "one vs one" strategy > ##D svm.ovo <- SVM(x=iris[,1:4], y=iris[,5], class.type="one.versus.one", verbosity=0) > ##D > ##D # we can use svmlights sample weighting feature, suppose we have weights vector > ##D # with a weight for every sample in the traning data > ##D weighted.svm <- SVM(formula=y~., data=df, core="svmlight", kernel="rbf", C=1.0, > ##D gamma=0.5, example.weights=weights) > ##D > ##D # svmlight alows us to determine missing labels from a dataset > ##D # suppose we have a labels y with missing labels marked as zeros > ##D svm.transduction <- SVM(x, y, transductive.learning=TRUE, core="svmlight") > ##D > ##D # for more in-depth examples visit \url{http://r.gmum.net/getting_started.html} > ## End(Not run) > > > > cleanEx() > nameEx("svm.accuracy") > ### * svm.accuracy > > flush(stderr()); flush(stdout()) > > ### Name: svm.accuracy > ### Title: Measure accuracy scoreof a prediction > ### Aliases: svm.accuracy > > ### ** Examples > > ## Not run: > ##D # firstly, SVM model needs to be trained > ##D svm <- SVM(x, y, core="libsvm", kernel="linear", C=1) > ##D # then we can use it to predict unknown samples > ##D p <- predcit(svm, x_test) > ##D acc <- svm.accuracy(p, y) > ## End(Not run) > > > > cleanEx() > nameEx("terminate-methods") > ### * terminate-methods > > flush(stderr()); flush(stdout()) > > ### Name: terminate > ### Title: terminate > ### Aliases: terminate > > ### ** Examples > > gng <- GNG(gng.preset.sphere(100)) [1] "Training offline" it is advised to scale data for optimal algorithm behavior to mean=1 std=0 [1] "Iteration 200" [1] "Iteration 200" > terminate(gng) > > > > ### *