tests/testthat/test-get_adjacency_matrix.R

context("get.adjacency.matrix")

test_that("get.adjacency.matrix works on empty graphs", {
    adj <- generate_empty_adjacency_matrix()

    sbm <- generate_empty_SparseBlockMatrixR()
    expect_equivalent(as.matrix(get.adjacency.matrix(sbm)), adj)
})

test_that("get.adjacency.matrix works on nontrivial graphs", {
    adj <- generate_fixed_adjacency_matrix()

    sbm <- generate_fixed_SparseBlockMatrixR()
    expect_equivalent(as.matrix(get.adjacency.matrix(sbm)), adj)
})

Try the ccdrAlgorithm package in your browser

Any scripts or data that you put into this service are public.

ccdrAlgorithm documentation built on April 12, 2022, 9:06 a.m.