vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php

(开头部分) 1KB

这里只显示每个文件的开头 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 MatrixRankException	= "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();
			// Main loop.

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

AI 解读 AI

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

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