-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcompute_cutoff.m
34 lines (30 loc) · 947 Bytes
/
compute_cutoff.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function [ omega, y ] = compute_cutoff( L_k, k, S_complement )
%COMPUTE_CUTOFF
% AUTHOR: Aamir Anis, USC
% AUTHOR: Benjamin Girault, USC (cleanup)
% This function computes the cutoff frequency for a given
% sampling set
% % %
% PARAMETER DESCRIPTION
%
% INPUT
% L: kth power of Laplacian
% S_complement: Complement of the sampling set (list of non-sampled nodes indices)
% k: Power of Laplacian while computing cutoff, higher the order,
% greater the accuracy, but the complexity is also higher.
%
% OUTPUT
% omega: cutoff frequency of the given set
% y: the associated eigenvector
%
% % %
% L_k Symmetric?
assert(ishermitian(L_k), 'StacUSC:ActiveSSLwithSampling:NonHermitian', 'Non Hermitian matrix L_k!');
% compute minimum eigen-pair: efficient way
if nargout == 1
omega = eigs(L_k(S_complement, S_complement), 1, 'sm');
else
[y, omega] = eigs(L_k(S_complement, S_complement), 1, 'sm');
end
omega = abs(omega)^(1/k);
end