MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / qrUpdateQ

Method qrUpdateQ

JSAT/src/jsat/linear/GenericMatrix.java:781–795  ·  view source on GitHub ↗
(Matrix Q, int k, double[] vk, double TwoOverBeta)

Source from the content-addressed store, hash-verified

779 }
780
781 private void qrUpdateQ(Matrix Q, int k, double[] vk, double TwoOverBeta)
782 {
783 //We are computing Q' in what we are treating as the column major order, which represents Q in row major order, which is what we want!
784 for(int j = 0; j < Q.cols(); j++)
785 {
786 double y = 0;//y = vk dot A_j
787 for (int i = k; i < Q.cols(); i++)
788 y += vk[i] * Q.get(j, i);
789
790 y *= TwoOverBeta;
791 for (int i = k; i < Q.rows(); i++)
792 Q.increment(j, i, -y*vk[i]);
793
794 }
795 }
796
797 private double initalVKNormCompute(int k, int M, double[] vk, Matrix A)
798 {

Callers 1

qrMethod · 0.95

Calls 4

colsMethod · 0.45
getMethod · 0.45
rowsMethod · 0.45
incrementMethod · 0.45

Tested by

no test coverage detected