├── .gitmodules ├── configure.win ├── tools ├── stimulus │ ├── config.h │ ├── aaa-auto.R.in │ └── igraph_export.h ├── py-stimulus │ ├── src │ │ └── stimulus │ │ │ ├── __init__.py │ │ │ ├── providers │ │ │ └── __init__.py │ │ │ ├── version.py │ │ │ ├── generators │ │ │ └── __init__.py │ │ │ ├── model │ │ │ ├── __init__.py │ │ │ └── docstrings.py │ │ │ └── utils.py │ ├── poetry.toml │ ├── .gitrepo │ ├── README.md │ ├── .pre-commit-config.yaml │ └── tbump.toml ├── getversion.sh ├── build-requirements.txt ├── extract_examples.R ├── deprecate-make-template.txt ├── deprecate-template.txt ├── run_examples.R ├── builddocs.sh ├── apply-patch.sh └── weights.R ├── .github ├── .gitignore ├── FUNDING.yml ├── workflows │ ├── pkgdown-build │ │ └── action.yml │ ├── roxygenize │ │ └── action.yml │ ├── custom │ │ ├── after-install │ │ │ └── action.yml │ │ └── before-install │ │ │ └── action.yml │ ├── git-identity │ │ └── action.yml │ ├── pkgdown-deploy │ │ └── action.yml │ ├── dep-suggests-matrix │ │ └── action.yml │ ├── rate-limit │ │ └── action.yml │ ├── versions-matrix │ │ └── action.yml │ ├── get-extra │ │ └── action.yml │ ├── matrix-check │ │ └── action.yml │ └── lock.yaml ├── ISSUE_TEMPLATE │ └── config.yml ├── pull_request_template.md └── copilot-instructions.md ├── src ├── vendor │ ├── cigraph │ │ ├── vendor │ │ │ ├── lapack │ │ │ │ └── debug.h │ │ │ ├── f2c │ │ │ │ ├── dummy.c │ │ │ │ ├── ctype.c │ │ │ │ ├── r_imag.c │ │ │ │ ├── d_imag.c │ │ │ │ ├── h_len.c │ │ │ │ ├── i_len.c │ │ │ │ ├── iargc_.c │ │ │ │ ├── d_prod.c │ │ │ │ ├── h_mod.c │ │ │ │ ├── i_mod.c │ │ │ │ ├── r_dim.c │ │ │ │ ├── r_abs.c │ │ │ │ ├── i_abs.c │ │ │ │ ├── i_dim.c │ │ │ │ ├── d_abs.c │ │ │ │ ├── h_abs.c │ │ │ │ ├── h_dim.c │ │ │ │ ├── d_dim.c │ │ │ │ ├── derf_.c │ │ │ │ ├── r_cos.c │ │ │ │ ├── r_exp.c │ │ │ │ ├── r_log.c │ │ │ │ ├── r_sin.c │ │ │ │ ├── r_tan.c │ │ │ │ ├── derfc_.c │ │ │ │ ├── r_acos.c │ │ │ │ ├── r_asin.c │ │ │ │ ├── r_atan.c │ │ │ │ ├── r_cosh.c │ │ │ │ ├── r_sinh.c │ │ │ │ ├── r_sqrt.c │ │ │ │ ├── r_tanh.c │ │ │ │ ├── d_cos.c │ │ │ │ ├── d_exp.c │ │ │ │ ├── d_log.c │ │ │ │ ├── d_sin.c │ │ │ │ ├── d_tan.c │ │ │ │ ├── r_cnjg.c │ │ │ │ ├── r_sign.c │ │ │ │ ├── d_acos.c │ │ │ │ ├── d_asin.c │ │ │ │ ├── d_atan.c │ │ │ │ ├── d_cosh.c │ │ │ │ ├── d_sinh.c │ │ │ │ ├── d_sqrt.c │ │ │ │ ├── d_tanh.c │ │ │ │ ├── lbitshft.c │ │ │ │ ├── r_atn2.c │ │ │ │ ├── d_cnjg.c │ │ │ │ ├── i_sign.c │ │ │ │ ├── r_int.c │ │ │ │ ├── d_sign.c │ │ │ │ ├── h_sign.c │ │ │ │ ├── z_abs.c │ │ │ │ ├── d_int.c │ │ │ │ ├── d_atn2.c │ │ │ │ ├── r_nint.c │ │ │ │ ├── erf_.c │ │ │ │ ├── i_nint.c │ │ │ │ ├── pow_dd.c │ │ │ │ ├── c_abs.c │ │ │ │ ├── erfc_.c │ │ │ │ ├── h_nint.c │ │ │ │ ├── d_nint.c │ │ │ │ ├── r_lg10.c │ │ │ │ ├── h_dnnt.c │ │ │ │ ├── i_dnnt.c │ │ │ │ ├── d_lg10.c │ │ │ │ ├── signal_.c │ │ │ │ ├── abort_.c │ │ │ │ ├── l_ge.c │ │ │ │ ├── l_gt.c │ │ │ │ ├── l_le.c │ │ │ │ ├── l_lt.c │ │ │ │ ├── hl_gt.c │ │ │ │ ├── hl_lt.c │ │ │ │ ├── hl_ge.c │ │ │ │ ├── hl_le.c │ │ │ │ ├── signbit.c │ │ │ │ ├── z_sin.c │ │ │ │ ├── z_cos.c │ │ │ │ ├── z_exp.c │ │ │ │ ├── c_sin.c │ │ │ │ ├── c_cos.c │ │ │ │ ├── typesize.c │ │ │ │ ├── c_exp.c │ │ │ │ ├── c_log.c │ │ │ │ ├── ef1cmc_.c │ │ │ │ ├── pow_ci.c │ │ │ │ ├── i_indx.c │ │ │ │ ├── dolio.c │ │ │ │ ├── h_indx.c │ │ │ │ ├── rewind.c │ │ │ │ ├── wsne.c │ │ │ │ ├── pow_ri.c │ │ │ │ ├── ef1asc_.c │ │ │ │ ├── pow_di.c │ │ │ │ ├── cabs.c │ │ │ │ ├── pow_hh.c │ │ │ │ ├── pow_ii.c │ │ │ │ ├── pow_zz.c │ │ │ │ ├── z_sqrt.c │ │ │ │ └── getarg_.c │ │ │ ├── CMakeLists.txt │ │ │ ├── cs │ │ │ │ ├── cs_dropzeros.c │ │ │ │ ├── cs_droptol.c │ │ │ │ ├── cs_ipvec.c │ │ │ │ ├── cs_pvec.c │ │ │ │ ├── cs_gaxpy.c │ │ │ │ ├── cs_entry.c │ │ │ │ ├── cs_pinv.c │ │ │ │ ├── cs_norm.c │ │ │ │ ├── cs_lsolve.c │ │ │ │ ├── cs_usolve.c │ │ │ │ ├── cs_ltsolve.c │ │ │ │ ├── cs_utsolve.c │ │ │ │ ├── cs_cumsum.c │ │ │ │ └── cs_happly.c │ │ │ ├── glpk │ │ │ │ ├── glpk_tls_config.h │ │ │ │ ├── draft │ │ │ │ │ └── draft.h │ │ │ │ ├── api │ │ │ │ │ ├── rmfgen.c │ │ │ │ │ ├── netgen.c │ │ │ │ │ └── gridgen.c │ │ │ │ └── misc │ │ │ │ │ └── relax4.c │ │ │ └── pcg │ │ │ │ └── CMakeLists.txt │ │ ├── ChangeLog │ │ ├── .gitignore │ │ ├── etc │ │ │ └── cmake │ │ │ │ ├── debugging.cmake │ │ │ │ ├── helpers.cmake │ │ │ │ ├── UseCCacheWhenInstalled.cmake │ │ │ │ ├── create_igraph_version_file.cmake │ │ │ │ ├── safe_math_support.cmake │ │ │ │ ├── BuildType.cmake │ │ │ │ ├── fuzz_helpers.cmake │ │ │ │ └── tls.cmake │ │ ├── NEWS │ │ ├── AUTHORS │ │ ├── src │ │ │ ├── centrality │ │ │ │ └── prpack │ │ │ │ │ ├── prpack_result.cpp │ │ │ │ │ ├── prpack.h │ │ │ │ │ ├── prpack_csr.h │ │ │ │ │ ├── prpack_edge_list.h │ │ │ │ │ ├── prpack_preprocessed_graph.h │ │ │ │ │ ├── prpack_csc.h │ │ │ │ │ └── prpack_result.h │ │ │ ├── internal │ │ │ │ └── qsort_r.c │ │ │ ├── operators │ │ │ │ └── rewire_internal.h │ │ │ └── cliques │ │ │ │ └── cliquer │ │ │ │ └── CMakeLists.txt │ │ ├── .editorconfig │ │ ├── INSTALL │ │ ├── msvc │ │ │ └── include │ │ │ │ └── unistd.h │ │ ├── igraph.pc.in │ │ ├── include │ │ │ └── igraph_lsap.h │ │ └── codecov.yml │ ├── uuid │ │ ├── Makevars.win │ │ ├── Makevars.in │ │ ├── config.h │ │ └── CMakeLists.txt │ ├── simpleraytracer │ │ ├── unit_limiter.h │ │ ├── unit_limiter.cpp │ │ ├── CMakeLists.txt │ │ ├── Triangle.h │ │ ├── Ray.h │ │ ├── Sphere.h │ │ └── Ray.cpp │ └── igraph_export.h ├── igraph_types.hpp ├── igraph-win.def ├── sources-mini-gmp.mk ├── sources-glue-cpp.mk ├── .gitignore ├── sources-glue-c.mk ├── init.dd ├── uuid.dd ├── rrandom.dd ├── cpp11.dd ├── rcallback.dd ├── rinterface.dd ├── simpleraytracer.dd ├── cpprinterface.dd ├── rinterface_extra.dd ├── init.cpp ├── deps.mk └── uuid.c ├── vignettes └── .gitignore ├── revdep ├── .gitignore ├── run.R └── times.R ├── R ├── zzz.R ├── tkigraph.R ├── cran.R ├── uuid.R ├── cpp11.R ├── old-0_2.R ├── old-0_1_1.R ├── old-0_5.R ├── old-0_6.R ├── as_phylo.R ├── idx.R ├── release.R ├── revdep.R ├── old-1_0_0.R └── old-1_5_0.R ├── tests ├── testthat │ ├── helper-unvs.R │ ├── power.gml.gz │ ├── football.gml.gz │ ├── zachary.graphml.gz │ ├── celegansneural.gml.gz │ ├── _snaps │ │ ├── minimum.spanning.tree.md │ │ ├── fit.md │ │ ├── par.md │ │ ├── community.md │ │ ├── plot.md │ │ ├── operators.md │ │ ├── trees.md │ │ ├── utils-assert-args.md │ │ ├── paths.md │ │ ├── motifs.md │ │ └── games.md │ ├── test-cocitation.R │ ├── test-utils-assert-args.R │ ├── test-stochastic_matrix.R │ └── test-structure.info.R └── testthat.R ├── man ├── figures │ └── logo.png ├── tkigraph.Rd ├── dot-igraph.status.Rd ├── dot-igraph.progress.Rd ├── is_printer_callback.Rd ├── get.edge.Rd ├── tkplot.off.Rd ├── igraph.console.Rd ├── graph_.Rd ├── maxcohesion.Rd ├── igraph.version.Rd ├── indent_print.Rd ├── is.named.Rd ├── dot-apply_modifiers.Rd ├── is.simple.Rd ├── showtrace.Rd ├── code.length.Rd ├── is.igraph.Rd ├── is.weighted.Rd ├── is_igraph.Rd ├── hrg.game.Rd ├── is.directed.Rd ├── maximal_ivs.Rd ├── is.hierarchical.Rd ├── graph.atlas.Rd ├── is.dag.Rd ├── igraph.shape.noplot.Rd ├── independence.number.Rd ├── line.graph.Rd ├── as_phylo.Rd ├── convex.hull.Rd ├── dyad.census.Rd ├── has.multiple.Rd ├── igraph_version.Rd ├── pipe.Rd ├── clique.number.Rd ├── graph.cohesion.Rd ├── tkplot.canvas.Rd ├── tkplot.center.Rd ├── is.bipartite.Rd ├── bipartite.mapping.Rd ├── hrg.dendrogram.Rd ├── igraph.shape.noclip.Rd ├── list.edge.attributes.Rd ├── list.graph.attributes.Rd ├── roxygen │ └── meta.R ├── largest.cliques.Rd ├── graph.disjoint.union.Rd ├── is_bipartite.Rd ├── list.vertex.attributes.Rd ├── graph.empty.Rd ├── igraph.to.graphNEL.Rd ├── maximal.independent.vertex.sets.Rd ├── largest.independent.vertex.sets.Rd ├── r_pal.Rd ├── stCuts.Rd ├── delete.vertices.Rd ├── layout.lgl.Rd ├── layout.svd.Rd ├── tkplot.export.postscript.Rd ├── graph.difference.Rd ├── graph.kautz.Rd ├── triad.census.Rd ├── layout.spring.Rd ├── minimal.st.separators.Rd ├── minimum.size.separators.Rd ├── remove.edge.attribute.Rd ├── remove.graph.attribute.Rd ├── tkplot.close.Rd ├── graph.intersection.Rd ├── inside-square-error.Rd ├── articulation.points.Rd ├── hrg.create.Rd ├── is.loop.Rd ├── layout.circle.Rd ├── tkplot.getcoords.Rd ├── biconnected.components.Rd ├── graph.de.bruijn.Rd ├── layout.random.Rd ├── remove.vertex.attribute.Rd ├── are.connected.Rd ├── graph.full.Rd ├── running.mean.Rd ├── graph.complementer.Rd ├── graph.full.citation.Rd ├── layout.sphere.Rd ├── with_igraph_opt.Rd ├── get.graph.attribute.Rd ├── layout.kamada.kawai.Rd └── set.graph.attribute.Rd ├── .vscode ├── extensions.json └── settings.json ├── pkgdown └── favicon │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-180x180.png │ ├── apple-touch-icon-60x60.png │ └── apple-touch-icon-76x76.png ├── cran-comments.md ├── cleanup ├── cleanup.win ├── .gitattributes ├── air.toml ├── inst └── benchmarks │ ├── correlated.R │ ├── time_dirSelect.R │ ├── time_sir.R │ ├── time_sgm.R │ ├── time_call.R │ └── time_fr_layout.R ├── codecov.yml ├── .gitignore ├── igraph.Rproj └── cran-comments.template.md /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configure.win: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/stimulus/config.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | /pkg.lock 3 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/lapack/debug.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vignettes/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.R 3 | -------------------------------------------------------------------------------- /src/igraph_types.hpp: -------------------------------------------------------------------------------- 1 | #include "igraph_types.h" 2 | -------------------------------------------------------------------------------- /src/vendor/uuid/Makevars.win: -------------------------------------------------------------------------------- 1 | PKG_CPPFLAGS=-Iwin32 2 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/providers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /revdep/.gitignore: -------------------------------------------------------------------------------- 1 | /cloud.noindex 2 | /cloud 3 | /review/ 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: igraph 2 | open_collective: igraph 3 | -------------------------------------------------------------------------------- /tools/py-stimulus/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project=true 3 | -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | .onLoad <- function(...) { 2 | rlang::run_on_load() 3 | } 4 | -------------------------------------------------------------------------------- /src/igraph-win.def: -------------------------------------------------------------------------------- 1 | LIBRARY igraph.dll 2 | EXPORTS 3 | R_init_igraph 4 | -------------------------------------------------------------------------------- /tests/testthat/helper-unvs.R: -------------------------------------------------------------------------------- 1 | unvs <- function(x) lapply(x, as.vector) 2 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/dummy.c: -------------------------------------------------------------------------------- 1 | 2 | int MAIN__(void) { return 0; } 3 | -------------------------------------------------------------------------------- /src/vendor/uuid/Makevars.in: -------------------------------------------------------------------------------- 1 | PKG_CPPFLAGS=@CPPFLAGS@ 2 | PKG_LIBS=@LIBS@ 3 | -------------------------------------------------------------------------------- /src/sources-mini-gmp.mk: -------------------------------------------------------------------------------- 1 | MINI_GMP_SOURCES=vendor/cigraph/vendor/mini-gmp/mini-gmp.o 2 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/ctype.c: -------------------------------------------------------------------------------- 1 | #define My_ctype_DEF 2 | #include "ctype.h" 3 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(igraph) 3 | 4 | test_check("igraph") 5 | -------------------------------------------------------------------------------- /man/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/man/figures/logo.png -------------------------------------------------------------------------------- /src/sources-glue-cpp.mk: -------------------------------------------------------------------------------- 1 | GLUE_CPP_SOURCES=cpp11.o cpprinterface.o init.o simpleraytracer.o 2 | -------------------------------------------------------------------------------- /src/vendor/cigraph/ChangeLog: -------------------------------------------------------------------------------- 1 | See CHANGELOG.md for a list of changes between versions. 2 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | /config.h 4 | /config.h.in~ 5 | /Makevars 6 | *.gcda 7 | *.gcno 8 | -------------------------------------------------------------------------------- /src/sources-glue-c.mk: -------------------------------------------------------------------------------- 1 | GLUE_C_SOURCES=rcallback.o rinterface.o rinterface_extra.o rrandom.o uuid.o 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Posit.air-vscode" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /pkgdown/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/favicon.ico -------------------------------------------------------------------------------- /tests/testthat/power.gml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/tests/testthat/power.gml.gz -------------------------------------------------------------------------------- /tests/testthat/football.gml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/tests/testthat/football.gml.gz -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /tests/testthat/zachary.graphml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/tests/testthat/zachary.graphml.gz -------------------------------------------------------------------------------- /tools/stimulus/aaa-auto.R.in: -------------------------------------------------------------------------------- 1 | # Generated by make -f Makefile-cigraph, do not edit by hand 2 | # styler: off 3 | 4 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | igraph 2.2.1 2 | 3 | ## Cran Repository Policy 4 | 5 | - [x] Reviewed CRP last edited 2024-08-27. 6 | -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /tests/testthat/celegansneural.gml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/tests/testthat/celegansneural.gml.gz -------------------------------------------------------------------------------- /src/vendor/uuid/config.h: -------------------------------------------------------------------------------- 1 | // https://github.com/igraph/rigraph/pull/840#issuecomment-1696078490 2 | #define HAVE_UNISTD_H 1 3 | -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igraph/rigraph/HEAD/pkgdown/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /src/init.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | init.o: \ 3 | init.cpp \ 4 | -------------------------------------------------------------------------------- /src/uuid.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | uuid.o: \ 3 | uuid.c \ 4 | -------------------------------------------------------------------------------- /src/rrandom.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | rrandom.o: \ 3 | rrandom.c \ 4 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/version.py: -------------------------------------------------------------------------------- 1 | __version_info__ = (0, 21, 5) 2 | __version__ = ".".join("{0}".format(x) for x in __version_info__) 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[r]": { 3 | "editor.formatOnSave": true, 4 | "editor.defaultFormatter": "Posit.air-vscode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /R/tkigraph.R: -------------------------------------------------------------------------------- 1 | #' @name tkigraph 2 | #' @title tkigraph 3 | #' @description Find tkigraph at . 4 | #' @keywords internal 5 | NULL 6 | -------------------------------------------------------------------------------- /src/cpp11.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | cpp11.o: \ 3 | cpp11.cpp \ 4 | igraph_types.hpp \ 5 | -------------------------------------------------------------------------------- /src/vendor/cigraph/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .*.swp 3 | .dirstamp 4 | .vscode/ 5 | 6 | /tags 7 | /IGRAPH_VERSION 8 | /build 9 | /build-* 10 | /tools/**/*.pyc 11 | -------------------------------------------------------------------------------- /R/cran.R: -------------------------------------------------------------------------------- 1 | cran_install <- function() { 2 | unlink("cran", recursive = TRUE) 3 | dir.create("cran") 4 | pak::pak("igraph", lib = "cran", dependencies = FALSE) 5 | } 6 | -------------------------------------------------------------------------------- /src/rcallback.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | rcallback.o: \ 3 | rcallback.c \ 4 | rinterface.h \ 5 | -------------------------------------------------------------------------------- /src/rinterface.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | rinterface.o: \ 3 | rinterface.c \ 4 | rinterface.h \ 5 | -------------------------------------------------------------------------------- /src/simpleraytracer.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | simpleraytracer.o: \ 3 | simpleraytracer.cpp \ 4 | -------------------------------------------------------------------------------- /tools/getversion.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | script_dir=$( dirname "${BASH_SOURCE[0]}" ) 4 | cat DESCRIPTION | grep '^Version: ' | sed 's/^Version: \(.*\)$/\1/' | head -1 5 | -------------------------------------------------------------------------------- /src/cpprinterface.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | cpprinterface.o: \ 3 | cpprinterface.cpp \ 4 | igraph_vector.hpp \ 5 | -------------------------------------------------------------------------------- /src/rinterface_extra.dd: -------------------------------------------------------------------------------- 1 | # Generated by deps.mk, do not edit by hand and do not add dependencies to system headers 2 | rinterface_extra.o: \ 3 | rinterface.h \ 4 | rinterface_extra.c \ 5 | rrandom.h \ 6 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/minimum.spanning.tree.md: -------------------------------------------------------------------------------- 1 | # mst error works 2 | 3 | Code 4 | mst(g, algorithm = "undefined") 5 | Condition 6 | Error in `mst()`: 7 | ! Invalid `algorithm`. 8 | 9 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/generators/__init__.py: -------------------------------------------------------------------------------- 1 | from .registry import get_code_generator_factory_for_language, is_valid_language 2 | 3 | __all__ = ("get_code_generator_factory_for_language", "is_valid_language") 4 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(cs) 2 | add_subdirectory(f2c) 3 | add_subdirectory(glpk) 4 | add_subdirectory(lapack) 5 | add_subdirectory(mini-gmp) 6 | add_subdirectory(pcg) 7 | add_subdirectory(plfit) 8 | -------------------------------------------------------------------------------- /src/vendor/simpleraytracer/unit_limiter.h: -------------------------------------------------------------------------------- 1 | #ifndef ZERO_TO_ONE_H 2 | #define ZERO_TO_ONE_H 3 | 4 | namespace igraph { 5 | 6 | double unit_limiter(double vUnitDouble); 7 | 8 | } // namespace igraph 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/debugging.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | IGRAPH_VERIFY_FINALLY_STACK 3 | "" 4 | CACHE 5 | BOOL 6 | "Verify that the 'finally' stack is cleaned up properly. Useful only in debugging; do not use in production." 7 | ) 8 | -------------------------------------------------------------------------------- /src/vendor/cigraph/NEWS: -------------------------------------------------------------------------------- 1 | News about each release of igraph from version 0.8 onwards can be found in 2 | CHANGELOG.md. 3 | 4 | Archived news items before version 0.7 are to be found in ONEWS -- these are 5 | most likely of historical interest only. 6 | -------------------------------------------------------------------------------- /.github/workflows/pkgdown-build/action.yml: -------------------------------------------------------------------------------- 1 | name: "Action to build a pkgdown website" 2 | 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Build site 7 | run: | 8 | pkgdown::build_site() 9 | shell: Rscript {0} 10 | -------------------------------------------------------------------------------- /cleanup: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Object files cause problems on Github Actions where they get included 4 | # in the source package that is re-generated from the original source, so 5 | # we remove them here in the cleanup step 6 | find src -name *.o | xargs rm 7 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/fit.md: -------------------------------------------------------------------------------- 1 | # fit_power_law() errors well 2 | 3 | Code 4 | fit_power_law(1, implementation = "R.mle") 5 | Condition 6 | Error in `power.law.fit.old()`: 7 | ! `x` must be a vector of length at least 2, not 1. 8 | 9 | -------------------------------------------------------------------------------- /cleanup.win: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Object files cause problems on Github Actions where they get included 4 | # in the source package that is re-generated from the original source, so 5 | # we remove them here in the cleanup step 6 | find src -name *.o | xargs rm 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Handle line endings automatically for files detected as text 2 | # and leave all files detected as binary untouched. 3 | * text=auto 4 | 5 | # Force the following filetypes to have unix eols, so Windows does not break them 6 | configure.ac text eol=lf 7 | -------------------------------------------------------------------------------- /.github/workflows/roxygenize/action.yml: -------------------------------------------------------------------------------- 1 | name: "Action to create documentation with roxygen2" 2 | 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Roxygenize 7 | run: | 8 | try(roxygen2::roxygenize()) 9 | shell: Rscript {0} 10 | -------------------------------------------------------------------------------- /src/vendor/cigraph/AUTHORS: -------------------------------------------------------------------------------- 1 | Gabor Csardi 2 | Tamas Nepusz 3 | Szabolcs Horvat 4 | Vincent Traag 5 | Fabio Zanini 6 | Daniel Noom 7 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/par.md: -------------------------------------------------------------------------------- 1 | # print.id in snapshot 2 | 3 | Code 4 | igraph_opt("print.id") 5 | Output 6 | [1] FALSE 7 | 8 | # print.id in snapshot (2) 9 | 10 | Code 11 | igraph_opt("print.id") 12 | Output 13 | [1] FALSE 14 | 15 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/helpers.cmake: -------------------------------------------------------------------------------- 1 | macro(tristate OPTION_NAME DESCRIPTION DEFAULT_VALUE) 2 | set(${OPTION_NAME} "${DEFAULT_VALUE}" CACHE STRING "${DESCRIPTION}") 3 | set_property(CACHE ${OPTION_NAME} PROPERTY STRINGS AUTO ON OFF) 4 | endmacro() 5 | 6 | include(PadString) 7 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack_result.cpp: -------------------------------------------------------------------------------- 1 | #include "prpack_result.h" 2 | #include 3 | using namespace prpack; 4 | 5 | prpack_result::prpack_result() { 6 | x = NULL; 7 | } 8 | 9 | prpack_result::~prpack_result() { 10 | delete[] x; 11 | } 12 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/internal/qsort_r.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is in the public domain. Originally written by Garrett 3 | * A. Wollman. 4 | * 5 | * $FreeBSD: src/lib/libc/stdlib/qsort_r.c,v 1.1 2002/09/10 02:04:49 wollman Exp $ 6 | */ 7 | #define I_AM_QSORT_R 8 | #include "qsort.c" 9 | -------------------------------------------------------------------------------- /R/uuid.R: -------------------------------------------------------------------------------- 1 | generate_uuid <- function(use_time = NA) { 2 | .Call(UUID_gen, as.logical(use_time)) 3 | } 4 | 5 | 6 | get_graph_id <- function(graph) { 7 | if (!warn_version(graph)) { 8 | .Call(Rx_igraph_get_graph_id, graph) 9 | } else { 10 | NA_character_ 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /man/tkigraph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkigraph.R 3 | \name{tkigraph} 4 | \alias{tkigraph} 5 | \title{tkigraph} 6 | \description{ 7 | Find tkigraph at \url{https://github.com/igraph/tkigraph}. 8 | } 9 | \keyword{internal} 10 | -------------------------------------------------------------------------------- /air.toml: -------------------------------------------------------------------------------- 1 | [format] 2 | line-width = 80 3 | indent-width = 2 4 | indent-style = "space" 5 | line-ending = "auto" 6 | persistent-line-breaks = true 7 | default-exclude = true 8 | exclude = ["R/utils-s3.R"] 9 | skip = ["tribble", "graph_from_literal", "matrix", "c", "make_graph", "edges"] 10 | -------------------------------------------------------------------------------- /inst/benchmarks/correlated.R: -------------------------------------------------------------------------------- 1 | time_group("correlated E-R graphs, v1") 2 | 3 | time_that( 4 | "sample_correlated_gnp is fast", 5 | replications = 10, 6 | init = { 7 | library(igraph) 8 | }, 9 | { 10 | sample_correlated_gnp_pair(100, corr = .8, p = 5 / 100) 11 | } 12 | ) 13 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack.h: -------------------------------------------------------------------------------- 1 | #ifndef PRPACK 2 | #define PRPACK 3 | 4 | #include "prpack_csc.h" 5 | #include "prpack_csr.h" 6 | #include "prpack_edge_list.h" 7 | #include "prpack_base_graph.h" 8 | #include "prpack_solver.h" 9 | #include "prpack_result.h" 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/vendor/cigraph/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.{c,cc,cpp,h,hh,hpp,pmt}] 10 | indent_style = space 11 | indent_size = 4 12 | 13 | [Makefile] 14 | indent_style = tab 15 | -------------------------------------------------------------------------------- /src/vendor/cigraph/INSTALL: -------------------------------------------------------------------------------- 1 | Instructions for installation are provided in Chapter 2 of the manual; see 2 | `doc/html` in the distributed tarball. 3 | 4 | An online version of the installation instructions for the most recent version 5 | can be found here: 6 | 7 | https://igraph.org/c/doc/igraph-Installation.html 8 | -------------------------------------------------------------------------------- /src/vendor/cigraph/msvc/include/unistd.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * unistd.h replacement for MSVC 4 | * 5 | * Provide the minimum that igraph needs. 6 | * At presents this is: 7 | * - isatty() for f2c and flex-generated sources 8 | * - unlink() for examples/simple/graphml.c 9 | */ 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_dropzeros.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | static CS_INT cs_nonzero (CS_INT i, CS_INT j, CS_ENTRY aij, void *other) 3 | { 4 | return (aij != 0) ; 5 | } 6 | CS_INT cs_dropzeros (cs *A) 7 | { 8 | return (cs_fkeep (A, &cs_nonzero, NULL)) ; /* keep all nonzero entries */ 9 | } 10 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_imag.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double r_imag(z) f2c_complex *z; 8 | #else 9 | double r_imag(f2c_complex *z) 10 | #endif 11 | { 12 | return(z->i); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /man/dot-igraph.status.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/console.R 3 | \name{.igraph.status} 4 | \alias{.igraph.status} 5 | \title{igraph status} 6 | \usage{ 7 | .igraph.status(message) 8 | } 9 | \description{ 10 | igraph status 11 | } 12 | \keyword{internal} 13 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_imag.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double d_imag(z) doublecomplex *z; 8 | #else 9 | double d_imag(doublecomplex *z) 10 | #endif 11 | { 12 | return(z->i); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_len.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint h_len(s, n) char *s; ftnlen n; 8 | #else 9 | shortint h_len(char *s, ftnlen n) 10 | #endif 11 | { 12 | return(n); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_len.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer i_len(s, n) char *s; ftnlen n; 8 | #else 9 | integer i_len(char *s, ftnlen n) 10 | #endif 11 | { 12 | return(n); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/iargc_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | ftnint iargc_() 8 | #else 9 | ftnint iargc_(void) 10 | #endif 11 | { 12 | extern int xargc; 13 | return ( xargc - 1 ); 14 | } 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_prod.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double d_prod(x,y) real *x, *y; 8 | #else 9 | double d_prod(real *x, real *y) 10 | #endif 11 | { 12 | return( (*x) * (*y) ); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_mod.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint h_mod(a,b) short *a, *b; 8 | #else 9 | shortint h_mod(short *a, short *b) 10 | #endif 11 | { 12 | return( *a % *b); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/glpk/glpk_tls_config.h: -------------------------------------------------------------------------------- 1 | 2 | #include "igraph_threading.h" /* IGRAPH_THREAD_SAFE */ 3 | 4 | /* This includes igraph's config.h. 5 | * The vendored GLPK must not have a config.h. */ 6 | #include "config.h" 7 | 8 | #if IGRAPH_THREAD_SAFE 9 | #define TLS IGRAPH_THREAD_LOCAL 10 | #endif 11 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/UseCCacheWhenInstalled.cmake: -------------------------------------------------------------------------------- 1 | option(USE_CCACHE "Use ccache to speed up compilation if it is installed" ON) 2 | if(USE_CCACHE) 3 | find_program(CCACHE_PROGRAM ccache) 4 | if(CCACHE_PROGRAM) 5 | set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") 6 | endif() 7 | endif() 8 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_mod.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer i_mod(a,b) integer *a, *b; 8 | #else 9 | integer i_mod(integer *a, integer *b) 10 | #endif 11 | { 12 | return( *a % *b); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_dim.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double r_dim(a,b) real *a, *b; 8 | #else 9 | double r_dim(real *a, real *b) 10 | #endif 11 | { 12 | return( *a > *b ? *a - *b : 0); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /tools/build-requirements.txt: -------------------------------------------------------------------------------- 1 | # Make sure to use an exact version or commit hash in the line below, 2 | # _not_ the name of a branch. The hash of this file is used by the CI 3 | # environment to detect when to re-create the virtualenv so the hash 4 | # needs to change whenever a package is updated. 5 | 6 | ./tools/py-stimulus/ 7 | -------------------------------------------------------------------------------- /tools/extract_examples.R: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env Rscript 2 | 3 | library(tools) 4 | 5 | rdfiles <- list.files("igraph/man", pattern = ".*\\.Rd$", full.names = TRUE) 6 | out <- file("igraph-Ex.R", open = "w") 7 | cat("### Load the package\nlibrary(igraph)\n\n", file = out) 8 | sapply(rdfiles, Rd2ex, out = out) 9 | close(out) 10 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_abs.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double r_abs(x) real *x; 8 | #else 9 | double r_abs(real *x) 10 | #endif 11 | { 12 | if(*x >= 0) 13 | return(*x); 14 | return(- *x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /inst/benchmarks/time_dirSelect.R: -------------------------------------------------------------------------------- 1 | time_group("dimensionality selection") 2 | 3 | time_that( 4 | "dimensionaility selection is fast", 5 | replications = 10, 6 | init = { 7 | library(igraph) 8 | }, 9 | reinit = { 10 | sv <- c(rnorm(2000), rnorm(2000)/5) 11 | }, 12 | { 13 | dim_select(sv) 14 | } 15 | ) 16 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_droptol.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | static CS_INT cs_tol (CS_INT i, CS_INT j, CS_ENTRY aij, void *tol) 3 | { 4 | return (CS_ABS (aij) > *((double *) tol)) ; 5 | } 6 | CS_INT cs_droptol (cs *A, double tol) 7 | { 8 | return (cs_fkeep (A, &cs_tol, &tol)) ; /* keep all large entries */ 9 | } 10 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_abs.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer i_abs(x) integer *x; 8 | #else 9 | integer i_abs(integer *x) 10 | #endif 11 | { 12 | if(*x >= 0) 13 | return(*x); 14 | return(- *x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_dim.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer i_dim(a,b) integer *a, *b; 8 | #else 9 | integer i_dim(integer *a, integer *b) 10 | #endif 11 | { 12 | return( *a > *b ? *a - *b : 0); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Installation problems? 3 | url: https://igraph.discourse.group/ 4 | about: Check the instructions carefully at https://r.igraph.org/ before asking 5 | - name: igraph support 6 | url: https://igraph.discourse.group/ 7 | about: Ask and answer questions about igraph 8 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack_csr.h: -------------------------------------------------------------------------------- 1 | #ifndef PRPACK_CSR 2 | #define PRPACK_CSR 3 | 4 | namespace prpack { 5 | 6 | class prpack_csr { 7 | public: 8 | int num_vs; 9 | int num_es; 10 | int* heads; 11 | int* tails; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_abs.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double d_abs(x) doublereal *x; 8 | #else 9 | double d_abs(doublereal *x) 10 | #endif 11 | { 12 | if(*x >= 0) 13 | return(*x); 14 | return(- *x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_abs.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint h_abs(x) shortint *x; 8 | #else 9 | shortint h_abs(shortint *x) 10 | #endif 11 | { 12 | if(*x >= 0) 13 | return(*x); 14 | return(- *x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_dim.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint h_dim(a,b) shortint *a, *b; 8 | #else 9 | shortint h_dim(shortint *a, shortint *b) 10 | #endif 11 | { 12 | return( *a > *b ? *a - *b : 0); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_dim.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double d_dim(a,b) doublereal *a, *b; 8 | #else 9 | double d_dim(doublereal *a, doublereal *b) 10 | #endif 11 | { 12 | return( *a > *b ? *a - *b : 0); 13 | } 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/community.md: -------------------------------------------------------------------------------- 1 | # modularity_matrix still accepts a membership argument for compatibility 2 | 3 | Code 4 | x <- modularity_matrix(karate, membership = rep(1, vcount(karate))) 5 | Condition 6 | Warning: 7 | The `membership` argument of `modularity_matrix()` is no longer used as of igraph 2.1.0. 8 | 9 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/plot.md: -------------------------------------------------------------------------------- 1 | # layout as graph attribute error works 2 | 3 | Code 4 | plot(g) 5 | Condition 6 | Error in `plot()`: 7 | ! The layout has 5 rows, but the graph has 10 vertices. 8 | i It is recommended to store the layout as x and y vertex attributes and not as a matrix graph attribute. 9 | 10 | -------------------------------------------------------------------------------- /src/init.cpp: -------------------------------------------------------------------------------- 1 | #include "cpp11.hpp" 2 | 3 | #include "igraph.h" 4 | 5 | extern "C" void Rx_igraph_init_handlers(DllInfo* dll); 6 | extern "C" void Rx_igraph_init_vector_class(DllInfo* dll); 7 | 8 | [[cpp11::init]] 9 | void igraph_init(DllInfo* dll) 10 | { 11 | Rx_igraph_init_handlers(dll); 12 | Rx_igraph_init_vector_class(dll); 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/simpleraytracer/unit_limiter.cpp: -------------------------------------------------------------------------------- 1 | #include "unit_limiter.h" 2 | 3 | namespace igraph { 4 | 5 | double unit_limiter(double vUnitDouble) 6 | { 7 | double result = vUnitDouble; 8 | if (result < 0.0) 9 | result = 0.0; 10 | else if (result > 1.0) 11 | result = 1.0; 12 | return result; 13 | } 14 | 15 | } // namespace igraph 16 | -------------------------------------------------------------------------------- /R/cpp11.R: -------------------------------------------------------------------------------- 1 | # Generated by cpp11: do not edit by hand 2 | 3 | igraph_hcass2 <- function(n, ia, ib) { 4 | .Call(`_igraph_igraph_hcass2`, n, ia, ib) 5 | } 6 | 7 | getsphere <- function(spos, sradius, scolor, lightpos, lightcolor, swidth, sheight) { 8 | .Call(`_igraph_getsphere`, spos, sradius, scolor, lightpos, lightcolor, swidth, sheight) 9 | } 10 | -------------------------------------------------------------------------------- /inst/benchmarks/time_sir.R: -------------------------------------------------------------------------------- 1 | time_group("SIR epidemics models on networks") 2 | 3 | time_that( 4 | "SIR is fast", 5 | replications = 10, 6 | init = { 7 | library(igraph) 8 | set.seed(42) 9 | }, 10 | reinit = { 11 | g <- sample_gnm(40, 40) 12 | }, 13 | { 14 | sir(g, beta = 5, gamma = 1, no.sim = 100) 15 | } 16 | ) 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/derf_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #undef abs 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifdef KR_headers 10 | double derf_(x) doublereal *x; 11 | #else 12 | double derf_(doublereal *x) 13 | #endif 14 | { 15 | return( erf(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_cos.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double cos(); 5 | double r_cos(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_cos(real *x) 13 | #endif 14 | { 15 | return( cos(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_exp.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double exp(); 5 | double r_exp(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_exp(real *x) 13 | #endif 14 | { 15 | return( exp(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_log.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double log(); 5 | double r_log(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_log(real *x) 13 | #endif 14 | { 15 | return( log(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_sin.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sin(); 5 | double r_sin(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_sin(real *x) 13 | #endif 14 | { 15 | return( sin(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_tan.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double tan(); 5 | double r_tan(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_tan(real *x) 13 | #endif 14 | { 15 | return( tan(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/derfc_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #undef abs 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifdef KR_headers 10 | double derfc_(x) doublereal *x; 11 | #else 12 | double derfc_(doublereal *x) 13 | #endif 14 | { 15 | return( erfc(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_acos.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double acos(); 5 | double r_acos(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_acos(real *x) 13 | #endif 14 | { 15 | return( acos(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_asin.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double asin(); 5 | double r_asin(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_asin(real *x) 13 | #endif 14 | { 15 | return( asin(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_atan.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double atan(); 5 | double r_atan(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_atan(real *x) 13 | #endif 14 | { 15 | return( atan(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_cosh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double cosh(); 5 | double r_cosh(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_cosh(real *x) 13 | #endif 14 | { 15 | return( cosh(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_sinh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sinh(); 5 | double r_sinh(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_sinh(real *x) 13 | #endif 14 | { 15 | return( sinh(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_sqrt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sqrt(); 5 | double r_sqrt(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_sqrt(real *x) 13 | #endif 14 | { 15 | return( sqrt(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_tanh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double tanh(); 5 | double r_tanh(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_tanh(real *x) 13 | #endif 14 | { 15 | return( tanh(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack_edge_list.h: -------------------------------------------------------------------------------- 1 | #ifndef PRPACK_EDGE_LIST 2 | #define PRPACK_EDGE_LIST 3 | 4 | namespace prpack { 5 | 6 | class prpack_edge_list { 7 | public: 8 | int num_vs; 9 | int num_es; 10 | int* heads; 11 | int* tails; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/igraph_export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IGRAPH_EXPORT_H 3 | #define IGRAPH_EXPORT_H 4 | 5 | #define IGRAPH_EXPORT 6 | #define IGRAPH_NO_EXPORT 7 | #define IGRAPH_DEPRECATED 8 | #define IGRAPH_DEPRECATED_EXPORT IGRAPH_EXPORT IGRAPH_DEPRECATED 9 | #define IGRAPH_DEPRECATED_NO_EXPORT IGRAPH_NO_EXPORT IGRAPH_DEPRECATED 10 | 11 | #endif /* IGRAPH_EXPORT_H */ 12 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | - [ ] By submitting this pull request, I assign the copyright of my contribution to _The igraph development team_. 6 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_cos.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double cos(); 5 | double d_cos(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_cos(doublereal *x) 13 | #endif 14 | { 15 | return( cos(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_exp.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double exp(); 5 | double d_exp(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_exp(doublereal *x) 13 | #endif 14 | { 15 | return( exp(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_log.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double log(); 5 | double d_log(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_log(doublereal *x) 13 | #endif 14 | { 15 | return( log(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_sin.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sin(); 5 | double d_sin(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_sin(doublereal *x) 13 | #endif 14 | { 15 | return( sin(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_tan.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double tan(); 5 | double d_tan(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_tan(doublereal *x) 13 | #endif 14 | { 15 | return( tan(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_cnjg.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | VOID r_cnjg(r, z) f2c_complex *r, *z; 8 | #else 9 | VOID r_cnjg(f2c_complex *r, f2c_complex *z) 10 | #endif 11 | { 12 | real zi = z->i; 13 | r->r = z->r; 14 | r->i = -zi; 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_sign.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double r_sign(a,b) real *a, *b; 8 | #else 9 | double r_sign(real *a, real *b) 10 | #endif 11 | { 12 | double x; 13 | x = (*a >= 0 ? *a : - *a); 14 | return( *b >= 0 ? x : -x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /tools/stimulus/igraph_export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IGRAPH_EXPORT_H 3 | #define IGRAPH_EXPORT_H 4 | 5 | #define IGRAPH_EXPORT 6 | #define IGRAPH_NO_EXPORT 7 | #define IGRAPH_DEPRECATED 8 | #define IGRAPH_DEPRECATED_EXPORT IGRAPH_EXPORT IGRAPH_DEPRECATED 9 | #define IGRAPH_DEPRECATED_NO_EXPORT IGRAPH_NO_EXPORT IGRAPH_DEPRECATED 10 | 11 | #endif /* IGRAPH_EXPORT_H */ 12 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_acos.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double acos(); 5 | double d_acos(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_acos(doublereal *x) 13 | #endif 14 | { 15 | return( acos(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_asin.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double asin(); 5 | double d_asin(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_asin(doublereal *x) 13 | #endif 14 | { 15 | return( asin(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_atan.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double atan(); 5 | double d_atan(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_atan(doublereal *x) 13 | #endif 14 | { 15 | return( atan(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_cosh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double cosh(); 5 | double d_cosh(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_cosh(doublereal *x) 13 | #endif 14 | { 15 | return( cosh(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_sinh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sinh(); 5 | double d_sinh(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_sinh(doublereal *x) 13 | #endif 14 | { 15 | return( sinh(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_sqrt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sqrt(); 5 | double d_sqrt(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_sqrt(doublereal *x) 13 | #endif 14 | { 15 | return( sqrt(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_tanh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double tanh(); 5 | double d_tanh(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_tanh(doublereal *x) 13 | #endif 14 | { 15 | return( tanh(*x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/lbitshft.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | integer 7 | #ifdef KR_headers 8 | lbit_shift(a, b) integer a; integer b; 9 | #else 10 | lbit_shift(integer a, integer b) 11 | #endif 12 | { 13 | return b >= 0 ? a << b : (integer)((uinteger)a >> -b); 14 | } 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_atn2.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double atan2(); 5 | double r_atn2(x,y) real *x, *y; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_atn2(real *x, real *y) 13 | #endif 14 | { 15 | return( atan2(*x,*y) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /.github/workflows/custom/after-install/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Custom steps to run after R packages are installed' 2 | 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Use GLPK on macOS 7 | if: runner.os == 'macOS' 8 | run: | 9 | echo -e 'CPPFLAGS = -I/opt/homebrew/include\nLDFLAGS = -L/opt/homebrew/lib' | tee ~/.R/Makevars 10 | shell: bash 11 | -------------------------------------------------------------------------------- /.github/workflows/git-identity/action.yml: -------------------------------------------------------------------------------- 1 | name: "Actions to set up a Git identity" 2 | 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Configure Git identity 7 | run: | 8 | env | sort 9 | git config --local user.name "$GITHUB_ACTOR" 10 | git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" 11 | shell: bash 12 | -------------------------------------------------------------------------------- /.github/workflows/pkgdown-deploy/action.yml: -------------------------------------------------------------------------------- 1 | name: "Action to deploy a pkgdown website" 2 | 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Deploy site 7 | uses: nick-fields/retry@v3 8 | with: 9 | timeout_minutes: 15 10 | max_attempts: 10 11 | command: | 12 | R -q -e 'pkgdown::deploy_to_branch(new_process = FALSE)' 13 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_cnjg.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | VOID 7 | #ifdef KR_headers 8 | d_cnjg(r, z) doublecomplex *r, *z; 9 | #else 10 | d_cnjg(doublecomplex *r, doublecomplex *z) 11 | #endif 12 | { 13 | doublereal zi = z->i; 14 | r->r = z->r; 15 | r->i = -zi; 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_sign.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer i_sign(a,b) integer *a, *b; 8 | #else 9 | integer i_sign(integer *a, integer *b) 10 | #endif 11 | { 12 | integer x; 13 | x = (*a >= 0 ? *a : - *a); 14 | return( *b >= 0 ? x : -x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_int.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | double r_int(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_int(real *x) 13 | #endif 14 | { 15 | return( (*x>0) ? floor(*x) : -floor(- *x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /revdep/run.R: -------------------------------------------------------------------------------- 1 | me <- unname(desc::desc_get("Package")) 2 | 3 | # pkgbuild::build(dest_path = ".", args = c("--no-build-vignettes", "--no-manual")) 4 | last <- dir(pattern = paste0("^", me, "_.*[.]tar[.]gz$")) 5 | stopifnot(length(last) == 1) 6 | last 7 | 8 | revdepcheck::cloud_check(tarball = last) 9 | unlink(last) 10 | revdepcheck::cloud_status() 11 | revdepcheck::cloud_report() 12 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_sign.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double d_sign(a,b) doublereal *a, *b; 8 | #else 9 | double d_sign(doublereal *a, doublereal *b) 10 | #endif 11 | { 12 | double x; 13 | x = (*a >= 0 ? *a : - *a); 14 | return( *b >= 0 ? x : -x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_sign.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint h_sign(a,b) shortint *a, *b; 8 | #else 9 | shortint h_sign(shortint *a, shortint *b) 10 | #endif 11 | { 12 | shortint x; 13 | x = (*a >= 0 ? *a : - *a); 14 | return( *b >= 0 ? x : -x); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/z_abs.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double f__cabs(); 8 | double z_abs(z) doublecomplex *z; 9 | #else 10 | double f__cabs(double, double); 11 | double z_abs(doublecomplex *z) 12 | #endif 13 | { 14 | return( f__cabs( z->r, z->i ) ); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/model/__init__.py: -------------------------------------------------------------------------------- 1 | from .docstrings import DocstringProvider 2 | from .functions import FunctionDescriptor 3 | from .parameters import ParamMode, ParamSpec 4 | from .types import TypeDescriptor 5 | 6 | __all__ = ( 7 | "DocstringProvider", 8 | "FunctionDescriptor", 9 | "ParamMode", 10 | "ParamSpec", 11 | "TypeDescriptor", 12 | ) 13 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_int.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | double d_int(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_int(doublereal *x) 13 | #endif 14 | { 15 | return( (*x>0) ? floor(*x) : -floor(- *x) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_atn2.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double atan2(); 5 | double d_atn2(x,y) doublereal *x, *y; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_atn2(doublereal *x, doublereal *y) 13 | #endif 14 | { 15 | return( atan2(*x,*y) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_nint.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | double r_nint(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double r_nint(real *x) 13 | #endif 14 | { 15 | return( (*x)>=0 ? 16 | floor(*x + .5) : -floor(.5 - *x) ); 17 | } 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/erf_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #undef abs 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef REAL 10 | #define REAL double 11 | #endif 12 | 13 | #ifdef KR_headers 14 | REAL erf_(x) real *x; 15 | #else 16 | REAL erf_(real *x) 17 | #endif 18 | { 19 | return( erf((double)*x) ); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_nint.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | integer i_nint(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | integer i_nint(real *x) 13 | #endif 14 | { 15 | return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_dd.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double pow(); 5 | double pow_dd(ap, bp) doublereal *ap, *bp; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double pow_dd(doublereal *ap, doublereal *bp) 13 | #endif 14 | { 15 | return(pow(*ap, *bp) ); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_ipvec.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* x(p) = b, for dense vectors x and b; p=NULL denotes identity */ 3 | CS_INT cs_ipvec (const CS_INT *p, const CS_ENTRY *b, CS_ENTRY *x, CS_INT n) 4 | { 5 | CS_INT k ; 6 | if (!x || !b) return (0) ; /* check inputs */ 7 | for (k = 0 ; k < n ; k++) x [p ? p [k] : k] = b [k] ; 8 | return (1) ; 9 | } 10 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_pvec.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* x = b(p), for dense vectors x and b; p=NULL denotes identity */ 3 | CS_INT cs_pvec (const CS_INT *p, const CS_ENTRY *b, CS_ENTRY *x, CS_INT n) 4 | { 5 | CS_INT k ; 6 | if (!x || !b) return (0) ; /* check inputs */ 7 | for (k = 0 ; k < n ; k++) x [k] = b [p ? p [k] : k] ; 8 | return (1) ; 9 | } 10 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/c_abs.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern double f__cabs(); 8 | 9 | double c_abs(z) f2c_complex *z; 10 | #else 11 | extern double f__cabs(double, double); 12 | 13 | double c_abs(f2c_complex *z) 14 | #endif 15 | { 16 | return( f__cabs( z->r, z->i ) ); 17 | } 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/erfc_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #undef abs 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef REAL 10 | #define REAL double 11 | #endif 12 | 13 | #ifdef KR_headers 14 | REAL erfc_(x) real *x; 15 | #else 16 | REAL erfc_(real *x) 17 | #endif 18 | { 19 | return( erfc((double)*x) ); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_nint.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | shortint h_nint(x) real *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | shortint h_nint(real *x) 13 | #endif 14 | { 15 | return (shortint)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/model/docstrings.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, Optional 2 | 3 | __all__ = ("DocstringProvider",) 4 | 5 | 6 | DocstringProvider = Callable[[str], Optional[str]] 7 | """Interface specification for functions that can be called with a function name 8 | and return the docstring corresponding to the given function or ``None`` if 9 | no docstring is available. 10 | """ 11 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_nint.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | double d_nint(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | double d_nint(doublereal *x) 13 | #endif 14 | { 15 | return( (*x)>=0 ? 16 | floor(*x + .5) : -floor(.5 - *x) ); 17 | } 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/r_lg10.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #define log10e 0.43429448190325182765 4 | 5 | #ifdef KR_headers 6 | double log(); 7 | double r_lg10(x) real *x; 8 | #else 9 | #undef abs 10 | #include "math.h" 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | double r_lg10(real *x) 15 | #endif 16 | { 17 | return( log10e * log(*x) ); 18 | } 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /tests/testthat/test-cocitation.R: -------------------------------------------------------------------------------- 1 | test_that("cocitation works", { 2 | g <- make_full_graph(10, directed = TRUE) 3 | cocite_mat <- matrix(8, 10, 10) - diag(8, 10) 4 | expect_equal(cocitation(g), cocite_mat) 5 | }) 6 | 7 | test_that("bibcoupling works", { 8 | g <- make_full_graph(10, directed = TRUE) 9 | bib_mat <- matrix(8, 10, 10) - diag(8, 10) 10 | expect_equal(bibcoupling(g), bib_mat) 11 | }) 12 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_dnnt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | shortint h_dnnt(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | shortint h_dnnt(doublereal *x) 13 | #endif 14 | { 15 | return (shortint)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x)); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_dnnt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double floor(); 5 | integer i_dnnt(x) doublereal *x; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | integer i_dnnt(doublereal *x) 13 | #endif 14 | { 15 | return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x)); 16 | } 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /R/old-0_2.R: -------------------------------------------------------------------------------- 1 | oldsample_0_2 <- function() { 2 | list( 3 | 3, 4 | TRUE, 5 | c(0, 1, 2), 6 | c(1, 2, 0), 7 | c(0, 1, 2), 8 | c(2, 0, 1), 9 | seq(0, 3, by = 1), 10 | seq(0, 3, by = 1), 11 | list( 12 | c(1, 0), 13 | list(), 14 | list(bar = c("A", "B", "C")), 15 | list(foo = c("a", "b", "c")) 16 | ) 17 | ) %>% 18 | structure(class = "igraph") 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/create_igraph_version_file.cmake: -------------------------------------------------------------------------------- 1 | # CMake script that generates the IGRAPH_VERSION file in the build folder 2 | # 3 | # Script variables that need to be set before calling it via "cmake -P": 4 | # 5 | # * IGRAPH_VERSION should be set to the exact version number 6 | # * VERSION_FILE_PATH should be set to the name of the version file 7 | 8 | FILE(WRITE "${VERSION_FILE_PATH}" "${IGRAPH_VERSION}") 9 | -------------------------------------------------------------------------------- /.github/workflows/dep-suggests-matrix/action.yml: -------------------------------------------------------------------------------- 1 | name: "Actions to compute a matrix with all suggested packages" 2 | outputs: 3 | matrix: 4 | description: "Generated matrix" 5 | value: ${{ steps.set-matrix.outputs.matrix }} 6 | 7 | runs: 8 | using: "composite" 9 | steps: 10 | - id: set-matrix 11 | run: | 12 | Rscript ./.github/workflows/dep-suggests-matrix/action.R 13 | shell: bash 14 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/d_lg10.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #define log10e 0.43429448190325182765 4 | 5 | #ifdef KR_headers 6 | double log(); 7 | double d_lg10(x) doublereal *x; 8 | #else 9 | #undef abs 10 | #include "math.h" 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | double d_lg10(doublereal *x) 15 | #endif 16 | { 17 | return( log10e * log(*x) ); 18 | } 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /.github/workflows/rate-limit/action.yml: -------------------------------------------------------------------------------- 1 | name: "Check GitHub rate limits" 2 | inputs: 3 | token: # id of input 4 | description: GitHub token, pass secrets.GITHUB_TOKEN 5 | required: true 6 | 7 | runs: 8 | using: "composite" 9 | steps: 10 | - name: Check rate limits 11 | run: | 12 | curl -s --header "authorization: Bearer ${{ inputs.token }}" https://api.github.com/rate_limit 13 | shell: bash 14 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/signal_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #include "signal1.h" 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | ftnint 8 | #ifdef KR_headers 9 | signal_(sigp, proc) integer *sigp; sig_pf proc; 10 | #else 11 | signal_(integer *sigp, sig_pf proc) 12 | #endif 13 | { 14 | int sig; 15 | sig = (int)*sigp; 16 | 17 | return (ftnint)signal(sig, proc); 18 | } 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/abort_.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | #include "f2c.h" 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifdef KR_headers 8 | extern VOID sig_die(); 9 | 10 | int abort_() 11 | #else 12 | extern void sig_die(const char*,int); 13 | 14 | int abort_(void) 15 | #endif 16 | { 17 | sig_die("Fortran abort routine called", 1); 18 | return 0; /* not reached */ 19 | } 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/operators/rewire_internal.h: -------------------------------------------------------------------------------- 1 | #ifndef IGRAPH_OPERATORS_REWIRE_INTERNAL_H 2 | #define IGRAPH_OPERATORS_REWIRE_INTERNAL_H 3 | 4 | #include "igraph_decls.h" 5 | #include "igraph_interface.h" 6 | 7 | __BEGIN_DECLS 8 | 9 | IGRAPH_PRIVATE_EXPORT igraph_error_t igraph_i_rewire( 10 | igraph_t *graph, igraph_integer_t n, igraph_rewiring_t mode, 11 | igraph_bool_t use_adjlist); 12 | 13 | __END_DECLS 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /R/old-0_1_1.R: -------------------------------------------------------------------------------- 1 | oldsample_0_1_1 <- function() { 2 | list( 3 | 3, 4 | TRUE, 5 | rep(c(0, 1, 2), each = 2L), 6 | c(1, 2, 2, 0, 0, 1), 7 | c(1, 0, 3, 2, 5, 4), 8 | c(4, 3, 5, 0, 2, 1), 9 | seq(0, 6, by = 2), 10 | seq(0, 6, by = 2), 11 | list(1, character(0), numeric(0)), 12 | list(3, character(0), numeric(0)), 13 | list(6, character(0), numeric(0)) 14 | ) %>% 15 | structure(class = "igraph") 16 | } 17 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/l_ge.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | logical l_ge(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | logical l_ge(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) >= 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/l_gt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | logical l_gt(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | logical l_gt(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) > 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/l_le.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | logical l_le(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | logical l_le(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) <= 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/l_lt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | logical l_lt(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | logical l_lt(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) < 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /tools/deprecate-make-template.txt: -------------------------------------------------------------------------------- 1 | #' {{new_title}} 2 | #' 3 | #' @description 4 | #' `r lifecycle::badge("deprecated")` 5 | #' 6 | #' `{{old}}()` was renamed to `{{new}}()` to create a more 7 | #' consistent API. 8 | {{inheritParamsOrNot}} 9 | #' @keywords internal 10 | #' @export 11 | {{old}} <- function({{{new_usage}}}) { # nocov start 12 | lifecycle::deprecate_soft("2.0.4", "{{old}}()", "{{new}}()") 13 | {{{inline}}} 14 | } # nocov end 15 | -------------------------------------------------------------------------------- /tools/deprecate-template.txt: -------------------------------------------------------------------------------- 1 | #' {{new_title}} 2 | #' 3 | #' @description 4 | #' `r lifecycle::badge("deprecated")` 5 | #' 6 | #' `{{old}}()` was renamed to `{{new}}()` to create a more 7 | #' consistent API. 8 | {{inheritParamsOrNot}} 9 | #' @keywords internal 10 | #' @export 11 | {{old}} <- function({{{new_usage}}}) { # nocov start 12 | lifecycle::deprecate_soft("2.0.0", "{{old}}()", "{{new}}()") 13 | {{new}}({{args}}) 14 | } # nocov end 15 | -------------------------------------------------------------------------------- /src/vendor/cigraph/igraph.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@PKGCONFIG_LIBDIR@ 4 | includedir=@PKGCONFIG_INCLUDEDIR@ 5 | 6 | Name: libigraph 7 | Description: @PROJECT_DESCRIPTION@ 8 | Version: @PROJECT_VERSION@ 9 | URL: @PROJECT_HOMEPAGE_URL@ 10 | Libs: -L${libdir} -ligraph 11 | Libs.private: @PKGCONFIG_LIBS_PRIVATE@ 12 | Requires.private: @PKGCONFIG_REQUIRES_PRIVATE@ 13 | Cflags: -I${includedir}/igraph 14 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/hl_gt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | shortlogical hl_gt(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | shortlogical hl_gt(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) > 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/hl_lt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | shortlogical hl_lt(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | shortlogical hl_lt(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) < 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/hl_ge.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | shortlogical hl_ge(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | shortlogical hl_ge(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) >= 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/hl_le.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | extern integer s_cmp(); 8 | shortlogical hl_le(a,b,la,lb) char *a, *b; ftnlen la, lb; 9 | #else 10 | extern integer s_cmp(char *, char *, ftnlen, ftnlen); 11 | shortlogical hl_le(char *a, char *b, ftnlen la, ftnlen lb) 12 | #endif 13 | { 14 | return(s_cmp(a,b,la,lb) <= 0); 15 | } 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /R/old-0_5.R: -------------------------------------------------------------------------------- 1 | oldsample_0_5 <- function() { 2 | list( 3 | 3, 4 | TRUE, 5 | c(0, 1, 2), 6 | c(1, 2, 0), 7 | c(0, 1, 2), 8 | c(2, 0, 1), 9 | seq(0, 3, by = 1), 10 | seq(0, 3, by = 1), 11 | list( 12 | c(1, 0), 13 | list() %>% 14 | structure(names = character(0)), 15 | list(bar = c("A", "B", "C")), 16 | list(foo = c("a", "b", "c")) 17 | ) 18 | ) %>% 19 | structure(class = "igraph") 20 | } 21 | -------------------------------------------------------------------------------- /tools/run_examples.R: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env Rscript 2 | 3 | library(igraph) 4 | library(magrittr) 5 | 6 | rd_files <- list.files("./man", pattern = "\\.Rd$", full.names = TRUE) 7 | exfile <- tempfile() 8 | 9 | for (rd_file in rd_files) { 10 | tools::Rd2ex(rd_file, out = exfile, commentDontrun = FALSE) 11 | 12 | if (!file.exists(exfile)) { 13 | next 14 | } 15 | example <- readLines(exfile) 16 | eval(parse(text = paste(example, collapse = "\n"))) 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/custom/before-install/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Custom steps to run before R packages are installed' 2 | 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Define R CMD check error condition 7 | run: | 8 | echo '_R_CHECK_PKG_SIZES_=FALSE' | tee -a $GITHUB_ENV 9 | shell: bash 10 | 11 | - name: Install GLPK on macOS 12 | if: runner.os == 'macOS' 13 | run: | 14 | brew install glpk 15 | shell: bash 16 | -------------------------------------------------------------------------------- /R/old-0_6.R: -------------------------------------------------------------------------------- 1 | oldsample_0_6 <- function() { 2 | list( 3 | 3, 4 | TRUE, 5 | c(0, 1, 2), 6 | c(1, 2, 0), 7 | c(0, 1, 2), 8 | c(2, 0, 1), 9 | seq(0, 3, by = 1), 10 | seq(0, 3, by = 1), 11 | list( 12 | c(1, 0, 1), 13 | list(name = "Ring graph", mutual = FALSE, circular = TRUE), 14 | list(bar = c("A", "B", "C")), 15 | list(foo = c("a", "b", "c")) 16 | ) 17 | ) %>% 18 | structure(class = "igraph") 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/include/igraph_lsap.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef IGRAPH_LSAP_H 3 | #define IGRAPH_LSAP_H 4 | 5 | #include "igraph_decls.h" 6 | #include "igraph_error.h" 7 | #include "igraph_matrix.h" 8 | #include "igraph_vector.h" 9 | #include "igraph_types.h" 10 | 11 | __BEGIN_DECLS 12 | 13 | IGRAPH_EXPORT igraph_error_t igraph_solve_lsap(const igraph_matrix_t *c, igraph_integer_t n, 14 | igraph_vector_int_t *p); 15 | 16 | __END_DECLS 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack_preprocessed_graph.h: -------------------------------------------------------------------------------- 1 | #ifndef PRPACK_PREPROCESSED_GRAPH 2 | #define PRPACK_PREPROCESSED_GRAPH 3 | 4 | namespace prpack { 5 | 6 | // TODO: this class should not be seeable by the users of the library. 7 | // Super graph class. 8 | class prpack_preprocessed_graph { 9 | public: 10 | int num_vs; 11 | int num_es; 12 | double* d; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /man/dot-igraph.progress.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/console.R 3 | \name{.igraph.progress} 4 | \alias{.igraph.progress} 5 | \title{igraph progress} 6 | \usage{ 7 | .igraph.progress(percent, message, clean = FALSE) 8 | } 9 | \arguments{ 10 | \item{percent, message, clean}{Used internally by \code{.igraph.progress()} and \code{.igraph.status()}} 11 | } 12 | \description{ 13 | igraph progress 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/signbit.c: -------------------------------------------------------------------------------- 1 | #include "arith.h" 2 | 3 | #ifndef Long 4 | #define Long long 5 | #endif 6 | 7 | int 8 | #ifdef KR_headers 9 | signbit_f2c(x) double *x; 10 | #else 11 | signbit_f2c(double *x) 12 | #endif 13 | { 14 | #ifdef IEEE_MC68k 15 | if (*(Long*)x & 0x80000000) 16 | return 1; 17 | #else 18 | #ifdef IEEE_8087 19 | if (((Long*)x)[1] & 0x80000000) 20 | return 1; 21 | #endif /*IEEE_8087*/ 22 | #endif /*IEEE_MC68k*/ 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /tools/builddocs.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') 4 | trap "rm -rf ${tempdir}" EXIT 5 | rsync -avq \ 6 | --exclude=cigraph \ 7 | --exclude=.git \ 8 | --exclude=revdep \ 9 | --exclude=.venv \ 10 | . ${tempdir}/ 11 | 12 | ( 13 | cd ${tempdir} 14 | rm -rf src 15 | Rscript -e 'devtools::document()' 16 | ) 17 | 18 | cp doc/*.Rd man/ 19 | cp ${tempdir}/NAMESPACE . 20 | cp -r ${tempdir}/man/* man/ 21 | -------------------------------------------------------------------------------- /src/deps.mk: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | include $(GLUE_C_SOURCES:.o=.dd) 3 | include $(GLUE_CPP_SOURCES:.o=.dd) 4 | 5 | # Include only local dependencies for smaller footprint 6 | # Add trailing backslash and sort 7 | %.dd: %.d 8 | sed -r 's/([^ ]) ([^ \\])/\1 \\\n \2/g' $< | sed -r '/^ +([/]|vendor|[.][.])/D;$$s/([^\\])$$/\1 \\/' | { echo "# Generated by deps.mk, do not edit by hand and do not add dependencies to system headers"; read -r header; printf '%s\n' "$$header"; LC_ALL=C sort; } > $@ 9 | -------------------------------------------------------------------------------- /tools/py-stimulus/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = git@github.com:igraph/stimulus 8 | branch = 0.21.5 9 | commit = f62f215a6d325545b44b59e114c963cf04abb4ce 10 | parent = 63943053a43a247f1bf7628bbf481d400ce3e315 11 | method = merge 12 | cmdver = 0.4.9 13 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/z_sin.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sin(), cos(), sinh(), cosh(); 5 | VOID z_sin(r, z) doublecomplex *r, *z; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | void z_sin(doublecomplex *r, doublecomplex *z) 13 | #endif 14 | { 15 | double zi = z->i, zr = z->r; 16 | r->r = sin(zr) * cosh(zi); 17 | r->i = cos(zr) * sinh(zi); 18 | } 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/z_cos.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sin(), cos(), sinh(), cosh(); 5 | VOID z_cos(r, z) doublecomplex *r, *z; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | void z_cos(doublecomplex *r, doublecomplex *z) 13 | #endif 14 | { 15 | double zi = z->i, zr = z->r; 16 | r->r = cos(zr) * cosh(zi); 17 | r->i = - sin(zr) * sinh(zi); 18 | } 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /man/is_printer_callback.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/printr.R 3 | \name{is_printer_callback} 4 | \alias{is_printer_callback} 5 | \title{Is this a printer callback?} 6 | \usage{ 7 | is_printer_callback(x) 8 | } 9 | \arguments{ 10 | \item{x}{An R object.} 11 | } 12 | \description{ 13 | Is this a printer callback? 14 | } 15 | \seealso{ 16 | Other printer callbacks: 17 | \code{\link{printer_callback}()} 18 | } 19 | \concept{printer callbacks} 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/z_exp.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double exp(), cos(), sin(); 5 | VOID z_exp(r, z) doublecomplex *r, *z; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | void z_exp(doublecomplex *r, doublecomplex *z) 13 | #endif 14 | { 15 | double expx, zi = z->i; 16 | 17 | expx = exp(z->r); 18 | r->r = expx * cos(zi); 19 | r->i = expx * sin(zi); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/operators.md: -------------------------------------------------------------------------------- 1 | # vertices() works 2 | 3 | Can't recycle `name` (size 2) to match `foo` (size 3). 4 | 5 | # vertices() errors on duplicate attribute names 6 | 7 | Duplicate attribute name in `vertices()`: "name". 8 | 9 | --- 10 | 11 | Duplicate attribute name in `vertices()`: "blop". 12 | 13 | --- 14 | 15 | Duplicate attribute name in `vertices()`: "name". 16 | 17 | --- 18 | 19 | Duplicate attribute names in `vertices()`: "foo" and "bar". 20 | 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/c_sin.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | extern double sin(), cos(), sinh(), cosh(); 5 | 6 | VOID c_sin(r, z) f2c_complex *r, *z; 7 | #else 8 | #undef abs 9 | #include "math.h" 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void c_sin(f2c_complex *r, f2c_complex *z) 15 | #endif 16 | { 17 | double zi = z->i, zr = z->r; 18 | r->r = sin(zr) * cosh(zi); 19 | r->i = cos(zr) * sinh(zi); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | # See https://docs.codecov.io/docs/codecov-yaml for documentation 2 | 3 | codecov: 4 | require_ci_to_pass: true 5 | 6 | comment: false 7 | 8 | coverage: 9 | precision: 2 10 | round: down 11 | range: "50...100" 12 | status: 13 | project: 14 | default: 15 | threshold: 0.1% 16 | patch: off 17 | 18 | ignore: 19 | - "src/vendor/arpack" 20 | - "src/vendor/cigraph/vendor" 21 | - "src/vendor/io" 22 | - "src/vendor/simpleraytracer" 23 | - "src/vendor/uuid" 24 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/c_cos.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | extern double sin(), cos(), sinh(), cosh(); 5 | 6 | VOID c_cos(r, z) f2c_complex *r, *z; 7 | #else 8 | #undef abs 9 | #include "math.h" 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void c_cos(f2c_complex *r, f2c_complex *z) 15 | #endif 16 | { 17 | double zi = z->i, zr = z->r; 18 | r->r = cos(zr) * cosh(zi); 19 | r->i = - sin(zr) * sinh(zi); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/typesize.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | ftnlen f__typesize[] = { 0, 0, sizeof(shortint), sizeof(integer), 7 | sizeof(real), sizeof(doublereal), 8 | sizeof(f2c_complex), sizeof(doublecomplex), 9 | sizeof(logical), sizeof(char), 10 | 0, sizeof(integer1), 11 | sizeof(logical1), sizeof(shortlogical), 12 | #ifdef Allow_TYQUAD 13 | sizeof(longint), 14 | #endif 15 | 0}; 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/c_exp.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | extern double exp(), cos(), sin(); 5 | 6 | VOID c_exp(r, z) f2c_complex *r, *z; 7 | #else 8 | #undef abs 9 | #include "math.h" 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void c_exp(f2c_complex *r, f2c_complex *z) 15 | #endif 16 | { 17 | double expx, zi = z->i; 18 | 19 | expx = exp(z->r); 20 | r->r = expx * cos(zi); 21 | r->i = expx * sin(zi); 22 | } 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /tools/py-stimulus/README.md: -------------------------------------------------------------------------------- 1 | # `stimulus` 2 | 3 | This repository hosts an experimental code generator for high-level interfaces 4 | of igraph. 5 | 6 | `stimulus` has already been used to generate a significant part of the codebase 7 | of the R interface of igraph. The aim of this repository is to refactor it in a 8 | way that makes it easier to potentially use `stimulus` for other high-level 9 | interfaces (e.g., the Python interface, which still relies on hand-written code 10 | for the Python bindings). 11 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/pcg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Declare the files needed to compile our vendored copy of the PCG random 2 | # number generator 3 | add_library( 4 | pcg 5 | OBJECT 6 | EXCLUDE_FROM_ALL 7 | pcg-advance-64.c 8 | pcg-advance-128.c 9 | pcg-output-32.c 10 | pcg-output-64.c 11 | pcg-output-128.c 12 | pcg-rngs-64.c 13 | pcg-rngs-128.c 14 | ) 15 | 16 | if (BUILD_SHARED_LIBS) 17 | set_property(TARGET pcg PROPERTY POSITION_INDEPENDENT_CODE ON) 18 | endif() 19 | 20 | use_all_warnings(pcg) 21 | 22 | -------------------------------------------------------------------------------- /src/vendor/uuid/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | R.c 3 | clear.c 4 | compare.c 5 | copy.c 6 | gen_uuid.c 7 | isnull.c 8 | pack.c 9 | parse.c 10 | unpack.c 11 | unparse.c 12 | ) 13 | 14 | add_library(uuid ${SOURCES}) 15 | target_include_directories(uuid PRIVATE ${igraph_BINARY_DIR}/include ${rigraph_SOURCE_DIR}) 16 | 17 | install( 18 | TARGETS uuid 19 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 20 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 21 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 22 | ) 23 | -------------------------------------------------------------------------------- /tests/testthat/test-utils-assert-args.R: -------------------------------------------------------------------------------- 1 | test_that("ensure_igraph() works", { 2 | expect_snapshot_error(ensure_igraph(1)) 3 | expect_snapshot_error(ensure_igraph(NA)) 4 | expect_snapshot_error(ensure_igraph(NULL)) 5 | expect_silent(ensure_igraph(make_empty_graph())) 6 | expect_silent(ensure_igraph(NULL, optional = TRUE)) 7 | }) 8 | 9 | test_that("igraph_match_arg() works", { 10 | expect_snapshot( 11 | cluster_leiden(make_graph("Zachary"), objective_function = "something"), 12 | error = TRUE 13 | ) 14 | }) 15 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/c_log.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | extern double log(), f__cabs(), atan2(); 5 | VOID c_log(r, z) f2c_complex *r, *z; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | extern double f__cabs(double, double); 13 | 14 | void c_log(f2c_complex *r, f2c_complex *z) 15 | #endif 16 | { 17 | double zi, zr; 18 | r->i = atan2(zi = z->i, zr = z->r); 19 | r->r = log( f__cabs(zr, zi) ); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /tags 2 | /R/printr.R 3 | /autom4te.cache/ 4 | /config.log 5 | /config.status 6 | /igraph_*.tar.gz 7 | /igraph_*.tgz 8 | /object_files 9 | /version_number 10 | igraph.Rcheck/ 11 | .venv/ 12 | .Rproj.user 13 | /configure~ 14 | /src/build/ 15 | /src/install/ 16 | inst/doc 17 | cran 18 | /CRAN-SUBMISSION 19 | /docs 20 | /compile_commands.json 21 | /.cache 22 | /rchk 23 | /src/*.d 24 | /src/symbols.rds 25 | /tests/testthat/testthat-problems.rds 26 | /covr 27 | /.vscode/launch.json 28 | /Rplots.pdf 29 | /_codeql_detected_source_root 30 | -------------------------------------------------------------------------------- /.github/copilot-instructions.md: -------------------------------------------------------------------------------- 1 | # GitHub Copilot Instructions for igraph/rigraph 2 | 3 | > **Note**: For general development guidelines, code style conventions, and AI agent instructions, see [`AGENTS.md`](../AGENTS.md) in the repository root. 4 | 5 | ## Common Commands for Copilot Chat 6 | 7 | - Load for development: `pkgload::load_all()` 8 | - Run tests: `testthat::test_local(reporter = "check")` 9 | - Format code: `air format .` 10 | - Update documentation: `devtools::document()` 11 | 12 | Refer to `AGENTS.md` for more instructions. 13 | -------------------------------------------------------------------------------- /.github/workflows/versions-matrix/action.yml: -------------------------------------------------------------------------------- 1 | name: "Actions to compute a matrix with all R and OS versions" 2 | 3 | outputs: 4 | matrix: 5 | description: "Generated matrix" 6 | value: ${{ steps.set-matrix.outputs.matrix }} 7 | 8 | runs: 9 | using: "composite" 10 | steps: 11 | - name: Install json2yaml 12 | run: | 13 | sudo npm install -g json2yaml 14 | shell: bash 15 | 16 | - id: set-matrix 17 | run: | 18 | Rscript ./.github/workflows/versions-matrix/action.R 19 | shell: bash 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_gaxpy.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* y = A*x+y */ 3 | CS_INT cs_gaxpy (const cs *A, const CS_ENTRY *x, CS_ENTRY *y) 4 | { 5 | CS_INT p, j, n, *Ap, *Ai ; 6 | CS_ENTRY *Ax ; 7 | if (!CS_CSC (A) || !x || !y) return (0) ; /* check inputs */ 8 | n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ; 9 | for (j = 0 ; j < n ; j++) 10 | { 11 | for (p = Ap [j] ; p < Ap [j+1] ; p++) 12 | { 13 | y [Ai [p]] += Ax [p] * x [j] ; 14 | } 15 | } 16 | return (1) ; 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_entry.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* add an entry to a triplet matrix; return 1 if ok, 0 otherwise */ 3 | CS_INT cs_entry (cs *T, CS_INT i, CS_INT j, CS_ENTRY x) 4 | { 5 | if (!CS_TRIPLET (T) || i < 0 || j < 0) return (0) ; /* check inputs */ 6 | if (T->nz >= T->nzmax && !cs_sprealloc (T,2*(T->nzmax))) return (0) ; 7 | if (T->x) T->x [T->nz] = x ; 8 | T->i [T->nz] = i ; 9 | T->p [T->nz++] = j ; 10 | T->m = CS_MAX (T->m, i+1) ; 11 | T->n = CS_MAX (T->n, j+1) ; 12 | return (1) ; 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/ef1cmc_.c: -------------------------------------------------------------------------------- 1 | /* EFL support routine to compare two character strings */ 2 | 3 | #include "f2c.h" 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifdef KR_headers 9 | extern integer s_cmp(); 10 | integer ef1cmc_(a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb; 11 | #else 12 | extern integer s_cmp(char*,char*,ftnlen,ftnlen); 13 | integer ef1cmc_(ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb) 14 | #endif 15 | { 16 | return( s_cmp( (char *)a, (char *)b, *la, *lb) ); 17 | } 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/glpk/draft/draft.h: -------------------------------------------------------------------------------- 1 | /* draft.h */ 2 | 3 | #ifndef DRAFT_H 4 | #define DRAFT_H 5 | 6 | #if 1 /* 28/III-2016 */ 7 | #define GLP_UNDOC 1 8 | #endif 9 | #include "glpk.h" 10 | 11 | #if 1 /* 28/XI-2009 */ 12 | int _glp_analyze_row(glp_prob *P, int len, const int ind[], 13 | const double val[], int type, double rhs, double eps, int *_piv, 14 | double *_x, double *_dx, double *_y, double *_dy, double *_dz); 15 | /* simulate one iteration of dual simplex method */ 16 | #endif 17 | 18 | #endif 19 | 20 | /* eof */ 21 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/trees.md: -------------------------------------------------------------------------------- 1 | # subgraph.edges deprecation 2 | 3 | Code 4 | subgraph.edges(g, edges, delete.vertices = FALSE) 5 | Condition 6 | Warning: 7 | `subgraph.edges()` was deprecated in igraph 2.1.0. 8 | i Please use `subgraph_from_edges()` instead. 9 | Output 10 | IGRAPH U--- 13 11 -- 11 | + attr: name_1 (g/c), name_2 (g/c), loops_1 (g/l), loops_2 (g/l) 12 | + edges: 13 | [1] 1-- 2 1-- 8 3-- 6 3-- 8 4-- 5 5-- 7 6-- 7 9--11 9--13 10--13 14 | [11] 12--13 15 | 16 | -------------------------------------------------------------------------------- /.github/workflows/get-extra/action.yml: -------------------------------------------------------------------------------- 1 | name: "Action to determine extra packages to be installed" 2 | outputs: 3 | packages: 4 | description: "List of extra packages" 5 | value: ${{ steps.get-extra.outputs.packages }} 6 | 7 | runs: 8 | using: "composite" 9 | steps: 10 | - name: Get extra packages 11 | id: get-extra 12 | run: | 13 | set -x 14 | packages=$( ( grep Config/gha/extra-packages DESCRIPTION || true ) | cut -d " " -f 2) 15 | echo packages=$packages >> $GITHUB_OUTPUT 16 | shell: bash 17 | -------------------------------------------------------------------------------- /R/as_phylo.R: -------------------------------------------------------------------------------- 1 | #' @rdname as_phylo 2 | #' @title as_phylo 3 | #' @description `r lifecycle::badge("deprecated")` 4 | #' 5 | #' `as_phylo` methods were renamed `as.phylo` 6 | #' for more consistency with other R methods. 7 | #' 8 | #' @export 9 | #' @param x object to be coerced 10 | #' @inheritParams ape::as.phylo 11 | #' @keywords internal 12 | as_phylo <- function(x, ...) { 13 | lifecycle::deprecate_soft( 14 | "1.5.0", 15 | "ape::as.phylo()" 16 | ) 17 | check_installed("ape", "for using `as.phylo()`") 18 | UseMethod("as.phylo") 19 | } 20 | -------------------------------------------------------------------------------- /man/get.edge.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/basic.R 3 | \name{get.edge} 4 | \alias{get.edge} 5 | \title{Incident vertices of some graph edges} 6 | \usage{ 7 | get.edge(graph, id) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | Use \code{\link[=ends]{ends()}}. 16 | } 17 | \keyword{internal} 18 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_pinv.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* pinv = p', or p = pinv' */ 3 | CS_INT *cs_pinv (CS_INT const *p, CS_INT n) 4 | { 5 | CS_INT k, *pinv ; 6 | if (!p) return (NULL) ; /* p = NULL denotes identity */ 7 | pinv = cs_malloc (n, sizeof (CS_INT)) ; /* allocate result */ 8 | if (!pinv) return (NULL) ; /* out of memory */ 9 | for (k = 0 ; k < n ; k++) pinv [p [k]] = k ;/* invert the permutation */ 10 | return (pinv) ; /* return result */ 11 | } 12 | -------------------------------------------------------------------------------- /R/idx.R: -------------------------------------------------------------------------------- 1 | # Indexes into unclass(g) 2 | igraph_t_idx_n <- 1L 3 | igraph_t_idx_directed <- 2L 4 | igraph_t_idx_from <- 3L 5 | igraph_t_idx_to <- 4L 6 | igraph_t_idx_oi <- 5L 7 | igraph_t_idx_ii <- 6L 8 | igraph_t_idx_os <- 7L 9 | igraph_t_idx_is <- 8L 10 | igraph_t_idx_attr <- 9L 11 | igraph_t_idx_env <- 10L 12 | igraph_t_idx_max <- 11L 13 | 14 | # Indexes into unclass(g)[[igraph_t_idx_attr]] 15 | igraph_attr_idx_unknown <- 1L # integer of length 3, for what purpose? 16 | igraph_attr_idx_graph <- 2L 17 | igraph_attr_idx_vertex <- 3L 18 | igraph_attr_idx_edge <- 4L 19 | -------------------------------------------------------------------------------- /man/tkplot.off.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkplot.R 3 | \name{tkplot.off} 4 | \alias{tkplot.off} 5 | \title{Interactive plotting of graphs} 6 | \usage{ 7 | tkplot.off() 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{tkplot.off()} was renamed to \code{\link[=tk_off]{tk_off()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_ci.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | VOID pow_ci(p, a, b) /* p = a**b */ 8 | f2c_complex *p, *a; integer *b; 9 | #else 10 | extern void pow_zi(doublecomplex*, doublecomplex*, integer*); 11 | void pow_ci(f2c_complex *p, f2c_complex *a, integer *b) /* p = a**b */ 12 | #endif 13 | { 14 | doublecomplex p1, a1; 15 | 16 | a1.r = a->r; 17 | a1.i = a->i; 18 | 19 | pow_zi(&p1, &a1, b); 20 | 21 | p->r = p1.r; 22 | p->i = p1.i; 23 | } 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /man/igraph.console.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/console.R 3 | \name{igraph.console} 4 | \alias{igraph.console} 5 | \title{The igraph console} 6 | \usage{ 7 | igraph.console() 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{igraph.console()} was renamed to \code{\link[=console]{console()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_norm.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* 1-norm of a sparse matrix = max (sum (abs (A))), largest column sum */ 3 | double cs_norm (const cs *A) 4 | { 5 | CS_INT p, j, n, *Ap ; 6 | CS_ENTRY *Ax ; 7 | double norm = 0, s ; 8 | if (!CS_CSC (A) || !A->x) return (-1) ; /* check inputs */ 9 | n = A->n ; Ap = A->p ; Ax = A->x ; 10 | for (j = 0 ; j < n ; j++) 11 | { 12 | for (s = 0, p = Ap [j] ; p < Ap [j+1] ; p++) s += CS_ABS (Ax [p]) ; 13 | norm = CS_MAX (norm, s) ; 14 | } 15 | return (norm) ; 16 | } 17 | -------------------------------------------------------------------------------- /man/graph_.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{graph_} 4 | \alias{graph_} 5 | \title{Convert object to a graph} 6 | \usage{ 7 | graph_(...) 8 | } 9 | \arguments{ 10 | \item{...}{Parameters, see details below.} 11 | } 12 | \description{ 13 | This is a generic function to convert R objects to igraph graphs. 14 | } 15 | \details{ 16 | TODO 17 | } 18 | \examples{ 19 | ## These are equivalent 20 | graph_(cbind(1:5, 2:6), from_edgelist(directed = FALSE)) 21 | graph_(cbind(1:5, 2:6), from_edgelist(), directed = FALSE) 22 | } 23 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/utils-assert-args.md: -------------------------------------------------------------------------------- 1 | # ensure_igraph() works 2 | 3 | Must provide a graph object (provided wrong object type). 4 | 5 | --- 6 | 7 | Must provide a graph object (provided wrong object type). 8 | 9 | --- 10 | 11 | Must provide a graph object (provided `NULL`). 12 | 13 | # igraph_match_arg() works 14 | 15 | Code 16 | cluster_leiden(make_graph("Zachary"), objective_function = "something") 17 | Condition 18 | Error in `cluster_leiden()`: 19 | ! `objective_function` must be one of "cpm" or "modularity", not "something". 20 | 21 | -------------------------------------------------------------------------------- /tools/py-stimulus/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | fail_fast: true 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v4.0.1 5 | hooks: 6 | - id: check-ast 7 | - id: end-of-file-fixer 8 | - id: trailing-whitespace 9 | 10 | - repo: https://github.com/charliermarsh/ruff-pre-commit 11 | rev: v0.0.275 12 | hooks: 13 | - id: ruff 14 | args: [--fix, --exit-non-zero-on-fix] 15 | 16 | - repo: https://github.com/psf/black 17 | rev: 22.3.0 18 | hooks: 19 | - id: black 20 | language_version: python3 21 | -------------------------------------------------------------------------------- /man/maxcohesion.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cohesive.blocks.R 3 | \name{maxcohesion} 4 | \alias{maxcohesion} 5 | \title{Calculate Cohesive Blocks} 6 | \usage{ 7 | maxcohesion(blocks) 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{maxcohesion()} was renamed to \code{\link[=max_cohesion]{max_cohesion()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /revdep/times.R: -------------------------------------------------------------------------------- 1 | library(tidyverse) 2 | 3 | fs::dir_ls("revdep/cloud.noindex/aca814a4-3c75-4496-ac24-1761eb50ad8b", glob = "*/*/*.Rcheck/00check.log", recurse = TRUE) |> 4 | fs::file_info() |> 5 | mutate(rcheck = fs::path_file(fs::path_dir(path))) |> 6 | summarize(.by = rcheck, modification_time = max(modification_time)) |> 7 | arrange(modification_time) |> 8 | transmute( 9 | count = row_number(), 10 | rate = count / n(), 11 | duration = hms::as_hms(modification_time - min(modification_time)) 12 | ) |> 13 | ggplot(aes(x = duration, y = count)) + 14 | geom_line() 15 | -------------------------------------------------------------------------------- /tests/testthat/test-stochastic_matrix.R: -------------------------------------------------------------------------------- 1 | test_that("stochastic_matrix works", { 2 | g <- make_star(5, "undirected") 3 | adj_mat <- as_adjacency_matrix(g) 4 | stoch_mat_manual <- adj_mat / degree(g) 5 | stoch_mat_calc <- stochastic_matrix(g) 6 | expect_equal( 7 | as_unnamed_dense_matrix(stoch_mat_manual), 8 | as_unnamed_dense_matrix(stoch_mat_calc) 9 | ) 10 | 11 | stoch_mat_calc_col <- stochastic_matrix(g, column.wise = TRUE) 12 | expect_equal( 13 | t(as_unnamed_dense_matrix(stoch_mat_manual)), 14 | as_unnamed_dense_matrix(stoch_mat_calc_col) 15 | ) 16 | }) 17 | -------------------------------------------------------------------------------- /R/release.R: -------------------------------------------------------------------------------- 1 | # https://usethis.r-lib.org/reference/use_release_issue.html#customization 2 | # https://github.com/igraph/rigraph/issues/1976 3 | release_bullets <- function() { 4 | c( 5 | "`allcontributors::add_contributors()` to update allcontributors' data in the README.", 6 | "Update docs based on the C docs.", 7 | "Draft a post for the igraph and cynkra blogs.", 8 | "Submit link to that post to R weekly + cynkra's social media platforms.", 9 | "Add the link to the blog post to the pkgdown's release menu.", 10 | "Announce the release on the igraph forum." 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/safe_math_support.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCXXSourceCompiles) 2 | 3 | # Check whether the compiler supports the __builtin_add_overflow() and __builtin_mul_overflow() 4 | # builtins. These are present in recent GCC-compatible compilers. 5 | cmake_push_check_state(RESET) 6 | 7 | check_cxx_source_compiles(" 8 | int main(void) { 9 | long long a=1, b=2, c; 10 | __builtin_add_overflow(a, b, &c); 11 | __builtin_mul_overflow(a, b, &c); 12 | return 0; 13 | } 14 | " 15 | HAVE_BUILTIN_OVERFLOW 16 | ) 17 | 18 | cmake_pop_check_state() 19 | -------------------------------------------------------------------------------- /R/revdep.R: -------------------------------------------------------------------------------- 1 | pkg_review <- function(pkg, pak = TRUE) { 2 | base_path <- "revdep/review" 3 | fs::dir_create(base_path) 4 | 5 | pkg_path <- fs::path(base_path, pkg) 6 | 7 | if (fs::dir_exists(pkg_path)) { 8 | system(paste0("git -C ", pkg_path, " fetch")) 9 | system(paste0("git -C ", pkg_path, " rebase")) 10 | } else { 11 | system(paste0("git -C ", base_path, " clone git@github.com:cran/", pkg)) 12 | } 13 | 14 | withr::local_dir(pkg_path) 15 | system("positron .") 16 | 17 | if (pak) { 18 | pak::pak(pkg, dependencies = TRUE, upgrade = TRUE, ask = FALSE) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /man/igraph.version.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/versions.R 3 | \name{igraph.version} 4 | \alias{igraph.version} 5 | \title{Query igraph's version string} 6 | \usage{ 7 | igraph.version() 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{igraph.version()} was renamed to \code{\link[=igraph_version]{igraph_version()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /man/indent_print.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/printr.R 3 | \name{indent_print} 4 | \alias{indent_print} 5 | \title{Indent a printout} 6 | \usage{ 7 | indent_print(..., .indent = " ", .printer = print) 8 | } 9 | \arguments{ 10 | \item{...}{Passed to the printing function.} 11 | 12 | \item{.indent}{Character scalar, indent the printout with this.} 13 | 14 | \item{.printer}{The printing function, defaults to \link{print}.} 15 | } 16 | \value{ 17 | The first element in \code{...}, invisibly. 18 | } 19 | \description{ 20 | Indent a printout 21 | } 22 | -------------------------------------------------------------------------------- /man/is.named.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{is.named} 4 | \alias{is.named} 5 | \title{Named graphs} 6 | \usage{ 7 | is.named(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{is.named()} was renamed to \code{\link[=is_named]{is_named()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/i_indx.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer i_indx(a, b, la, lb) char *a, *b; ftnlen la, lb; 8 | #else 9 | integer i_indx(char *a, char *b, ftnlen la, ftnlen lb) 10 | #endif 11 | { 12 | ftnlen i, n; 13 | char *s, *t, *bend; 14 | 15 | n = la - lb + 1; 16 | bend = b + lb; 17 | 18 | for(i = 0 ; i < n ; ++i) 19 | { 20 | s = a + i; 21 | t = b; 22 | while(t < bend) 23 | if(*s++ != *t++) 24 | goto no; 25 | return(i+1); 26 | no: ; 27 | } 28 | return(0); 29 | } 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/glpk/api/rmfgen.c: -------------------------------------------------------------------------------- 1 | /* rmfgen.c */ 2 | 3 | #include "env.h" 4 | #include "glpk.h" 5 | 6 | int glp_rmfgen(glp_graph *G_, int *s_, int *t_, int a_cap_, 7 | const int parm[1+5]) 8 | { static const char func[] = "glp_rmfgen"; 9 | xassert(G_ == G_); 10 | xassert(s_ == s_); 11 | xassert(t_ == t_); 12 | xassert(a_cap_ == a_cap_); 13 | xassert(parm == parm); 14 | xerror("%s: sorry, this routine is temporarily disabled due to li" 15 | "censing problems\n", func); 16 | /* abort(); */ 17 | return -1; 18 | } 19 | 20 | /* eof */ 21 | -------------------------------------------------------------------------------- /igraph.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | ProjectId: ffa46ea4-a86f-4aac-9f09-64b2da845d3c 3 | 4 | RestoreWorkspace: No 5 | SaveWorkspace: No 6 | AlwaysSaveHistory: Default 7 | 8 | EnableCodeIndexing: Yes 9 | UseSpacesForTab: Yes 10 | NumSpacesForTab: 2 11 | Encoding: UTF-8 12 | 13 | RnwWeave: Sweave 14 | LaTeX: pdfLaTeX 15 | 16 | AutoAppendNewline: Yes 17 | StripTrailingWhitespace: Yes 18 | LineEndingConversion: Posix 19 | 20 | BuildType: Package 21 | PackageUseDevtools: Yes 22 | PackageInstallArgs: --no-multiarch --with-keep.source 23 | PackageRoxygenize: rd,collate,namespace,igraph.r2cdocs::cdocs_roclet,devtag::dev_roclet 24 | -------------------------------------------------------------------------------- /man/dot-apply_modifiers.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{.apply_modifiers} 4 | \alias{.apply_modifiers} 5 | \title{Applies a set of constructor modifiers to an already constructed graph.} 6 | \usage{ 7 | .apply_modifiers(graph, mods) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph to apply the modifiers to} 11 | 12 | \item{mods}{The modifiers to apply} 13 | } 14 | \value{ 15 | The modified graph 16 | } 17 | \description{ 18 | This is a helper function for the common parts of \code{make_()} and 19 | \code{sample_()}. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/is.simple.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/simple.R 3 | \name{is.simple} 4 | \alias{is.simple} 5 | \title{Simple graphs} 6 | \usage{ 7 | is.simple(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph to work on.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{is.simple()} was renamed to \code{\link[=is_simple]{is_simple()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/showtrace.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/community.R 3 | \name{showtrace} 4 | \alias{showtrace} 5 | \title{Functions to deal with the result of network community detection} 6 | \usage{ 7 | showtrace(communities) 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{showtrace()} was renamed to \code{\link[=show_trace]{show_trace()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /cran-comments.template.md: -------------------------------------------------------------------------------- 1 | ## Test environments 2 | 3 | * local R installation, R 4.1.1 4 | * ubuntu 20.04 (on Github Actions), R 3.4.4, R 3.5.3, R 4.0.5, R 4.1.1 and R-devel 5 | * windows-latest (on Github Actions), R 4.1.1 6 | * macOS-latest (on Github Actions), R 4.1.1 7 | 8 | ## R CMD check results 9 | 10 | X errors | Y warnings | Z notes 11 | 12 | * Add comments to CRAN maintainers here. 13 | 14 | ## revdepcheck results 15 | 16 | * Paste the output of revdepcheck from revdep/ here 17 | * Extend the output with explanations about each failure that we believe should 18 | be ignored because they are not our fault 19 | -------------------------------------------------------------------------------- /man/code.length.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/community.R 3 | \name{code.length} 4 | \alias{code.length} 5 | \title{Functions to deal with the result of network community detection} 6 | \usage{ 7 | code.length(communities) 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{code.length()} was renamed to \code{\link[=code_len]{code_len()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/dolio.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | #ifdef KR_headers 10 | extern int (*f__lioproc)(); 11 | 12 | integer do_lio(type,number,ptr,len) ftnint *number,*type; char *ptr; ftnlen len; 13 | #else 14 | extern int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint); 15 | 16 | integer do_lio(ftnint *type, ftnint *number, char *ptr, ftnlen len) 17 | #endif 18 | { 19 | return((*f__lioproc)(number,ptr,len,*type)); 20 | } 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/h_indx.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint h_indx(a, b, la, lb) char *a, *b; ftnlen la, lb; 8 | #else 9 | shortint h_indx(char *a, char *b, ftnlen la, ftnlen lb) 10 | #endif 11 | { 12 | ftnlen i, n; 13 | char *s, *t, *bend; 14 | 15 | n = la - lb + 1; 16 | bend = b + lb; 17 | 18 | for(i = 0 ; i < n ; ++i) 19 | { 20 | s = a + i; 21 | t = b; 22 | while(t < bend) 23 | if(*s++ != *t++) 24 | goto no; 25 | return((shortint)i+1); 26 | no: ; 27 | } 28 | return(0); 29 | } 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /inst/benchmarks/time_sgm.R: -------------------------------------------------------------------------------- 1 | time_group("Seeded graph matching") 2 | 3 | time_that( 4 | "SGM is fast(er)", 5 | replications = 10, 6 | init = { 7 | library(igraph) 8 | set.seed(42) 9 | vc <- 200 10 | nos = 10 11 | }, 12 | reinit = { 13 | g1 <- erdos.renyi.game(vc, .01) 14 | perm <- c(1:nos, sample(vc-nos)+nos) 15 | g2 <- sample_correlated_gnp(g1, corr = .7, p = g1$p, permutation = perm) 16 | }, 17 | { 18 | match_vertices( 19 | g1[], 20 | g2[], 21 | m = nos, 22 | start = matrix(1/(vc-nos), vc-nos, vc-nos), 23 | iteration = 20 24 | ) 25 | } 26 | ) 27 | -------------------------------------------------------------------------------- /man/is.igraph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/basic.R 3 | \name{is.igraph} 4 | \alias{is.igraph} 5 | \title{Is this object an igraph graph?} 6 | \usage{ 7 | is.igraph(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{An R object.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{is.igraph()} was renamed to \code{\link[=is_igraph]{is_igraph()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/simpleraytracer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | Color.cpp 3 | Light.cpp 4 | Point.cpp 5 | RIgraphRay.cpp 6 | Ray.cpp 7 | RayTracer.cpp 8 | RayVector.cpp 9 | Shape.cpp 10 | Sphere.cpp 11 | Triangle.cpp 12 | unit_limiter.cpp 13 | ) 14 | 15 | add_library(simpleraytracer ${SOURCES}) 16 | target_include_directories(simpleraytracer PRIVATE ${igraph_BINARY_DIR}/include ${rigraph_SOURCE_DIR}) 17 | 18 | install( 19 | TARGETS simpleraytracer 20 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 21 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 22 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 23 | ) 24 | -------------------------------------------------------------------------------- /inst/benchmarks/time_call.R: -------------------------------------------------------------------------------- 1 | time_group(".Call from R") 2 | 3 | time_that( 4 | "Redefining .Call does not have much overhead #1", 5 | replications = 10, 6 | init = { 7 | library(igraph) 8 | g <- graph.ring(100) 9 | }, 10 | { 11 | for (i in 1:20000) { 12 | .Call(R_igraph_vcount, g) 13 | } 14 | } 15 | ) 16 | 17 | time_that( 18 | "Redefining .Call does not have much overhead #1", 19 | replications = 10, 20 | init = { 21 | library(igraph) 22 | g <- graph.ring(100) 23 | }, 24 | { 25 | for (i in 1:20000) { 26 | igraph:::.Call(R_igraph_vcount, g) 27 | } 28 | } 29 | ) 30 | -------------------------------------------------------------------------------- /inst/benchmarks/time_fr_layout.R: -------------------------------------------------------------------------------- 1 | time_group("Fruchterman-Reingold layout") 2 | 3 | time_that( 4 | "FR layout is fast, connected", 5 | replications = 10, 6 | init = { 7 | library(igraph) 8 | set.seed(42) 9 | }, 10 | reinit = { 11 | g <- sample_pa(400) 12 | }, 13 | { 14 | layout_with_fr(g, niter = 500) 15 | } 16 | ) 17 | 18 | time_that( 19 | "FR layout is fast, unconnected", 20 | replications = 10, 21 | init = { 22 | library(igraph) 23 | set.seed(42) 24 | }, 25 | reinit = { 26 | g <- sample_gnm(400, 400) 27 | }, 28 | { 29 | layout_with_fr(g, niter = 500) 30 | } 31 | ) 32 | -------------------------------------------------------------------------------- /man/is.weighted.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{is.weighted} 4 | \alias{is.weighted} 5 | \title{Weighted graphs} 6 | \usage{ 7 | is.weighted(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{is.weighted()} was renamed to \code{\link[=is_weighted]{is_weighted()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_lsolve.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* solve Lx=b where x and b are dense. x=b on input, solution on output. */ 3 | CS_INT cs_lsolve (const cs *L, CS_ENTRY *x) 4 | { 5 | CS_INT p, j, n, *Lp, *Li ; 6 | CS_ENTRY *Lx ; 7 | if (!CS_CSC (L) || !x) return (0) ; /* check inputs */ 8 | n = L->n ; Lp = L->p ; Li = L->i ; Lx = L->x ; 9 | for (j = 0 ; j < n ; j++) 10 | { 11 | x [j] /= Lx [Lp [j]] ; 12 | for (p = Lp [j]+1 ; p < Lp [j+1] ; p++) 13 | { 14 | x [Li [p]] -= Lx [p] * x [j] ; 15 | } 16 | } 17 | return (1) ; 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/simpleraytracer/Triangle.h: -------------------------------------------------------------------------------- 1 | /** Triangle.h 2 | */ 3 | 4 | #ifndef TRIANGLE_H 5 | #define TRIANGLE_H 6 | 7 | #include "Shape.h" 8 | 9 | namespace igraph { 10 | 11 | class Triangle : public Shape 12 | { 13 | public: 14 | Triangle(); 15 | Triangle(const Point& rPoint1, const Point& rPoint2, const Point& rPoint3); 16 | ~Triangle(); 17 | 18 | virtual bool Intersect(const Ray& vRay, Point& vIntersectPoint) const; 19 | virtual Vector Normal(const Point& rSurfacePoint, const Point& rOffSurface) const; 20 | 21 | private: 22 | Point mPoint1, mPoint2, mPoint3; 23 | }; 24 | 25 | } // namespace igraph 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/glpk/api/netgen.c: -------------------------------------------------------------------------------- 1 | /* netgen.c */ 2 | 3 | #include "env.h" 4 | #include "glpk.h" 5 | 6 | int glp_netgen(glp_graph *G_, int v_rhs_, int a_cap_, int a_cost_, 7 | const int parm[1+15]) 8 | { static const char func[] = "glp_netgen"; 9 | xassert(G_ == G_); 10 | xassert(v_rhs_ == v_rhs_); 11 | xassert(a_cap_ == a_cap_); 12 | xassert(a_cost_ == a_cost_); 13 | xassert(parm == parm); 14 | xerror("%s: sorry, this routine is temporarily disabled due to li" 15 | "censing problems\n", func); 16 | /* abort(); */ 17 | return -1; 18 | } 19 | 20 | /* eof */ 21 | -------------------------------------------------------------------------------- /src/vendor/simpleraytracer/Ray.h: -------------------------------------------------------------------------------- 1 | /** Ray.h 2 | */ 3 | 4 | #ifndef RAY_H 5 | #define RAY_H 6 | 7 | #include "RayVector.h" 8 | #include "Point.h" 9 | 10 | namespace igraph { 11 | 12 | class Ray 13 | { 14 | public: 15 | Ray(); 16 | Ray(const Point& rOrigin, const Vector& rDirection); 17 | Ray(const Point& rOrigin, const Point& rEndPoint); 18 | ~Ray(); 19 | 20 | void Origin(Point vPoint); 21 | const Point& Origin() const; 22 | 23 | const Vector& Direction() const; 24 | void Direction(Vector vDirection); 25 | 26 | private: 27 | Vector mDirection; 28 | Point mOrigin; 29 | }; 30 | 31 | } // namespace igraph 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/paths.md: -------------------------------------------------------------------------------- 1 | # radius() works -- lifecycle 2 | 3 | Code 4 | radius(g, "out") 5 | Condition 6 | Warning: 7 | The `...` argument of `radius()` is deprecated as of igraph 2.1.0. 8 | i The argument `mode` must be named. 9 | Output 10 | [1] 0 11 | 12 | # eccentricity() works -- lifecycle 13 | 14 | Code 15 | eccentricity(g, vids = V(g), "out") 16 | Condition 17 | Warning: 18 | The `...` argument of `eccentricity()` is deprecated as of igraph 2.1.0. 19 | i The argument `mode` must be named. 20 | Output 21 | [1] 3 2 1 1 1 0 0 0 0 0 22 | 23 | -------------------------------------------------------------------------------- /man/is_igraph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/basic.R 3 | \name{is_igraph} 4 | \alias{is_igraph} 5 | \title{Is this object an igraph graph?} 6 | \usage{ 7 | is_igraph(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{An R object.} 11 | } 12 | \value{ 13 | A logical constant, \code{TRUE} if argument \code{graph} is a graph 14 | object. 15 | } 16 | \description{ 17 | Is this object an igraph graph? 18 | } 19 | \examples{ 20 | 21 | g <- make_ring(10) 22 | is_igraph(g) 23 | is_igraph(numeric(10)) 24 | } 25 | \author{ 26 | Gabor Csardi \email{csardi.gabor@gmail.com} 27 | } 28 | \keyword{graphs} 29 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_usolve.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* solve Ux=b where x and b are dense. x=b on input, solution on output. */ 3 | CS_INT cs_usolve (const cs *U, CS_ENTRY *x) 4 | { 5 | CS_INT p, j, n, *Up, *Ui ; 6 | CS_ENTRY *Ux ; 7 | if (!CS_CSC (U) || !x) return (0) ; /* check inputs */ 8 | n = U->n ; Up = U->p ; Ui = U->i ; Ux = U->x ; 9 | for (j = n-1 ; j >= 0 ; j--) 10 | { 11 | x [j] /= Ux [Up [j+1]-1] ; 12 | for (p = Up [j] ; p < Up [j+1]-1 ; p++) 13 | { 14 | x [Ui [p]] -= Ux [p] * x [j] ; 15 | } 16 | } 17 | return (1) ; 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/glpk/api/gridgen.c: -------------------------------------------------------------------------------- 1 | /* gridgen.c */ 2 | 3 | #include "env.h" 4 | #include "glpk.h" 5 | 6 | int glp_gridgen(glp_graph *G_, int v_rhs_, int a_cap_, int a_cost_, 7 | const int parm[1+14]) 8 | { static const char func[] = "glp_gridgen"; 9 | xassert(G_ == G_); 10 | xassert(v_rhs_ == v_rhs_); 11 | xassert(a_cap_ == a_cap_); 12 | xassert(a_cost_ == a_cost_); 13 | xassert(parm == parm); 14 | xerror("%s: sorry, this routine is temporarily disabled due to li" 15 | "censing problems\n", func); 16 | /* abort(); */ 17 | return -1; 18 | } 19 | 20 | /* eof */ 21 | -------------------------------------------------------------------------------- /tools/py-stimulus/tbump.toml: -------------------------------------------------------------------------------- 1 | [version] 2 | current = "0.21.5" 3 | regex = ''' 4 | (?P\d+) 5 | \. 6 | (?P\d+) 7 | \. 8 | (?P\d+) 9 | ''' 10 | 11 | [git] 12 | message_template = "chore: bumped version to {new_version}" 13 | tag_template = "{new_version}" 14 | 15 | [[file]] 16 | src = "pyproject.toml" 17 | search = 'version = "{current_version}"' 18 | 19 | [[file]] 20 | src = "src/stimulus/version.py" 21 | version_template = "({major}, {minor}, {patch})" 22 | search = "__version_info__ = {current_version}" 23 | 24 | [[before_commit]] 25 | name = "Run pre-commit hooks" 26 | cmd = "pre-commit run --all-files" 27 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/rewind.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #include "fio.h" 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | #ifdef KR_headers 7 | integer f_rew(a) alist *a; 8 | #else 9 | integer f_rew(alist *a) 10 | #endif 11 | { 12 | unit *b; 13 | if(a->aunit>=MXUNIT || a->aunit<0) 14 | err(a->aerr,101,"rewind"); 15 | b = &f__units[a->aunit]; 16 | if(b->ufd == NULL || b->uwrt == 3) 17 | return(0); 18 | if(!b->useek) 19 | err(a->aerr,106,"rewind") 20 | if(b->uwrt) { 21 | (void) t_runc(a); 22 | b->uwrt = 3; 23 | } 24 | rewind(b->ufd); 25 | b->uend=0; 26 | return(0); 27 | } 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /man/hrg.game.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/hrg.R 3 | \name{hrg.game} 4 | \alias{hrg.game} 5 | \title{Sample from a hierarchical random graph model} 6 | \usage{ 7 | hrg.game(hrg) 8 | } 9 | \arguments{ 10 | \item{hrg}{A hierarchical random graph model.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{hrg.game()} was renamed to \code{\link[=sample_hrg]{sample_hrg()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/is.directed.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/interface.R 3 | \name{is.directed} 4 | \alias{is.directed} 5 | \title{Check whether a graph is directed} 6 | \usage{ 7 | is.directed(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{is.directed()} was renamed to \code{\link[=is_directed]{is_directed()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/maximal_ivs.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cliques.R 3 | \name{maximal_ivs} 4 | \alias{maximal_ivs} 5 | \title{Maximal independent vertex sets in the graph} 6 | \usage{ 7 | maximal_ivs(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{maximal_ivs()} was renamed to \code{\link[=max_ivs]{max_ivs()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/simpleraytracer/Sphere.h: -------------------------------------------------------------------------------- 1 | /** Sphere.h 2 | */ 3 | 4 | #ifndef SPHERE_H 5 | #define SPHERE_H 6 | 7 | #include "Shape.h" 8 | 9 | namespace igraph { 10 | 11 | class Sphere : public Shape 12 | { 13 | public: 14 | Sphere(); 15 | Sphere(Point vCenter, double vRadius); 16 | ~Sphere(); 17 | 18 | virtual bool Intersect(const Ray& vRay, Point& vIntersectPoint) const; 19 | virtual Vector Normal(const Point& rSurfacePoint, const Point& rOffSurface) const; 20 | 21 | double Radius() const; 22 | const Point& Center() const; 23 | 24 | private: 25 | Point mCenter; 26 | double mRadius; 27 | }; 28 | 29 | } // namespace igraph 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /man/is.hierarchical.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/community.R 3 | \name{is.hierarchical} 4 | \alias{is.hierarchical} 5 | \title{Functions to deal with the result of network community detection} 6 | \usage{ 7 | is.hierarchical(communities) 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{is.hierarchical()} was renamed to \code{\link[=is_hierarchical]{is_hierarchical()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /src/vendor/cigraph/codecov.yml: -------------------------------------------------------------------------------- 1 | # See https://docs.codecov.io/docs/codecov-yaml for documentation 2 | 3 | codecov: 4 | require_ci_to_pass: true 5 | 6 | coverage: 7 | precision: 2 8 | round: down 9 | range: "50...100" 10 | status: 11 | project: 12 | default: 13 | threshold: 0.01% 14 | 15 | parsers: 16 | gcov: 17 | branch_detection: 18 | conditional: yes 19 | loop: yes 20 | method: no 21 | macro: no 22 | 23 | comment: 24 | layout: "reach,diff,flags,files,footer" 25 | behavior: default 26 | require_changes: false 27 | 28 | ignore: 29 | - "tests" 30 | - "examples" 31 | - "vendor/pcg" 32 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/wsne.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #include "fio.h" 3 | #include "lio.h" 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | integer 9 | #ifdef KR_headers 10 | s_wsne(a) cilist *a; 11 | #else 12 | s_wsne(cilist *a) 13 | #endif 14 | { 15 | int n; 16 | 17 | if(n=c_le(a)) 18 | return(n); 19 | f__reading=0; 20 | f__external=1; 21 | f__formatted=1; 22 | f__putn = x_putc; 23 | L_len = LINE; 24 | f__donewrec = x_wSL; 25 | if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit)) 26 | err(a->cierr, errno, "namelist output start"); 27 | x_wsne(a); 28 | return e_wsle(); 29 | } 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /man/graph.atlas.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{graph.atlas} 4 | \alias{graph.atlas} 5 | \title{Create a graph from the Graph Atlas} 6 | \usage{ 7 | graph.atlas(n) 8 | } 9 | \arguments{ 10 | \item{n}{The id of the graph to create.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{graph.atlas()} was renamed to \code{\link[=graph_from_atlas]{graph_from_atlas()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/uuid.c: -------------------------------------------------------------------------------- 1 | #include "vendor/uuid/uuid.h" 2 | 3 | #include 4 | 5 | #define RNG_BEGIN() GetRNGstate() 6 | #define RNG_END() PutRNGstate() 7 | void GetRNGstate(void); 8 | void PutRNGstate(void); 9 | 10 | SEXP UUID_gen(SEXP sTime) { 11 | 12 | RNG_BEGIN(); 13 | 14 | uuid_t u; 15 | char c[40]; 16 | int use_time = asInteger(sTime); 17 | if (use_time == TRUE) 18 | uuid_generate_time(u); 19 | else if (use_time == FALSE) 20 | uuid_generate_random(u); 21 | else 22 | uuid_generate(u); 23 | uuid_unparse_lower(u, c); 24 | 25 | RNG_END(); 26 | 27 | return mkString(c); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_ltsolve.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* solve L'x=b where x and b are dense. x=b on input, solution on output. */ 3 | CS_INT cs_ltsolve (const cs *L, CS_ENTRY *x) 4 | { 5 | CS_INT p, j, n, *Lp, *Li ; 6 | CS_ENTRY *Lx ; 7 | if (!CS_CSC (L) || !x) return (0) ; /* check inputs */ 8 | n = L->n ; Lp = L->p ; Li = L->i ; Lx = L->x ; 9 | for (j = n-1 ; j >= 0 ; j--) 10 | { 11 | for (p = Lp [j]+1 ; p < Lp [j+1] ; p++) 12 | { 13 | x [j] -= CS_CONJ (Lx [p]) * x [Li [p]] ; 14 | } 15 | x [j] /= CS_CONJ (Lx [Lp [j]]) ; 16 | } 17 | return (1) ; 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_utsolve.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* solve U'x=b where x and b are dense. x=b on input, solution on output. */ 3 | CS_INT cs_utsolve (const cs *U, CS_ENTRY *x) 4 | { 5 | CS_INT p, j, n, *Up, *Ui ; 6 | CS_ENTRY *Ux ; 7 | if (!CS_CSC (U) || !x) return (0) ; /* check inputs */ 8 | n = U->n ; Up = U->p ; Ui = U->i ; Ux = U->x ; 9 | for (j = 0 ; j < n ; j++) 10 | { 11 | for (p = Up [j] ; p < Up [j+1]-1 ; p++) 12 | { 13 | x [j] -= CS_CONJ (Ux [p]) * x [Ui [p]] ; 14 | } 15 | x [j] /= CS_CONJ (Ux [Up [j+1]-1]) ; 16 | } 17 | return (1) ; 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_ri.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double pow_ri(ap, bp) real *ap; integer *bp; 8 | #else 9 | double pow_ri(real *ap, integer *bp) 10 | #endif 11 | { 12 | double pow, x; 13 | integer n; 14 | unsigned long u; 15 | 16 | pow = 1; 17 | x = *ap; 18 | n = *bp; 19 | 20 | if(n != 0) 21 | { 22 | if(n < 0) 23 | { 24 | n = -n; 25 | x = 1/x; 26 | } 27 | for(u = n; ; ) 28 | { 29 | if(u & 01) 30 | pow *= x; 31 | if(u >>= 1) 32 | x *= x; 33 | else 34 | break; 35 | } 36 | } 37 | return(pow); 38 | } 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /man/is.dag.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/paths.R 3 | \name{is.dag} 4 | \alias{is.dag} 5 | \title{Directed acyclic graphs} 6 | \usage{ 7 | is.dag(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. It may be undirected, in which case 11 | \code{FALSE} is reported.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{is.dag()} was renamed to \code{\link[=is_dag]{is_dag()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/ef1asc_.c: -------------------------------------------------------------------------------- 1 | /* EFL support routine to copy string b to string a */ 2 | 3 | #include "f2c.h" 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | 9 | #define M ( (long) (sizeof(long) - 1) ) 10 | #define EVEN(x) ( ( (x)+ M) & (~M) ) 11 | 12 | #ifdef KR_headers 13 | extern VOID s_copy(); 14 | ef1asc_(a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb; 15 | #else 16 | extern void s_copy(char*,char*,ftnlen,ftnlen); 17 | int ef1asc_(ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb) 18 | #endif 19 | { 20 | s_copy( (char *)a, (char *)b, EVEN(*la), *lb ); 21 | return 0; /* ignored return value */ 22 | } 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /man/igraph.shape.noplot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plot.shapes.R 3 | \name{igraph.shape.noplot} 4 | \alias{igraph.shape.noplot} 5 | \title{Various vertex shapes when plotting igraph graphs} 6 | \usage{ 7 | igraph.shape.noplot(coords, v = NULL, params) 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{igraph.shape.noplot()} was renamed to \code{\link[=shape_noplot]{shape_noplot()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /man/independence.number.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cliques.R 3 | \name{independence.number} 4 | \alias{independence.number} 5 | \title{Independent vertex sets} 6 | \usage{ 7 | independence.number(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{independence.number()} was renamed to \code{\link[=ivs_size]{ivs_size()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/line.graph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{line.graph} 4 | \alias{line.graph} 5 | \title{Line graph of a graph} 6 | \usage{ 7 | line.graph(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph, it can be directed or undirected.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{line.graph()} was renamed to \code{\link[=make_line_graph]{make_line_graph()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_di.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | double pow_di(ap, bp) doublereal *ap; integer *bp; 8 | #else 9 | double pow_di(doublereal *ap, integer *bp) 10 | #endif 11 | { 12 | double pow, x; 13 | integer n; 14 | unsigned long u; 15 | 16 | pow = 1; 17 | x = *ap; 18 | n = *bp; 19 | 20 | if(n != 0) 21 | { 22 | if(n < 0) 23 | { 24 | n = -n; 25 | x = 1/x; 26 | } 27 | for(u = n; ; ) 28 | { 29 | if(u & 01) 30 | pow *= x; 31 | if(u >>= 1) 32 | x *= x; 33 | else 34 | break; 35 | } 36 | } 37 | return(pow); 38 | } 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /.github/workflows/matrix-check/action.yml: -------------------------------------------------------------------------------- 1 | name: "Actions to check a matrix with all R and OS versions, computed with the versions-matrix action" 2 | inputs: 3 | matrix: 4 | description: "Generated matrix" 5 | required: true 6 | 7 | runs: 8 | using: "composite" 9 | steps: 10 | - name: Install json2yaml 11 | run: | 12 | sudo npm install -g json2yaml 13 | shell: bash 14 | 15 | - run: | 16 | matrix='${{ inputs.matrix }}' 17 | if [ -n "${matrix}" ]; then 18 | echo $matrix | jq . 19 | echo $matrix | json2yaml 20 | else 21 | echo "No matrix found" 22 | fi 23 | shell: bash 24 | -------------------------------------------------------------------------------- /man/as_phylo.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/as_phylo.R 3 | \name{as_phylo} 4 | \alias{as_phylo} 5 | \title{as_phylo} 6 | \usage{ 7 | as_phylo(x, ...) 8 | } 9 | \arguments{ 10 | \item{x}{object to be coerced} 11 | 12 | \item{...}{further arguments to be passed to or from other methods.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{as_phylo} methods were renamed \code{as.phylo} 18 | for more consistency with other R methods. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/convex.hull.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/other.R 3 | \name{convex.hull} 4 | \alias{convex.hull} 5 | \title{Convex hull of a set of vertices} 6 | \usage{ 7 | convex.hull(data) 8 | } 9 | \arguments{ 10 | \item{data}{The data points, a numeric matrix with two columns.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{convex.hull()} was renamed to \code{\link[=convex_hull]{convex_hull()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/dyad.census.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/motifs.R 3 | \name{dyad.census} 4 | \alias{dyad.census} 5 | \title{Dyad census of a graph} 6 | \usage{ 7 | dyad.census(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. A warning is given if it is not directed.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{dyad.census()} was renamed to \code{\link[=dyad_census]{dyad_census()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/has.multiple.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/structural-properties.R 3 | \name{has.multiple} 4 | \alias{has.multiple} 5 | \title{Find the multiple or loop edges in a graph} 6 | \usage{ 7 | has.multiple(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{has.multiple()} was renamed to \code{\link[=any_multiple]{any_multiple()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/igraph_version.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/versions.R 3 | \name{igraph_version} 4 | \alias{igraph_version} 5 | \title{Query igraph's version string} 6 | \usage{ 7 | igraph_version() 8 | } 9 | \value{ 10 | A character scalar, the igraph version string, with an attribute 11 | \code{"c_version"} giving the C library version string. 12 | } 13 | \description{ 14 | Returns the R package version, 15 | prints the R package version and C library version. 16 | } 17 | \examples{ 18 | igraph_version() 19 | 20 | } 21 | \author{ 22 | Gabor Csardi \email{csardi.gabor@gmail.com} 23 | } 24 | \keyword{graphs} 25 | \keyword{internal} 26 | -------------------------------------------------------------------------------- /man/pipe.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/igraph-package.R 3 | \name{\%>\%} 4 | \alias{\%>\%} 5 | \title{Magrittr's pipes} 6 | \arguments{ 7 | \item{lhs}{Left hand side of the pipe.} 8 | 9 | \item{rhs}{Right hand side of the pipe.} 10 | } 11 | \value{ 12 | Result of applying the right hand side to the 13 | result of the left hand side. 14 | } 15 | \description{ 16 | igraph re-exports the \verb{\%>\%} operator of magrittr, because 17 | we find it very useful. Please see the documentation in the 18 | \code{magrittr} package. 19 | } 20 | \examples{ 21 | make_ring(10) \%>\% 22 | add_edges(c(1, 6)) \%>\% 23 | plot() 24 | } 25 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/cabs.c: -------------------------------------------------------------------------------- 1 | #ifdef KR_headers 2 | extern double sqrt(); 3 | double f__cabs(real, imag) double real, imag; 4 | #else 5 | #undef abs 6 | #include "math.h" 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | double f__cabs(double real, double imag) 11 | #endif 12 | { 13 | double temp; 14 | 15 | if(real < 0) 16 | real = -real; 17 | if(imag < 0) 18 | imag = -imag; 19 | if(imag > real){ 20 | temp = real; 21 | real = imag; 22 | imag = temp; 23 | } 24 | if((real+imag) == real) 25 | return(real); 26 | 27 | temp = imag/real; 28 | temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/ 29 | return(temp); 30 | } 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /R/old-1_0_0.R: -------------------------------------------------------------------------------- 1 | oldsample_1_0_0 <- function() { 2 | ..env.1.. <- new.env(parent = baseenv()) 3 | ..env.1..$me <- list( 4 | 3, 5 | TRUE, 6 | c(0, 1, 2), 7 | c(1, 2, 0), 8 | c(0, 1, 2), 9 | c(2, 0, 1), 10 | seq(0, 3, by = 1), 11 | seq(0, 3, by = 1), 12 | list( 13 | c(1, 0, 1), 14 | list(name = "Ring graph", mutual = FALSE, circular = TRUE), 15 | list(bar = c("A", "B", "C")), 16 | list(foo = c("a", "b", "c")) 17 | ), 18 | ..env.1.. 19 | ) %>% 20 | structure(class = "igraph") 21 | ..env.1..$.__igraph_version__. <- "0.8.0" 22 | ..env.1..$myid <- "0fb28c05-9cc1-4a24-ba62-f5c319a3051b" 23 | ..env.1..$me 24 | } 25 | -------------------------------------------------------------------------------- /man/clique.number.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cliques.R 3 | \name{clique.number} 4 | \alias{clique.number} 5 | \title{Functions to find cliques, i.e. complete subgraphs in a graph} 6 | \usage{ 7 | clique.number(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{clique.number()} was renamed to \code{\link[=clique_num]{clique_num()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/graph.cohesion.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cohesive.blocks.R 3 | \name{graph.cohesion} 4 | \alias{graph.cohesion} 5 | \title{Vertex connectivity} 6 | \usage{ 7 | graph.cohesion(x, ...) 8 | } 9 | \arguments{ 10 | \item{x}{x} 11 | 12 | \item{...}{passed to \code{cohesion()}} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{graph.cohesion()} was renamed to \code{\link[=cohesion]{cohesion()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/tkplot.canvas.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkplot.R 3 | \name{tkplot.canvas} 4 | \alias{tkplot.canvas} 5 | \title{Interactive plotting of graphs} 6 | \usage{ 7 | tkplot.canvas(tkp.id) 8 | } 9 | \arguments{ 10 | \item{tkp.id}{The id of the tkplot window to close/reshape/etc.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{tkplot.canvas()} was renamed to \code{\link[=tk_canvas]{tk_canvas()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/tkplot.center.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkplot.R 3 | \name{tkplot.center} 4 | \alias{tkplot.center} 5 | \title{Interactive plotting of graphs} 6 | \usage{ 7 | tkplot.center(tkp.id) 8 | } 9 | \arguments{ 10 | \item{tkp.id}{The id of the tkplot window to close/reshape/etc.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{tkplot.center()} was renamed to \code{\link[=tk_center]{tk_center()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_cumsum.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* p [0..n] = cumulative sum of c [0..n-1], and then copy p [0..n-1] into c */ 3 | double cs_cumsum (CS_INT *p, CS_INT *c, CS_INT n) 4 | { 5 | CS_INT i, nz = 0 ; 6 | double nz2 = 0 ; 7 | if (!p || !c) return (-1) ; /* check inputs */ 8 | for (i = 0 ; i < n ; i++) 9 | { 10 | p [i] = nz ; 11 | nz += c [i] ; 12 | nz2 += c [i] ; /* also in double to avoid CS_INT overflow */ 13 | c [i] = p [i] ; /* also copy p[0..n-1] back into c[0..n-1]*/ 14 | } 15 | p [n] = nz ; 16 | return (nz2) ; /* return sum (c [0..n-1]) */ 17 | } 18 | -------------------------------------------------------------------------------- /man/is.bipartite.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{is.bipartite} 4 | \alias{is.bipartite} 5 | \title{Checks whether the graph has a vertex attribute called \code{type}} 6 | \usage{ 7 | is.bipartite(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{is.bipartite()} was renamed to \code{\link[=is_bipartite]{is_bipartite()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/bipartite.mapping.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/bipartite.R 3 | \name{bipartite.mapping} 4 | \alias{bipartite.mapping} 5 | \title{Decide whether a graph is bipartite} 6 | \usage{ 7 | bipartite.mapping(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{bipartite.mapping()} was renamed to \code{\link[=bipartite_mapping]{bipartite_mapping()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/hrg.dendrogram.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/hrg.R 3 | \name{hrg.dendrogram} 4 | \alias{hrg.dendrogram} 5 | \title{Create an igraph graph from a hierarchical random graph model} 6 | \usage{ 7 | hrg.dendrogram(hrg) 8 | } 9 | \arguments{ 10 | \item{hrg}{A hierarchical random graph model.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{hrg.dendrogram()} was renamed to \code{\link[=hrg_tree]{hrg_tree()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/igraph.shape.noclip.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plot.shapes.R 3 | \name{igraph.shape.noclip} 4 | \alias{igraph.shape.noclip} 5 | \title{Various vertex shapes when plotting igraph graphs} 6 | \usage{ 7 | igraph.shape.noclip(coords, el, params, end = c("both", "from", "to")) 8 | } 9 | \description{ 10 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 11 | 12 | \code{igraph.shape.noclip()} was renamed to \code{\link[=shape_noclip]{shape_noclip()}} to create a more 13 | consistent API. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /man/list.edge.attributes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{list.edge.attributes} 4 | \alias{list.edge.attributes} 5 | \title{List names of edge attributes} 6 | \usage{ 7 | list.edge.attributes(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{list.edge.attributes()} was renamed to \code{\link[=edge_attr_names]{edge_attr_names()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/list.graph.attributes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{list.graph.attributes} 4 | \alias{list.graph.attributes} 5 | \title{List names of graph attributes} 6 | \usage{ 7 | list.graph.attributes(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{list.graph.attributes()} was renamed to \code{\link[=graph_attr_names]{graph_attr_names()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/roxygen/meta.R: -------------------------------------------------------------------------------- 1 | list( 2 | rd_family_title = list( 3 | adjacency = "Adjacency matrices", 4 | attributes = "Vertex, edge and graph attributes", 5 | bipartite = "Bipartite graphs", 6 | centrality = "Centrality measures", 7 | coloring = "Graph coloring", 8 | community = "Community detection", 9 | components = "Connected components", 10 | processes = "Processes on graphs", 11 | cycles = "Graph cycles", 12 | foreign = "Foreign format readers", 13 | games = "Random graph models (games)", 14 | scg = "Spectral Coarse Graining", 15 | sgm = "Graph matching", 16 | `constructor modifiers` = "Constructor modifiers (and related functions)" 17 | ) 18 | ) 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_hh.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | shortint pow_hh(ap, bp) shortint *ap, *bp; 8 | #else 9 | shortint pow_hh(shortint *ap, shortint *bp) 10 | #endif 11 | { 12 | shortint pow, x, n; 13 | unsigned u; 14 | 15 | x = *ap; 16 | n = *bp; 17 | 18 | if (n <= 0) { 19 | if (n == 0 || x == 1) 20 | return 1; 21 | if (x != -1) 22 | return x == 0 ? 1/x : 0; 23 | n = -n; 24 | } 25 | u = n; 26 | for(pow = 1; ; ) 27 | { 28 | if(u & 01) 29 | pow *= x; 30 | if(u >>= 1) 31 | x *= x; 32 | else 33 | break; 34 | } 35 | return(pow); 36 | } 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_ii.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | #ifdef KR_headers 7 | integer pow_ii(ap, bp) integer *ap, *bp; 8 | #else 9 | integer pow_ii(integer *ap, integer *bp) 10 | #endif 11 | { 12 | integer pow, x, n; 13 | unsigned long u; 14 | 15 | x = *ap; 16 | n = *bp; 17 | 18 | if (n <= 0) { 19 | if (n == 0 || x == 1) 20 | return 1; 21 | if (x != -1) 22 | return x == 0 ? 1/x : 0; 23 | n = -n; 24 | } 25 | u = n; 26 | for(pow = 1; ; ) 27 | { 28 | if(u & 01) 29 | pow *= x; 30 | if(u >>= 1) 31 | x *= x; 32 | else 33 | break; 34 | } 35 | return(pow); 36 | } 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /man/largest.cliques.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cliques.R 3 | \name{largest.cliques} 4 | \alias{largest.cliques} 5 | \title{Functions to find cliques, i.e. complete subgraphs in a graph} 6 | \usage{ 7 | largest.cliques(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{largest.cliques()} was renamed to \code{\link[=largest_cliques]{largest_cliques()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/BuildType.cmake: -------------------------------------------------------------------------------- 1 | # Taken from https://blog.kitware.com/cmake-and-the-default-build-type/ 2 | 3 | # Set the default build type to "Release" 4 | set(default_build_type "Release") 5 | 6 | get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 7 | if(NOT isMultiConfig AND NOT CMAKE_BUILD_TYPE) 8 | message(STATUS "Setting build type to '${default_build_type}' as none was specified.") 9 | set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE) 10 | # Set the possible values of build type for cmake-gui 11 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") 12 | endif() 13 | -------------------------------------------------------------------------------- /man/graph.disjoint.union.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/operators.R 3 | \name{graph.disjoint.union} 4 | \alias{graph.disjoint.union} 5 | \title{Disjoint union of graphs} 6 | \usage{ 7 | graph.disjoint.union(...) 8 | } 9 | \arguments{ 10 | \item{...}{Graph objects or lists of graph objects.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{graph.disjoint.union()} was renamed to \code{\link[=disjoint_union]{disjoint_union()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/is_bipartite.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{is_bipartite} 4 | \alias{is_bipartite} 5 | \title{Checks whether the graph has a vertex attribute called \code{type}.} 6 | \usage{ 7 | is_bipartite(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph} 11 | } 12 | \description{ 13 | It does not check whether the graph is bipartite in the 14 | mathematical sense. Use \code{\link[=bipartite_mapping]{bipartite_mapping()}} for that. 15 | } 16 | \seealso{ 17 | Bipartite graphs 18 | \code{\link{bipartite_mapping}()}, 19 | \code{\link{bipartite_projection}()}, 20 | \code{\link{make_bipartite_graph}()} 21 | } 22 | \concept{bipartite} 23 | -------------------------------------------------------------------------------- /man/list.vertex.attributes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{list.vertex.attributes} 4 | \alias{list.vertex.attributes} 5 | \title{List names of vertex attributes} 6 | \usage{ 7 | list.vertex.attributes(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{list.vertex.attributes()} was renamed to \code{\link[=vertex_attr_names]{vertex_attr_names()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/pow_zz.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double log(), exp(), cos(), sin(), atan2(), f__cabs(); 5 | VOID pow_zz(r,a,b) doublecomplex *r, *a, *b; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | extern double f__cabs(double,double); 13 | void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b) 14 | #endif 15 | { 16 | double logr, logi, x, y; 17 | 18 | logr = log( f__cabs(a->r, a->i) ); 19 | logi = atan2(a->i, a->r); 20 | 21 | x = exp( logr * b->r - logi * b->i ); 22 | y = logr * b->i + logi * b->r; 23 | 24 | r->r = x * cos(y); 25 | r->i = x * sin(y); 26 | } 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack_csc.h: -------------------------------------------------------------------------------- 1 | #ifndef PRPACK_CSC 2 | #define PRPACK_CSC 3 | 4 | #if !defined(_MSC_VER) && !defined (__MINGW32__) && !defined (__MINGW64__) 5 | # include 6 | #else 7 | # include 8 | typedef __int64 int64_t; 9 | #endif 10 | 11 | namespace prpack { 12 | 13 | class prpack_csc { 14 | public: 15 | int num_vs; 16 | int num_es; 17 | int* heads; 18 | int* tails; 19 | }; 20 | 21 | class prpack_int64_csc { 22 | public: 23 | int64_t num_vs; 24 | int64_t num_es; 25 | int64_t* heads; 26 | int64_t* tails; 27 | }; 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/glpk/misc/relax4.c: -------------------------------------------------------------------------------- 1 | /* relax4.c */ 2 | 3 | #include "env.h" 4 | #include "relax4.h" 5 | 6 | int relax4(struct relax4_csa *csa) 7 | { static const char func[] = "relax4"; 8 | xassert(csa == csa); 9 | xerror("%s: sorry, this routine is temporarily disabled due to li" 10 | "censing problems\n", func); 11 | /* abort(); */ 12 | return -1; 13 | } 14 | 15 | void relax4_inidat(struct relax4_csa *csa) 16 | { static const char func[] = "relax4_inidat"; 17 | xassert(csa == csa); 18 | xerror("%s: sorry, this routine is temporarily disabled due to li" 19 | "censing problems\n", func); 20 | /* abort(); */ 21 | } 22 | 23 | /* eof */ 24 | -------------------------------------------------------------------------------- /man/graph.empty.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{graph.empty} 4 | \alias{graph.empty} 5 | \title{A graph with no edges} 6 | \usage{ 7 | graph.empty(n = 0, directed = TRUE) 8 | } 9 | \arguments{ 10 | \item{n}{Number of vertices.} 11 | 12 | \item{directed}{Whether to create a directed graph.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{graph.empty()} was renamed to \code{\link[=make_empty_graph]{make_empty_graph()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/cs/cs_happly.c: -------------------------------------------------------------------------------- 1 | #include "cs.h" 2 | /* apply the ith Householder vector to x */ 3 | CS_INT cs_happly (const cs *V, CS_INT i, double beta, CS_ENTRY *x) 4 | { 5 | CS_INT p, *Vp, *Vi ; 6 | CS_ENTRY *Vx, tau = 0 ; 7 | if (!CS_CSC (V) || !x) return (0) ; /* check inputs */ 8 | Vp = V->p ; Vi = V->i ; Vx = V->x ; 9 | for (p = Vp [i] ; p < Vp [i+1] ; p++) /* tau = v'*x */ 10 | { 11 | tau += CS_CONJ (Vx [p]) * x [Vi [p]] ; 12 | } 13 | tau *= beta ; /* tau = beta*(v'*x) */ 14 | for (p = Vp [i] ; p < Vp [i+1] ; p++) /* x = x - v*tau */ 15 | { 16 | x [Vi [p]] -= Vx [p] * tau ; 17 | } 18 | return (1) ; 19 | } 20 | -------------------------------------------------------------------------------- /man/igraph.to.graphNEL.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/conversion.R 3 | \name{igraph.to.graphNEL} 4 | \alias{igraph.to.graphNEL} 5 | \title{Convert igraph graphs to graphNEL objects from the graph package} 6 | \usage{ 7 | igraph.to.graphNEL(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{An igraph graph object.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{igraph.to.graphNEL()} was renamed to \code{\link[=as_graphnel]{as_graphnel()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /.github/workflows/lock.yaml: -------------------------------------------------------------------------------- 1 | name: "Lock threads" 2 | permissions: 3 | issues: write 4 | pull-requests: write 5 | discussions: write 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "37 2 * * *" 10 | 11 | jobs: 12 | lock: 13 | runs-on: ubuntu-24.04 14 | steps: 15 | - uses: krlmlr/lock-threads@patch-1 16 | with: 17 | github-token: ${{ github.token }} 18 | issue-inactive-days: "365" 19 | issue-lock-reason: "" 20 | issue-comment: > 21 | This old thread has been automatically locked. If you think you have 22 | found something related to this, please open a new issue and link to this 23 | old issue if necessary. 24 | -------------------------------------------------------------------------------- /man/maximal.independent.vertex.sets.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cliques.R 3 | \name{maximal.independent.vertex.sets} 4 | \alias{maximal.independent.vertex.sets} 5 | \title{Independent vertex sets} 6 | \usage{ 7 | maximal.independent.vertex.sets(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{maximal.independent.vertex.sets()} was renamed to \code{\link[=max_ivs]{max_ivs()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/largest.independent.vertex.sets.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cliques.R 3 | \name{largest.independent.vertex.sets} 4 | \alias{largest.independent.vertex.sets} 5 | \title{Independent vertex sets} 6 | \usage{ 7 | largest.independent.vertex.sets(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{largest.independent.vertex.sets()} was renamed to \code{\link[=largest_ivs]{largest_ivs()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/r_pal.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/palette.R 3 | \name{r_pal} 4 | \alias{r_pal} 5 | \title{The default R palette} 6 | \usage{ 7 | r_pal(n) 8 | } 9 | \arguments{ 10 | \item{n}{The number of colors to use, the maximum is eight.} 11 | } 12 | \value{ 13 | A character vector of color names. 14 | } 15 | \description{ 16 | This is the default R palette, to be able to reproduce the 17 | colors of older igraph versions. Its colors are appropriate 18 | for categories, but they are not very attractive. 19 | } 20 | \seealso{ 21 | Other palettes: 22 | \code{\link{categorical_pal}()}, 23 | \code{\link{diverging_pal}()}, 24 | \code{\link{sequential_pal}()} 25 | } 26 | \concept{palettes} 27 | -------------------------------------------------------------------------------- /man/stCuts.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flow.R 3 | \name{stCuts} 4 | \alias{stCuts} 5 | \title{List all (s,t)-cuts of a graph} 6 | \usage{ 7 | stCuts(graph, source, target) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. It must be directed.} 11 | 12 | \item{source}{The source vertex.} 13 | 14 | \item{target}{The target vertex.} 15 | } 16 | \description{ 17 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 18 | 19 | \code{stCuts()} was renamed to \code{\link[=st_cuts]{st_cuts()}} to create a more 20 | consistent API. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/delete.vertices.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/interface.R 3 | \name{delete.vertices} 4 | \alias{delete.vertices} 5 | \title{Delete vertices from a graph} 6 | \usage{ 7 | delete.vertices(graph, v) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | 12 | \item{v}{The vertices to remove, a vertex sequence.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{delete.vertices()} was renamed to \code{\link[=delete_vertices]{delete_vertices()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/layout.lgl.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layout.R 3 | \name{layout.lgl} 4 | \alias{layout.lgl} 5 | \title{Large Graph Layout} 6 | \usage{ 7 | layout.lgl(..., params = list()) 8 | } 9 | \arguments{ 10 | \item{...}{Passed to the new layout functions.} 11 | 12 | \item{params}{Passed to the new layout functions as arguments.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{layout.lgl()} was renamed to \code{\link[=layout_with_lgl]{layout_with_lgl()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/layout.svd.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layout.R 3 | \name{layout.svd} 4 | \alias{layout.svd} 5 | \title{SVD layout, this was removed from igraph} 6 | \usage{ 7 | layout.svd(graph, ...) 8 | } 9 | \arguments{ 10 | \item{graph}{Input graph.} 11 | 12 | \item{...}{Extra arguments are ignored.} 13 | } 14 | \value{ 15 | Layout coordinates, a two column matrix. 16 | } 17 | \description{ 18 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 19 | 20 | Now it calls the Fruchterman-Reingold layout \code{\link[=layout_with_fr]{layout_with_fr()}}. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/tkplot.export.postscript.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkplot.R 3 | \name{tkplot.export.postscript} 4 | \alias{tkplot.export.postscript} 5 | \title{Interactive plotting of graphs} 6 | \usage{ 7 | tkplot.export.postscript(tkp.id) 8 | } 9 | \arguments{ 10 | \item{tkp.id}{The id of the tkplot window to close/reshape/etc.} 11 | } 12 | \description{ 13 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 14 | 15 | \code{tkplot.export.postscript()} was renamed to \code{\link[=tk_postscript]{tk_postscript()}} to create a more 16 | consistent API. 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/graph.difference.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/operators.R 3 | \name{graph.difference} 4 | \alias{graph.difference} 5 | \title{Difference of two sets} 6 | \usage{ 7 | graph.difference(...) 8 | } 9 | \arguments{ 10 | \item{...}{Arguments, their number and interpretation depends on 11 | the function that implements \code{difference()}.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{graph.difference()} was renamed to \code{\link[=difference]{difference()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/fuzz_helpers.cmake: -------------------------------------------------------------------------------- 1 | 2 | function(add_fuzzer NAME) 3 | set(TARGET_NAME fuzzer_${NAME}) 4 | 5 | add_executable(${TARGET_NAME} EXCLUDE_FROM_ALL ${PROJECT_SOURCE_DIR}/fuzzing/${NAME}.cpp) 6 | 7 | add_dependencies(build_fuzzers ${TARGET_NAME}) 8 | 9 | target_link_libraries(${TARGET_NAME} PRIVATE igraph) 10 | 11 | # The -fsanitize=fuzzer-no-link is already added by the top-level CMakeLists.txt 12 | # for general fuzzer instrumentation. Additionally, we need -fsanitize=fuzzer 13 | # for the fuzz targets, which do not contain a main() function, to link in the 14 | # fuzz driver. See https://llvm.org/docs/LibFuzzer.html 15 | target_link_options(${TARGET_NAME} PRIVATE -fsanitize=fuzzer) 16 | endfunction() 17 | -------------------------------------------------------------------------------- /tools/apply-patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Applies a patch file, returning successfully if the patch seems to be applied 3 | # already 4 | 5 | if [ "x$1" = x ]; then 6 | echo "Usage: $0 patch-file" 7 | exit 1 8 | fi 9 | 10 | OUT=$(patch -p1 -t -N -r .reject -i $1) 11 | RETVAL=$? 12 | 13 | if [ $RETVAL = 0 ]; then 14 | # Everything went fine 15 | exit 16 | elif [ $RETVAL = 1 ]; then 17 | rm -f .reject 18 | # Maybe the patch was reversed? 19 | COUNT=`echo "$OUT" | grep -E -c "^(Reversed.*Skipping)|(Ignoring previously applied)"` 20 | if [ $COUNT -gt 0 ]; then 21 | echo "$1 seems to be applied already, skipping." 22 | exit 23 | fi 24 | fi 25 | 26 | # Some other error 27 | echo "$OUT" 28 | exit $RETVAL 29 | 30 | -------------------------------------------------------------------------------- /man/graph.kautz.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{graph.kautz} 4 | \alias{graph.kautz} 5 | \title{Kautz graphs} 6 | \usage{ 7 | graph.kautz(m, n) 8 | } 9 | \arguments{ 10 | \item{m}{Integer scalar, the size of the alphabet. See details below.} 11 | 12 | \item{n}{Integer scalar, the length of the labels. See details below.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{graph.kautz()} was renamed to \code{\link[=make_kautz_graph]{make_kautz_graph()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/triad.census.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/motifs.R 3 | \name{triad.census} 4 | \alias{triad.census} 5 | \title{Triad census, subgraphs with three vertices} 6 | \usage{ 7 | triad.census(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph, it should be directed. An undirected graph 11 | results a warning, and undefined results.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{triad.census()} was renamed to \code{\link[=triad_census]{triad_census()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/cliques/cliquer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Declare the files needed to compile Cliquer 2 | add_library( 3 | cliquer 4 | OBJECT 5 | EXCLUDE_FROM_ALL 6 | cliquer.c 7 | cliquer_graph.c 8 | reorder.c 9 | ) 10 | 11 | target_include_directories( 12 | cliquer 13 | PRIVATE 14 | ${PROJECT_SOURCE_DIR}/include 15 | ${PROJECT_BINARY_DIR}/include 16 | ${PROJECT_BINARY_DIR}/src 17 | ) 18 | 19 | if (BUILD_SHARED_LIBS) 20 | set_property(TARGET cliquer PROPERTY POSITION_INDEPENDENT_CODE ON) 21 | endif() 22 | 23 | # Since these are included as object files, they should call the 24 | # function as is (without visibility specification) 25 | target_compile_definitions(cliquer PRIVATE IGRAPH_STATIC) 26 | 27 | use_all_warnings(cliquer) 28 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/motifs.md: -------------------------------------------------------------------------------- 1 | # motifs_randesu_callback output matches expected 2 | 3 | Code 4 | cat("Number of motifs found:", length(motif_data), "\n") 5 | Output 6 | Number of motifs found: 12 7 | Code 8 | cat("Sample motif 1:\n") 9 | Output 10 | Sample motif 1: 11 | Code 12 | print(motif_data[[1]]) 13 | Output 14 | $vids 15 | [1] 1 4 2 16 | 17 | $isoclass 18 | [1] 3 19 | 20 | Code 21 | if (length(motif_data) > 1) { 22 | cat("Sample motif 2:\n") 23 | print(motif_data[[2]]) 24 | } 25 | Output 26 | Sample motif 2: 27 | $vids 28 | [1] 1 4 3 29 | 30 | $isoclass 31 | [1] 4 32 | 33 | 34 | -------------------------------------------------------------------------------- /man/layout.spring.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layout.R 3 | \name{layout.spring} 4 | \alias{layout.spring} 5 | \title{Spring layout, this was removed from igraph} 6 | \usage{ 7 | layout.spring(graph, ...) 8 | } 9 | \arguments{ 10 | \item{graph}{Input graph.} 11 | 12 | \item{...}{Extra arguments are ignored.} 13 | } 14 | \value{ 15 | Layout coordinates, a two column matrix. 16 | } 17 | \description{ 18 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 19 | 20 | Now it calls the Fruchterman-Reingold layout \code{\link[=layout_with_fr]{layout_with_fr()}}. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/minimal.st.separators.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flow.R 3 | \name{minimal.st.separators} 4 | \alias{minimal.st.separators} 5 | \title{Minimum size vertex separators} 6 | \usage{ 7 | minimal.st.separators(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. It may be directed, but edge directions are 11 | ignored.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{minimal.st.separators()} was renamed to \code{\link[=min_st_separators]{min_st_separators()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /tools/weights.R: -------------------------------------------------------------------------------- 1 | library(igraph) 2 | library(tidyverse) 3 | 4 | # https://seankross.com/2021/02/25/Analyzing-R-Function-Arguments.html 5 | args_data <- tibble(Package = "package:igraph") %>% 6 | mutate(Function = list(lsf.str(Package))) %>% 7 | unnest(Function) %>% 8 | mutate(Function = as.character(Function)) %>% 9 | mutate( 10 | Arg = map( 11 | Function, 12 | compose(args, as.list, names, ~ keep(.x, nzchar), .dir = "forward") 13 | ) 14 | ) %>% 15 | unnest(Arg, keep_empty = TRUE) 16 | 17 | dplyr::filter(args_data, Arg == "weights") |> 18 | dplyr::mutate(deprecated = grepl("\\.", Function)) |> 19 | dplyr::mutate(arg_def = "") |> 20 | dplyr::mutate(notes = "") |> 21 | dplyr::arrange(deprecated) |> 22 | knitr::kable() 23 | -------------------------------------------------------------------------------- /R/old-1_5_0.R: -------------------------------------------------------------------------------- 1 | oldsample_1_5_0 <- function() { 2 | ..env.1.. <- new.env(parent = baseenv()) 3 | ..env.1..$me <- list( 4 | 3, 5 | TRUE, 6 | c(0, 1, 2), 7 | c(1, 2, 0), 8 | NULL, 9 | NULL, 10 | NULL, 11 | NULL, 12 | list( 13 | c(1, 0, 1), 14 | list(name = "Ring graph", mutual = FALSE, circular = TRUE), 15 | list(bar = c("A", "B", "C")), 16 | list(foo = c("a", "b", "c")) 17 | ), 18 | ..env.1.. 19 | ) %>% 20 | structure(class = "igraph") 21 | 22 | # This will be reconstructed on demand. 23 | # ..env.1..$igraph <- constructive::.xptr("0x0") 24 | 25 | ..env.1..$.__igraph_version__. <- ver_1_5_0 26 | ..env.1..$myid <- "0fb28c05-9cc1-4a24-ba62-f5c319a3051b" 27 | ..env.1..$me 28 | } 29 | -------------------------------------------------------------------------------- /man/minimum.size.separators.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/flow.R 3 | \name{minimum.size.separators} 4 | \alias{minimum.size.separators} 5 | \title{Minimum size vertex separators} 6 | \usage{ 7 | minimum.size.separators(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. It may be directed, but edge directions are 11 | ignored.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{minimum.size.separators()} was renamed to \code{\link[=min_separators]{min_separators()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/remove.edge.attribute.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{remove.edge.attribute} 4 | \alias{remove.edge.attribute} 5 | \title{Delete an edge attribute} 6 | \usage{ 7 | remove.edge.attribute(graph, name) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph} 11 | 12 | \item{name}{The name of the edge attribute to delete.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{remove.edge.attribute()} was renamed to \code{\link[=delete_edge_attr]{delete_edge_attr()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/remove.graph.attribute.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{remove.graph.attribute} 4 | \alias{remove.graph.attribute} 5 | \title{Delete a graph attribute} 6 | \usage{ 7 | remove.graph.attribute(graph, name) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph.} 11 | 12 | \item{name}{Name of the attribute to delete.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{remove.graph.attribute()} was renamed to \code{\link[=delete_graph_attr]{delete_graph_attr()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/tkplot.close.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkplot.R 3 | \name{tkplot.close} 4 | \alias{tkplot.close} 5 | \title{Interactive plotting of graphs} 6 | \usage{ 7 | tkplot.close(tkp.id, window.close = TRUE) 8 | } 9 | \arguments{ 10 | \item{tkp.id}{The id of the tkplot window to close/reshape/etc.} 11 | 12 | \item{window.close}{Leave this on the default value.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{tkplot.close()} was renamed to \code{\link[=tk_close]{tk_close()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/etc/cmake/tls.cmake: -------------------------------------------------------------------------------- 1 | tristate(IGRAPH_ENABLE_TLS "Enable thread-local storage for igraph global variables" AUTO) 2 | 3 | include(CheckTLSSupport) 4 | check_tls_support(TLS_KEYWORD) 5 | 6 | if(IGRAPH_ENABLE_TLS STREQUAL "AUTO") 7 | if(TLS_KEYWORD) 8 | set(IGRAPH_ENABLE_TLS ON) 9 | else() 10 | set(IGRAPH_ENABLE_TLS OFF) 11 | endif() 12 | endif() 13 | 14 | if(IGRAPH_ENABLE_TLS) 15 | if(NOT TLS_KEYWORD) 16 | message(FATAL_ERROR "Thread-local storage not supported on this compiler") 17 | endif() 18 | 19 | # TODO: we should probably set this only if we are building igraph with 20 | # internal-everything 21 | set(IGRAPH_THREAD_SAFE YES) 22 | else() 23 | set(TLS_KEYWORD "") 24 | set(IGRAPH_THREAD_SAFE NO) 25 | endif() 26 | -------------------------------------------------------------------------------- /man/graph.intersection.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/operators.R 3 | \name{graph.intersection} 4 | \alias{graph.intersection} 5 | \title{Intersection of two or more sets} 6 | \usage{ 7 | graph.intersection(...) 8 | } 9 | \arguments{ 10 | \item{...}{Arguments, their number and interpretation depends on 11 | the function that implements \code{intersection()}.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{graph.intersection()} was renamed to \code{\link[=intersection]{intersection()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/inside-square-error.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/iterators.R 3 | \name{.nei} 4 | \alias{.nei} 5 | \alias{.innei} 6 | \alias{.outnei} 7 | \alias{.inc} 8 | \alias{.from} 9 | \alias{.to} 10 | \title{Helpers within vertex/index sequences} 11 | \usage{ 12 | .nei(...) 13 | 14 | .innei(...) 15 | 16 | .outnei(...) 17 | 18 | .inc(...) 19 | 20 | .from(...) 21 | 22 | .to(...) 23 | } 24 | \arguments{ 25 | \item{...}{Not used, here for compatibility.} 26 | } 27 | \value{ 28 | An error 29 | } 30 | \description{ 31 | Functions to be used only with \verb{[.igraph.es} and \verb{[.igraph.vs} 32 | } 33 | \details{ 34 | See \code{\link[igraph]{[.igraph.vs}} and \code{\link[igraph]{[.igraph.es}}. 35 | } 36 | \keyword{internal} 37 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/z_sqrt.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | 3 | #ifdef KR_headers 4 | double sqrt(), f__cabs(); 5 | VOID z_sqrt(r, z) doublecomplex *r, *z; 6 | #else 7 | #undef abs 8 | #include "math.h" 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | extern double f__cabs(double, double); 13 | void z_sqrt(doublecomplex *r, doublecomplex *z) 14 | #endif 15 | { 16 | double mag, zi = z->i, zr = z->r; 17 | 18 | if( (mag = f__cabs(zr, zi)) == 0.) 19 | r->r = r->i = 0.; 20 | else if(zr > 0) 21 | { 22 | r->r = sqrt(0.5 * (mag + zr) ); 23 | r->i = zi / r->r / 2; 24 | } 25 | else 26 | { 27 | r->i = sqrt(0.5 * (mag - zr) ); 28 | if(zi < 0) 29 | r->i = - r->i; 30 | r->r = zi / r->i / 2; 31 | } 32 | } 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /tests/testthat/_snaps/games.md: -------------------------------------------------------------------------------- 1 | # sample_degseq() works -- exponential degree error 2 | 3 | Code 4 | sample_degseq(exponential_degrees, method = "vl") 5 | Condition 6 | Error in `sample_degseq()`: 7 | ! At vendor/cigraph/src/games/degree_sequence_vl/gengraph_mr-connected.cpp: : Cannot make a connected graph from the given degree sequence. Invalid value 8 | 9 | # sample_degseq() works -- Power-law degree error 10 | 11 | Code 12 | sample_degseq(powerlaw_degrees, method = "vl") 13 | Condition 14 | Error in `sample_degseq()`: 15 | ! At vendor/cigraph/src/games/degree_sequence_vl/gengraph_mr-connected.cpp: : Cannot realize the given degree sequence as an undirected, simple graph. Invalid value 16 | 17 | -------------------------------------------------------------------------------- /tools/py-stimulus/src/stimulus/utils.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, TypeVar 2 | 3 | __all__ = ("camelcase", "constant") 4 | 5 | 6 | def camelcase(s: str) -> str: 7 | """Returns a camelCase version of the given string (as used in Java 8 | libraries. 9 | """ 10 | parts = s.split("_") 11 | result = [parts.pop(0)] 12 | for part in parts: 13 | result.append(part.capitalize()) 14 | return "".join(result) 15 | 16 | 17 | T = TypeVar("T") 18 | 19 | 20 | def constant(value: T) -> Callable[..., T]: 21 | """Function factory that creates functions that return the same value 22 | irrespectively of the arguments passed to it. 23 | """ 24 | 25 | def func(*args, **kwds) -> T: 26 | return value 27 | 28 | return func 29 | -------------------------------------------------------------------------------- /man/articulation.points.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/components.R 3 | \name{articulation.points} 4 | \alias{articulation.points} 5 | \title{Articulation points and bridges of a graph} 6 | \usage{ 7 | articulation.points(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. It is treated as an undirected graph, even if 11 | it is directed.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{articulation.points()} was renamed to \code{\link[=articulation_points]{articulation_points()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/hrg.create.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/hrg.R 3 | \name{hrg.create} 4 | \alias{hrg.create} 5 | \title{Create a hierarchical random graph from an igraph graph} 6 | \usage{ 7 | hrg.create(graph, prob) 8 | } 9 | \arguments{ 10 | \item{graph}{The igraph graph to create the HRG from.} 11 | 12 | \item{prob}{A vector of probabilities, one for each vertex, in the order of 13 | vertex ids.} 14 | } 15 | \description{ 16 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 17 | 18 | \code{hrg.create()} was renamed to \code{\link[=hrg]{hrg()}} to create a more 19 | consistent API. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/is.loop.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/structural-properties.R 3 | \name{is.loop} 4 | \alias{is.loop} 5 | \title{Find the multiple or loop edges in a graph} 6 | \usage{ 7 | is.loop(graph, eids = E(graph)) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph.} 11 | 12 | \item{eids}{The edges to which the query is restricted. By default this is 13 | all edges in the graph.} 14 | } 15 | \description{ 16 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 17 | 18 | \code{is.loop()} was renamed to \code{\link[=which_loop]{which_loop()}} to create a more 19 | consistent API. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/layout.circle.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layout.R 3 | \name{layout.circle} 4 | \alias{layout.circle} 5 | \title{Graph layout with vertices on a circle} 6 | \usage{ 7 | layout.circle(..., params = list()) 8 | } 9 | \arguments{ 10 | \item{...}{Passed to the new layout functions.} 11 | 12 | \item{params}{Passed to the new layout functions as arguments.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{layout.circle()} was renamed to \code{\link[=layout_in_circle]{layout_in_circle()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/tkplot.getcoords.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/tkplot.R 3 | \name{tkplot.getcoords} 4 | \alias{tkplot.getcoords} 5 | \title{Interactive plotting of graphs} 6 | \usage{ 7 | tkplot.getcoords(tkp.id, norm = FALSE) 8 | } 9 | \arguments{ 10 | \item{tkp.id}{The id of the tkplot window to close/reshape/etc.} 11 | 12 | \item{norm}{Logical, should we norm the coordinates.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{tkplot.getcoords()} was renamed to \code{\link[=tk_coords]{tk_coords()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /src/vendor/cigraph/src/centrality/prpack/prpack_result.h: -------------------------------------------------------------------------------- 1 | #ifndef PRPACK_RESULT 2 | #define PRPACK_RESULT 3 | 4 | #include 5 | #include 6 | 7 | namespace prpack { 8 | 9 | // Result class. 10 | class prpack_result { 11 | public: 12 | // instance variables 13 | int num_vs; 14 | int num_es; 15 | double* x; 16 | double read_time; 17 | double preprocess_time; 18 | double compute_time; 19 | int64_t num_es_touched; 20 | std::string method; 21 | int converged; 22 | // constructor 23 | prpack_result(); 24 | // destructor 25 | ~prpack_result(); 26 | }; 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /man/biconnected.components.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/components.R 3 | \name{biconnected.components} 4 | \alias{biconnected.components} 5 | \title{Biconnected components} 6 | \usage{ 7 | biconnected.components(graph) 8 | } 9 | \arguments{ 10 | \item{graph}{The input graph. It is treated as an undirected graph, even if 11 | it is directed.} 12 | } 13 | \description{ 14 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 15 | 16 | \code{biconnected.components()} was renamed to \code{\link[=biconnected_components]{biconnected_components()}} to create a more 17 | consistent API. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/graph.de.bruijn.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{graph.de.bruijn} 4 | \alias{graph.de.bruijn} 5 | \title{De Bruijn graphs} 6 | \usage{ 7 | graph.de.bruijn(m, n) 8 | } 9 | \arguments{ 10 | \item{m}{Integer scalar, the size of the alphabet. See details below.} 11 | 12 | \item{n}{Integer scalar, the length of the labels. See details below.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{graph.de.bruijn()} was renamed to \code{\link[=make_de_bruijn_graph]{make_de_bruijn_graph()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/layout.random.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layout.R 3 | \name{layout.random} 4 | \alias{layout.random} 5 | \title{Randomly place vertices on a plane or in 3d space} 6 | \usage{ 7 | layout.random(..., params = list()) 8 | } 9 | \arguments{ 10 | \item{...}{Passed to the new layout functions.} 11 | 12 | \item{params}{Passed to the new layout functions as arguments.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{layout.random()} was renamed to \code{\link[=layout_randomly]{layout_randomly()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/remove.vertex.attribute.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/attributes.R 3 | \name{remove.vertex.attribute} 4 | \alias{remove.vertex.attribute} 5 | \title{Delete a vertex attribute} 6 | \usage{ 7 | remove.vertex.attribute(graph, name) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph} 11 | 12 | \item{name}{The name of the vertex attribute to delete.} 13 | } 14 | \description{ 15 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 16 | 17 | \code{remove.vertex.attribute()} was renamed to \code{\link[=delete_vertex_attr]{delete_vertex_attr()}} to create a more 18 | consistent API. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/are.connected.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/structure.info.R 3 | \name{are.connected} 4 | \alias{are.connected} 5 | \title{Are two vertices adjacent?} 6 | \usage{ 7 | are.connected(graph, v1, v2) 8 | } 9 | \arguments{ 10 | \item{graph}{The graph.} 11 | 12 | \item{v1}{The first vertex, tail in directed graphs.} 13 | 14 | \item{v2}{The second vertex, head in directed graphs.} 15 | } 16 | \description{ 17 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 18 | 19 | \code{are.connected()} was renamed to \code{\link[=are_adjacent]{are_adjacent()}} to create a more 20 | consistent API. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/graph.full.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/make.R 3 | \name{graph.full} 4 | \alias{graph.full} 5 | \title{Create a full graph} 6 | \usage{ 7 | graph.full(n, directed = FALSE, loops = FALSE) 8 | } 9 | \arguments{ 10 | \item{n}{Number of vertices.} 11 | 12 | \item{directed}{Whether to create a directed graph.} 13 | 14 | \item{loops}{Whether to add self-loops to the graph.} 15 | } 16 | \description{ 17 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 18 | 19 | \code{graph.full()} was renamed to \code{\link[=make_full_graph]{make_full_graph()}} to create a more 20 | consistent API. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/running.mean.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/other.R 3 | \name{running.mean} 4 | \alias{running.mean} 5 | \title{Running mean of a time series} 6 | \usage{ 7 | running.mean(v, binwidth) 8 | } 9 | \arguments{ 10 | \item{v}{The numeric vector.} 11 | 12 | \item{binwidth}{Numeric constant, the size of the bin, should be meaningful, 13 | i.e. smaller than the length of \code{v}.} 14 | } 15 | \description{ 16 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} 17 | 18 | \code{running.mean()} was renamed to \code{\link[=running_mean]{running_mean()}} to create a more 19 | consistent API. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /src/vendor/cigraph/vendor/f2c/getarg_.c: -------------------------------------------------------------------------------- 1 | #include "f2c.h" 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | /* 7 | * subroutine getarg(k, c) 8 | * returns the kth unix command argument in fortran character 9 | * variable argument c 10 | */ 11 | 12 | #ifdef KR_headers 13 | VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls; 14 | #define Const /*nothing*/ 15 | #else 16 | #define Const const 17 | void getarg_(ftnint *n, char *s, ftnlen ls) 18 | #endif 19 | { 20 | extern int xargc; 21 | extern char **xargv; 22 | Const char *t; 23 | int i; 24 | 25 | if(*n>=0 && *n