dwww Home | Show directory contents | Find package

context("Fruchterman-Reingold layout")

test_that("", {

  skip_on_os("solaris")

  library(igraph)
  set.seed(42)
  g <- make_ring(10)
  l <- layout_with_fr(g, niter=50, start.temp=sqrt(10)/10)
  expect_true(
    isTRUE(all.equal(sum(l), 4.57228, tolerance = 0.1))
  )

  set.seed(42)
  g <- make_star(30)
  l <- layout_with_fr(g, niter=500, dim=3, start.temp=20)
  expect_true(
    isTRUE(all.equal(sum(l), -170.9312, tolerance = 0.1))
  )

})

Generated by dwww version 1.15 on Sun Jun 16 11:26:18 CEST 2024.