Skip to content

Commit 513d77b

Browse files
committed
rename example programs
1 parent 8b138f7 commit 513d77b

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

doc/specs/stdlib_linalg.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ Exceptions always trigger an `error stop`.
10201020
### Example
10211021

10221022
```fortran
1023-
{!example/linalg/example_inverse1.f90!}
1023+
{!example/linalg/example_inverse_operator.f90!}
10241024
```
10251025

10261026
## `invert` - Inversion of a square matrix.
@@ -1065,7 +1065,11 @@ If `err` is not present, exceptions trigger an `error stop`.
10651065
### Example
10661066

10671067
```fortran
1068-
{!example/linalg/example_inverse3.f90!}
1068+
{!example/linalg/example_inverse_inplace.f90!}
1069+
```
1070+
1071+
```fortran
1072+
{!example/linalg/example_inverse_subroutine.f90!}
10691073
```
10701074

10711075
## `inv` - Inverse of a square matrix.
@@ -1101,5 +1105,5 @@ If `err` is not present, exceptions trigger an `error stop`.
11011105
### Example
11021106

11031107
```fortran
1104-
{!example/linalg/example_inverse2.f90!}
1108+
{!example/linalg/example_inverse_function.f90!}
11051109
```

example/linalg/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ ADD_EXAMPLE(is_skew_symmetric)
1212
ADD_EXAMPLE(is_square)
1313
ADD_EXAMPLE(is_symmetric)
1414
ADD_EXAMPLE(is_triangular)
15-
ADD_EXAMPLE(inverse1)
16-
ADD_EXAMPLE(inverse2)
17-
ADD_EXAMPLE(inverse3)
18-
ADD_EXAMPLE(inverse4)
15+
ADD_EXAMPLE(inverse_operator)
16+
ADD_EXAMPLE(inverse_function)
17+
ADD_EXAMPLE(inverse_inplace)
18+
ADD_EXAMPLE(inverse_subroutine)
1919
ADD_EXAMPLE(outer_product)
2020
ADD_EXAMPLE(trace)
2121
ADD_EXAMPLE(state1)

example/linalg/example_inverse2.f90 renamed to example/linalg/example_inverse_function.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Matrix inversion example: function interface
2-
program example_inverse2
2+
program example_inverse_function
33
use stdlib_linalg_constants, only: dp
44
use stdlib_linalg, only: inv,eye
55
implicit none
@@ -19,4 +19,4 @@ program example_inverse2
1919
! Final check
2020
print *, 'CHECK passed? ',matmul(A,Am1)==eye(2)
2121

22-
end program example_inverse2
22+
end program example_inverse_function

example/linalg/example_inverse3.f90 renamed to example/linalg/example_inverse_inplace.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Matrix inversion example: in-place inversion
2-
program example_inverse3
2+
program example_inverse_inplace
33
use stdlib_linalg_constants, only: dp
44
use stdlib_linalg, only: invert,eye
55
implicit none
@@ -20,4 +20,4 @@ program example_inverse3
2020
! Final check
2121
print *, 'CHECK passed? ',matmul(A,Am1)==eye(2)
2222

23-
end program example_inverse3
23+
end program example_inverse_inplace

example/linalg/example_inverse1.f90 renamed to example/linalg/example_inverse_operator.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Matrix inversion example: operator interface
2-
program example_inverse1
2+
program example_inverse_operator
33
use stdlib_linalg_constants, only: dp
44
use stdlib_linalg, only: operator(.inv.),eye
55
implicit none
@@ -19,4 +19,4 @@ program example_inverse1
1919
! Final check
2020
print *, 'CHECK passed? ',matmul(A,Am1)==eye(2)
2121

22-
end program example_inverse1
22+
end program example_inverse_operator

example/linalg/example_inverse4.f90 renamed to example/linalg/example_inverse_subroutine.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Matrix inversion example: subroutine interface
2-
program example_inverse4
2+
program example_inverse_subroutine
33
use stdlib_linalg_constants, only: dp
44
use stdlib_linalg, only: invert,eye
55
implicit none
@@ -19,4 +19,4 @@ program example_inverse4
1919
! Final check
2020
print *, 'CHECK passed? ',matmul(A,Am1)==eye(2)
2121

22-
end program example_inverse4
22+
end program example_inverse_subroutine

0 commit comments

Comments
 (0)