You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`a`: Shall be a rank-n `real` or `complex` array containing the data. It is an `intent(in)` argument.
1403
1406
1407
+
`nrm`: if `dim` is absent, shall be a scalar with the norm evaluated over all the elements of the array. Otherwise, an array of rank `n-1`, and a shape similar
1408
+
to that of `a` with dimension `dim` dropped.
1409
+
1404
1410
`order`: Shall be an `integer` value or a `character` flag that specifies the norm type, as follows. It is an `intent(in)` argument.
1405
1411
1406
1412
| Integer input | Character Input | Norm type |
@@ -1417,9 +1423,9 @@ the value of the `order` input argument. \( A \) may be an array of any rank.
1417
1423
1418
1424
### Return value
1419
1425
1420
-
By default, the return value `x` is a scalar, and contains the norm as evaluated over all elements of the generic-rank array \( A \).
1421
-
If the optional `dim` argument is present, `x` is a rank `n-1` array with the same shape as \( A \) except
1422
-
for dimension `dim`, that is dropped. Each element of `x` contains the 1D norm of the elements of \( A \),
1426
+
By default, the return value `nrm` is a scalar, and contains the norm as evaluated over all elements of the generic-rank array \( A \).
1427
+
If the optional `dim` argument is present, `nrm` is a rank `n-1` array with the same shape as \( A \) except
1428
+
for dimension `dim`, that is collapsed. Each element of `nrm` contains the 1D norm of the elements of \( A \),
1423
1429
evaluated along dimension `dim` only.
1424
1430
1425
1431
Raises `LINALG_ERROR` if the requested norm type is invalid.
@@ -1429,34 +1435,28 @@ If `err` is not present, exceptions trigger an `error stop`.
1429
1435
### Example
1430
1436
1431
1437
```fortran
1432
-
{!example/linalg/example_norm.f90!}
1438
+
{!example/linalg/example_get_norm.f90!}
1433
1439
```
1434
1440
1435
-
## `get_norm` - Computes the vector norm of a generic-rank array.
1441
+
## `norm` - Computes the vector norm of a generic-rank array.
1436
1442
1437
1443
### Status
1438
1444
1439
1445
Experimental
1440
1446
1441
1447
### Description
1442
1448
1443
-
This `pure subroutine` interface computes one of several vector norms of `real` or `complex` array \( A \), depending on
1449
+
This function computes one of several vector norms of `real` or `complex` array \( A \), depending on
1444
1450
the value of the `order` input argument. \( A \) may be an array of any rank.
1445
1451
1446
-
Result `nrm` returns a `real`, scalar norm value for the whole array; if `dim` is specified, `nrm` is a rank n-1
1447
-
array with the same shape as \(A \) and dimension `dim` dropped, containing all norms evaluated along `dim`.
`a`: Shall be a rank-n `real` or `complex` array containing the data. It is an `intent(in)` argument.
1456
1459
1457
-
`nrm`: if `dim` is absent, shall be a scalar with the norm evaluated over all the elements of the array. Otherwise, an array of rank `n-1`, and a shape similar
1458
-
to that of `a` with dimension `dim` dropped.
1459
-
1460
1460
`order`: Shall be an `integer` value or a `character` flag that specifies the norm type, as follows. It is an `intent(in)` argument.
1461
1461
1462
1462
| Integer input | Character Input | Norm type |
@@ -1473,9 +1473,9 @@ to that of `a` with dimension `dim` dropped.
1473
1473
1474
1474
### Return value
1475
1475
1476
-
By default, the return value `nrm` is a scalar, and contains the norm as evaluated over all elements of the generic-rank array \( A \).
1477
-
If the optional `dim` argument is present, `nrm` is a rank `n-1` array with the same shape as \( A \) except
1478
-
for dimension `dim`, that is collapsed. Each element of `nrm` contains the 1D norm of the elements of \( A \),
1476
+
By default, the return value `x` is a scalar, and contains the norm as evaluated over all elements of the generic-rank array \( A \).
1477
+
If the optional `dim` argument is present, `x` is a rank `n-1` array with the same shape as \( A \) except
1478
+
for dimension `dim`, that is dropped. Each element of `x` contains the 1D norm of the elements of \( A \),
1479
1479
evaluated along dimension `dim` only.
1480
1480
1481
1481
Raises `LINALG_ERROR` if the requested norm type is invalid.
@@ -1485,5 +1485,7 @@ If `err` is not present, exceptions trigger an `error stop`.
0 commit comments