ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
identity.php
Go to the documentation of this file.
1 <?php
2 
11 namespace Matrix;
12 
20 if (!function_exists(__NAMESPACE__ . '\\identity')) {
21  function identity($matrix): Matrix
22  {
23  if (is_array($matrix)) {
24  $matrix = new Matrix($matrix);
25  }
26  if (!$matrix instanceof Matrix) {
27  throw new Exception('Must be Matrix or array');
28  }
29 
31  }
32 }
static identity(Matrix $matrix)
Return the identity matrix The identity matrix, or sometimes ambiguously called a unit matrix...
Definition: Functions.php:214
$matrix
Definition: test.php:18
Class for the creating "special" Matrices.
Definition: Builder.php:11