-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark Hale
committed
Jun 4, 2024
1 parent
0696229
commit 3b330bd
Showing
4 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import unittest | ||
|
||
import numpy as np | ||
import sgw_tools as sgw | ||
import pygsp as gsp | ||
|
||
|
||
class TestCase(unittest.TestCase): | ||
def test_tig(self): | ||
G = sgw.BigGraph([[0,1],[1,0]]) | ||
g = gsp.filters.Heat(G) | ||
s = sgw.createSignal(G) | ||
sgw._tig(g, s) | ||
|
||
# single signal | ||
s = np.array([[1],[-1]]) | ||
sgw._tig(g, s) | ||
|
||
# multiple signals | ||
s = np.array([[1,2,3],[-1,-2,-3]]) | ||
sgw._tig(g, s) | ||
|
||
# isolated node | ||
G = sgw.BigGraph([[2]]) | ||
g = gsp.filters.Heat(G) | ||
s = sgw.createSignal(G) | ||
sgw._tig(g, s) | ||
|
||
# single signal | ||
s = np.array([1]) | ||
sgw._tig(g, s) | ||
|
||
# multiple signals | ||
s = np.array([[1,2,3]]) | ||
sgw._tig(g, s) |