[英]How to get normalised laplacian matrix using armadillo
Can anybody please tell me what is the equivalent of the following operation in Armadillo linear algebra package L = D^-0.5 * A * D^-0.5 有人可以告诉我Armadillo线性代数包中以下运算的等效项L = D ^ -0.5 * A * D ^ -0.5
I can think of one way to do it 我可以想到一种方法
mat K1,K2;
K1.load(argv[1],auto_detect);
colvec c = sum(K1,1);
mat D = diagmat(c);
mat D1 = pow(inv(D),0.5);
mat I(10,10);I.eye();
mat L = I - D1*K1*D1;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.