MCPcopy Create free account
hub / github.com/daft-dev/daft / test_mrf

Function test_mrf

test/test_examples.py:356–382  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354
355@image_comparison(baseline_images=["mrf"], extensions=["png"])
356def test_mrf():
357 pgm = daft.PGM(node_unit=0.4, grid_unit=1, directed=False)
358
359 for i, (xi, yi) in enumerate(itertools.product(range(1, 5), range(1, 5))):
360 pgm.add_node(str(i), "", xi, yi)
361
362 for e in [
363 (4, 9),
364 (6, 7),
365 (3, 7),
366 (10, 11),
367 (10, 9),
368 (10, 14),
369 (10, 6),
370 (10, 7),
371 (1, 2),
372 (1, 5),
373 (1, 0),
374 (1, 6),
375 (8, 12),
376 (12, 13),
377 (13, 14),
378 (15, 11),
379 ]:
380 pgm.add_edge(str(e[0]), str(e[1]))
381
382 pgm.render()
383
384
385@image_comparison(baseline_images=["no_circles"], extensions=["png"])

Callers

nothing calls this directly

Calls 3

add_nodeMethod · 0.95
add_edgeMethod · 0.95
renderMethod · 0.95

Tested by

no test coverage detected