@@ -7068,62 +7068,6 @@ SEXP R_igraph_graphlets(SEXP graph, SEXP weights, SEXP niter) {
70687068 return (result );
70697069}
70707070
7071- igraph_error_t igraph_i_graphlets_project (
7072- const igraph_t * graph , const igraph_vector_t * weights ,
7073- const igraph_vector_int_list_t * cliques , igraph_vector_t * Mu , igraph_bool_t startMu ,
7074- igraph_integer_t niter , igraph_integer_t vid1 );
7075-
7076- /*-------------------------------------------/
7077- / igraph_graphlets_project /
7078- /-------------------------------------------*/
7079-
7080- SEXP Rx_igraph_graphlets_project (SEXP graph , SEXP weights , SEXP cliques ,
7081- SEXP Mu , SEXP niter ) {
7082- /* Declarations */
7083- igraph_t c_graph ;
7084- igraph_vector_t c_weights ;
7085- igraph_vector_int_list_t c_cliques ;
7086- igraph_vector_t c_Mu ;
7087- igraph_integer_t c_niter ;
7088-
7089- SEXP result ;
7090-
7091- /* Convert input */
7092- R_SEXP_to_igraph (graph , & c_graph );
7093- if (!Rf_isNull (weights )) { R_SEXP_to_vector (weights , & c_weights ); }
7094- if (!Rf_isNull (cliques )) {
7095- R_igraph_SEXP_to_vector_int_list (cliques , & c_cliques );
7096- } else {
7097- igraph_vector_int_list_init (& c_cliques , 0 );
7098- }
7099- IGRAPH_FINALLY_PV (igraph_vector_int_list_destroy , & c_cliques );
7100- if (0 != R_SEXP_to_vector_copy (Mu , & c_Mu )) {
7101- igraph_error ("" , __FILE__ , __LINE__ , IGRAPH_ENOMEM );
7102- }
7103- IGRAPH_FINALLY_PV (igraph_vector_destroy , & c_Mu );
7104- c_niter = (igraph_integer_t ) REAL (niter )[0 ];
7105-
7106- /* TODO: Change igraph_i_graphlets_project to igraph_graphlets_project, because
7107- * we should not depend on non-public functions from igraph.
7108- */
7109- /* Call igraph */
7110- igraph_i_graphlets_project (& c_graph , (Rf_isNull (weights ) ? 0 : & c_weights ),
7111- & c_cliques , & c_Mu , /*startMu=*/ 1 , c_niter ,
7112- /*vid1=*/ 1 );
7113-
7114- /* Convert output */
7115- PROTECT (Mu = R_igraph_vector_to_SEXP (& c_Mu ));
7116- igraph_vector_int_list_destroy (& c_cliques );
7117- IGRAPH_FINALLY_CLEAN (1 );
7118- igraph_vector_destroy (& c_Mu );
7119- IGRAPH_FINALLY_CLEAN (1 );
7120- result = Mu ;
7121-
7122- UNPROTECT (1 );
7123- return (result );
7124- }
7125-
7126-
71277071SEXP R_igraph_adjacency_spectral_embedding (SEXP graph , SEXP no ,
71287072 SEXP pweights , SEXP pwhich ,
71297073 SEXP scaled , SEXP cvec ,
0 commit comments