ThinkPHP/Library/Org/Util/PHPExcel/Shared/JAMA/QRDecomposition.php

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
 *    @package JAMA
 *
 *    For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n
 *    orthogonal matrix Q and an n-by-n upper triangular matrix R so that
 *    A = Q*R.
 *
 *    The QR decompostion always exists, even if the matrix does not have
 *    full rank, so the constructor will never fail.  The primary use of the
 *    QR decomposition is in the least squares solution of nonsquare systems
 *    of simultaneous linear equations.  This will fail if isFullRank()
 *    returns false.
 *
 *    @author  Paul Meagher
 *    @license PHP v3.0
 *    @version 1.1
 */
class PHPExcel_Shared_JAMA_QRDecomposition
{
    const MATRIX_RANK_EXCEPTION  = "Can only perform operation on full-rank matrix.";

    /**
     *    Array for internal storage of decomposition.
     *    @var array
     */
    private $QR = array();

    /**
     *    Row dimension.
     *    @var integer
     */
    private $m;

    /**
    *    Column dimension.
    *    @var integer
    */
    private $n;

    /**
     *    Array for internal storage of diagonal of R.
     *    @var  array
     */
    private $Rdiag = array();


    /**
     *    QR Decomposition computed by Householder reflections.
     *
     *    @param matrix $A Rectangular matrix
     *    @return Structure to access R and the Householder vectors and compute Q.
     */
    public function __construct($A)
    {
        if ($A instanceof PHPExcel_Shared_JAMA_Matrix) {
            // Initialize.
            $this->QR = $A->getArrayCopy();
            $this->m  = $A->getRowDimension();
            $this->n  = $A->getColumnDimension();
后面还有 175 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。