Skip to content

Commit

Permalink
tests-and-examples-folders
Browse files Browse the repository at this point in the history
  • Loading branch information
gfudenberg committed Oct 3, 2023
1 parent 7e4a410 commit 0ea23c8
Show file tree
Hide file tree
Showing 5 changed files with 616 additions and 605 deletions.
599 changes: 599 additions & 0 deletions examples/sample_simulation_onesided.ipynb

Large diffs are not rendered by default.

591 changes: 0 additions & 591 deletions looplib/sample_simulation_onesided.ipynb

This file was deleted.

14 changes: 0 additions & 14 deletions looplib/test.py

This file was deleted.

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
install_requires=['numpy', 'matplotlib'],
ext_modules = cythonize(['looplib/simlef.pyx',
'looplib/simlef_twosided.pyx',
'looplib/simlef_onesided.pyx',
'looplib/looptools_c.pyx']),
include_dirs=[np.get_include()]
)
16 changes: 16 additions & 0 deletions tests/test_looptools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from looplib.looptools import *


def test_FRiP():
# Tests for FRiP
lattice_length = 5
boundary_list = [1, 4]

lef_A = [1, 1, 4, 1]
assert FRiP(lattice_length, lef_A, boundary_list) == 1

lef_B = [3, 0, 2, 3]
assert FRiP(lattice_length, lef_B, boundary_list) == 0

lef_C = [1, 1, 3, 3]
assert FRiP(lattice_length, lef_C, boundary_list) == 0.5

0 comments on commit 0ea23c8

Please sign in to comment.