## org.apache.mahout.math.hadoop.stochasticsvd.qr
Class GivensThinSolver

    java.lang.Object
      org.apache.mahout.math.hadoop.stochasticsvd.qr.GivensThinSolver

    public class GivensThinSolver

extends Object

Givens Thin solver. Standard Givens operations are reordered in a way that helps us to push them thru MapReduce operations in a block fashion.

Constructor Summary
`GivensThinSolver(int m, int n)`

Method Summary
`void` `adjust(int newM)`
`void` `appendRow(double[] aRow)` api for row-by-row addition
`static void` `applyGivensInPlace(double c, double s, double[] row1, double[] row2, int offset, int len)`
`static void` `applyGivensInPlace(double c, double s, int i, int k, Matrix mx)`
`static void` `applyGivensInPlace(double c, double s, Vector row1, Vector row2, int offset, int len)`
`static double[][]` `computeQtHat(double[][] qt, int i, Iterator<UpperTriangular> rIter)`
`static void` `fromRho(double rho, double[] csOut)`
`int` `getCnt()`
`int` `getM()`
`int` `getN()`
`UpperTriangular` `getRTilde()`
`double[][]` `getThinQtTilde()`
`static void` `givens(double a, double b, double[] csOut)`
`boolean` `isFull()`
`static boolean` `isOrthonormal(double[][] qt, boolean insufficientRank, double epsilon)`
`static boolean` `isOrthonormalBlocked(Iterable<double[][]> qtHats, boolean insufficientRank, double epsilon)`
`static double[][]` `mergeQrDown(double[][] r1, double[][] qt2, double[][] r2)`
`static double[][]` `mergeQrDown(UpperTriangular r1, double[][] qt2, UpperTriangular r2)`
`static double[][]` `mergeQrUp(double[][] qt1, double[][] r1, double[][] r2)`
`static double[][]` `mergeQrUp(double[][] qt1, UpperTriangular r1, UpperTriangular r2)`
`static void` `mergeR(double[][] r1, double[][] r2)`
`static void` `mergeR(UpperTriangular r1, UpperTriangular r2)`
`static void` `mergeRonQ(double[][] r1, double[][] r2, double[][] qt1, double[][] qt2)`
`static void` `mergeRonQ(UpperTriangular r1, UpperTriangular r2, double[][] qt1, double[][] qt2)`
`void` `reset()`
`void` `solve(Matrix a)`
`static double` `toRho(double c, double s)`
`void` `trim()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GivensThinSolver

    public GivensThinSolver(int m,
                            int n)

Method Detail

### reset

    public void reset()

### solve

    public void solve(Matrix a)

### isFull

    public boolean isFull()

### getM

    public int getM()

### getN

    public int getN()

### getCnt

    public int getCnt()

### adjust

    public void adjust(int newM)

### trim

    public void trim()

### appendRow

    public void appendRow(double[] aRow)

  api for row-by-row addition

  Parameters:
    `aRow` -

### getRTilde

    public UpperTriangular getRTilde()

### getThinQtTilde

    public double[][] getThinQtTilde()

### applyGivensInPlace

    public static void applyGivensInPlace(double c,
                                          double s,
                                          double[] row1,
                                          double[] row2,
                                          int offset,
                                          int len)

### applyGivensInPlace

    public static void applyGivensInPlace(double c,
                                          double s,
                                          Vector row1,
                                          Vector row2,
                                          int offset,
                                          int len)

### applyGivensInPlace

    public static void applyGivensInPlace(double c,
                                          double s,
                                          int i,
                                          int k,
                                          Matrix mx)

### fromRho

    public static void fromRho(double rho,
                               double[] csOut)

### givens

    public static void givens(double a,
                              double b,
                              double[] csOut)

### toRho

    public static double toRho(double c,
                               double s)

### mergeR

    public static void mergeR(UpperTriangular r1,
                              UpperTriangular r2)

### mergeR

    public static void mergeR(double[][] r1,
                              double[][] r2)

### mergeRonQ

    public static void mergeRonQ(UpperTriangular r1,
                                 UpperTriangular r2,
                                 double[][] qt1,
                                 double[][] qt2)

### mergeRonQ

    public static void mergeRonQ(double[][] r1,
                                 double[][] r2,
                                 double[][] qt1,
                                 double[][] qt2)

### mergeQrUp

    public static double[][] mergeQrUp(double[][] qt1,
                                       double[][] r1,
                                       double[][] r2)

### mergeQrUp

    public static double[][] mergeQrUp(double[][] qt1,
                                       UpperTriangular r1,
                                       UpperTriangular r2)

### mergeQrDown

    public static double[][] mergeQrDown(double[][] r1,
                                         double[][] qt2,
                                         double[][] r2)

### mergeQrDown

    public static double[][] mergeQrDown(UpperTriangular r1,
                                         double[][] qt2,
                                         UpperTriangular r2)

### computeQtHat

    public static double[][] computeQtHat(double[][] qt,
                                          int i,
                                          Iterator<UpperTriangular> rIter)

### isOrthonormal

    public static boolean isOrthonormal(double[][] qt,
                                        boolean insufficientRank,
                                        double epsilon)

### isOrthonormalBlocked

    public static boolean isOrthonormalBlocked(Iterable<double[][]> qtHats,
                                               boolean insufficientRank,
                                               double epsilon)

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.