ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
test.php
Go to the documentation of this file.
1
<?
php
2
3
use
Matrix\Matrix
;
4
use
Matrix\Decomposition\QR
;
5
6
include __DIR__ .
'/../vendor/autoload.php'
;
7
8
$grid
= [
9
[1, 2],
10
[3, 4],
11
];
12
13
$targetGrid
= [
14
[-1],
15
[-2],
16
];
17
18
$matrix
=
new
Matrix
(
$grid
);
19
$target
=
new
Matrix
(
$targetGrid
);
20
21
$decomposition
=
new
QR
(
$matrix
);
22
23
$X
=
$decomposition
->solve(
$target
);
24
25
echo
'X'
,
PHP_EOL
;
26
var_export(
$X
->toArray());
27
echo
PHP_EOL
;
28
29
$resolve
=
$matrix
->multiply(
$X
);
30
31
echo
'Resolve'
,
PHP_EOL
;
32
var_export(
$resolve
->toArray());
33
echo
PHP_EOL
;
$grid
$grid
Definition:
test.php:8
$X
$X
Definition:
test.php:23
$resolve
$resolve
Definition:
test.php:29
$targetGrid
$targetGrid
Definition:
test.php:13
QR
Matrix\Decomposition\QR
Definition:
QR.php:8
$decomposition
$decomposition
Definition:
test.php:21
PHP_EOL
PHP_EOL
Definition:
test.php:25
$matrix
$matrix
Definition:
test.php:18
echo
php
Matrix
Matrix
Class for the creating "special" Matrices.
Definition:
Builder.php:11
$target
$target
Definition:
test.php:19
libs
composer
vendor
markbaker
matrix
examples
test.php
Generated on Thu Jan 30 2025 19:01:20 for ILIAS by
1.8.13 (using
Doxyfile
)