Skip to content

Commit

Permalink
check bounded spectrum on combinatorial Laplacian
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Dec 4, 2018
1 parent 4227b49 commit 58421d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pygsp/graphs/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@ def compute_fourier_basis(self, n_eigenvectors=None, recompute=False):
assert -1e-12 < self._e[0] < 1e-12
self._e[0] = 0

if self.lap_type == 'normalized':
# Spectrum bounded by [0, 2].
assert self._e[-1] <= 2
# Bounded spectrum.
if self.lap_type == 'combinatorial':
assert self._e[-1] <= 2 * np.max(self.dw) + 1e-12
elif self.lap_type == 'normalized':
assert self._e[-1] <= 2 + 1e-12

assert np.max(self._e) == self._e[-1]
if n_eigenvectors == self.N:
Expand Down

0 comments on commit 58421d5

Please sign in to comment.