php-doc-en/reference/lapack/lapack/leastsquaresbyfactorisation.xml
Yannick Torres 94497636f2 Fix svn keywords
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324194 c90b9560-bf6c-de11-be94-00142212c4b1
2012-03-13 15:34:05 +00:00

112 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lapack.leastsquaresbyfactorisation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Lapack::leastSquaresByFactorisation</refname>
<refpurpose>Calculate the linear least squares solution of a matrix using QR factorisation</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>array</type><methodname>Lapack::leastSquaresByFactorisation</methodname>
<methodparam><type>array</type><parameter>a</parameter></methodparam>
<methodparam><type>array</type><parameter>b</parameter></methodparam>
</methodsynopsis>
<para>
Solve the linear least squares problem, find min x in || B - Ax ||
Returns an array representing x. Expects arrays of arrays, and will
return an array of arrays in the dimension B num cols x A num cols.
Uses QR or LQ factorisation on matrix A.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>a</parameter></term>
<listitem>
<para>
Matrix A
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>b</parameter></term>
<listitem>
<para>
Matrix B
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Array of the solution matrix
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>Lapack::leastSquaresByFactorisation</function>:</title>
<programlisting role="php">
<![CDATA[
<?php
$a = array(
array( 1.44, -7.84, -4.39, 4.53),
array(-9.96, -0.28, -3.24, 3.83),
array(-7.55, 3.24, 6.27, -6.64),
array( 8.34, 8.09, 5.28, 2.06),
array( 7.08, 2.52, 0.74, -2.47),
array(-5.45, -5.70, -1.19, 4.70),
);
$b = array(
array( 8.58, 9.35),
array( 8.26, -4.43),
array( 8.48, -0.70),
array(-5.28, -0.26),
array( 5.72, -7.36),
array( 8.93, -2.52),
);
$result = Lapack::leastSquaresByFactorisation($a, $b);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->