public static double inducedP2( DMatrixRMaj A ) {
        SingularValueDecomposition_F64<DMatrixRMaj> svd = DecompositionFactory_DDRM.svd(A.numRows,A.numCols,false,false,true);

        if( !svd.decompose(A) )
            throw new RuntimeException("Decomposition failed");

        double[] singularValues = svd.getSingularValues();

        // the largest singular value is the induced p2 norm
        return UtilEjml.max(singularValues,0,singularValues.length);
    }
public static double inducedP2 ( DMatrixRMaj A ) { SingularValueDecomposition_F64 < DMatrixRMaj > svd = DecompositionFactory_DDRM . svd ( A . numRows , A . numCols , false , false , true ) ; if ( ! svd . decompose ( A ) ) throw new RuntimeException ( "Decomposition failed" ) ; double [ ] singularValues = svd . getSingularValues ( ) ; return UtilEjml . max ( singularValues , 0 , singularValues . length ) ; }
<p>
Computes the induced p = 2 matrix norm, which is the largest singular value.
</p>

@param A Matrix. Not modified.
@return The norm.