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

(开头部分) 7KB

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

<?php
/**
 *    @package JAMA
 *
 *    For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
 *    unit lower triangular matrix L, an n-by-n upper triangular matrix U,
 *    and a permutation vector piv of length m so that A(piv,:) = L*U.
 *    If m < n, then L is m-by-m and U is m-by-n.
 *
 *    The LU decompostion with pivoting always exists, even if the matrix is
 *    singular, so the constructor will never fail. The primary use of the
 *    LU decomposition is in the solution of square systems of simultaneous
 *    linear equations. This will fail if isNonsingular() returns false.
 *
 *    @author Paul Meagher
 *    @author Bartosz Matosiuk
 *    @author Michael Bommarito
 *    @version 1.1
 *    @license PHP v3.0
 */
class PHPExcel_Shared_JAMA_LUDecomposition
{
    const MATRIX_SINGULAR_EXCEPTION    = "Can only perform operation on singular matrix.";
    const MATRIX_SQUARE_EXCEPTION      = "Mismatched Row dimension";

    /**
     *    Decomposition storage
     *    @var array
     */
    private $LU = array();

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

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

    /**
     *    Pivot sign.
     *    @var int
     */
    private $pivsign;

    /**
     *    Internal storage of pivot vector.
     *    @var array
     */
    private $piv = array();

    /**
     *    LU Decomposition constructor.
     *
     *    @param $A Rectangular matrix
     *    @return Structure to access L, U and piv.
后面还有 197 行代码,解锁后查看完整代码

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

AI 解读

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

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