igl.spectra¶
Python API reference for igl.spectra.
eigs¶
eigs(A: scipy.sparse.csc_matrix[float], B: scipy.sparse.csc_matrix[float], k: int, type: EigsType) -> tuple[float64[m, n], float64[m]]
Compute the first/last k eigen pairs of the generalized eigenvalue problem:
A u = s B u
Solutions are approximate and sorted. Only EIGS_TYPE_SM (smallest magnitude) is well supported.
Parameters
A— #A by #A symmetric sparse matrixB— #A by #A symmetric positive-definite sparse matrixk— number of eigen pairs to computetype— EigsType.EIGS_TYPE_SM or EigsType.EIGS_TYPE_LMU— #A by k matrix of sorted eigenvectors (descending)S— k vector of sorted eigenvalues (descending)
Returns
- Tuple (U, S)
eigs(A: scipy.sparse.csc_matrix[float], B: scipy.sparse.csc_matrix[float], k: int, sigma: float) -> tuple[float64[m, n], float64[m]]
Compute k eigen pairs of A u = s B u with a shift: A ← A + sigma * B.
Parameters
A— #A by #A symmetric sparse matrixB— #A by #A symmetric positive-definite sparse matrixk— number of eigen pairs to computesigma— shift to apply to AU— #A by k matrix of sorted eigenvectors (descending)S— k vector of sorted eigenvalues (descending)
Returns
- Tuple (U, S)
lscm¶
Compute a free-boundary least-squares conformal map parametrization using spectral decomposition. Assumes the mesh is a single connected component topologically equivalent to a disk.
Implements "Spectral Conformal Parameterization" [Mullen et al. 2008].
Parameters
V— #V by 3 list of mesh vertex positionsF— #F by 3 list of mesh face indices (triangles)UV— #V by 2 list of UV coordinates
Returns
- UV coordinates