petls.PersistentSheafLaplacian.spectra#
- PersistentSheafLaplacian.spectra(dim=None, a=None, b=None, request_list=None, allpairs=False)[source]#
Compute the eigenvalues of L_{dim}^{a,b} or for every tuple (dim, a, b) in request_list.
- Parameters:
- dimint, optional
Dimension.
- afloat, optional
Start filtration value.
- bfloat, optional
End filtration value
- request_listList[List[int, float, float]], optional
List of (dim, a, b) to compute the spectra of
- Returns:
- List[float]
If passed dim, a, and b, returns eigenvalues of L_{dim}^{a,b}
- List[Tuple[int, float, float, List[float]]]
If passed request_list, returns a tuple (dim, a, b, eigenvalues) for each request in request_list If passed no arguments, returns as if request_list is of all combinations (dim, a, b) where b is the next filtration after a, and (dim, a, a) when a is the largest filtration value
Examples
>>> d1 = np.array([[-1,0,-1], [1,-1,0], [0,1,1]]) >>> d2 = np.array([[1],[1],[-1]]) >>> boundaries = [d1,d2] >>> filtrations = [[0,1,2],[3,4,5],[5]] >>> pl = Complex(boundaries, filtrations) >>> pl.spectra(0, 1.2, 4.5) [0.0, 1.9999998807907104] >>> pl.spectra(request_list = [[0, 1.2, 4.5]]) [(0, 1.2, 4.5, [0.0, 1.9999998807907104])] >>> pl.spectra() [(0, 0.0, 3.0, [0.0]), (1, 0.0, 3.0, []), (2, 0.0, 3.0, []), (0, 3.0, 4.0, [0.0, 0.9999998807907104, 3.0]), (1, 3.0, 4.0, [2.0]), (2, 3.0, 4.0, []), (0, 4.0, 5.0, [0.0, 2.999999761581421, 3.0]), (1, 4.0, 5.0, [0.9999999403953552, 2.999999761581421]), (2, 4.0, 5.0, []), (0, 5.0, 5.0, [0.0, 2.999999761581421, 3.0]), (1, 5.0, 5.0, [3.0, 3.0, 3.0]), (2, 5.0, 5.0, [3.0])]