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
Copy file name to clipboardExpand all lines: README.md
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,12 +70,35 @@ Returns the solution array \f$ x \f$ with size \f$ n \f$ (for a single right-han
70
70
- This function relies on LAPACK's least-squares solvers, such as [`*GELSS`](@ref la_lapack::gelss).
71
71
- If `overwrite_a` is enabled, the original contents of `a` and `b` may be lost.
72
72
73
-
## `det(A)`
74
-
**Type**: Function
75
-
**Description**: Determinant of a scalar or square matrix.
76
-
**Optional arguments**:
77
-
-`overwrite_a`: Option to let A be destroyed.
78
-
-`err`: Return state handler.
73
+
## [det](@ref la_linalg::det) - Determinant of a scalar or rectangular matrix.
74
+
75
+
### Syntax
76
+
77
+
`d = det(a [, overwrite_a] [, err])`
78
+
79
+
### Description
80
+
81
+
This function computes the determinant of a square matrix \f$ A \f$. The matrix must be a real matrix of size \f$ [m, n] \f$, and the determinant is computed using an efficient factorization method (e.g., LU decomposition).
82
+
83
+
### Arguments
84
+
85
+
-`a`: A real matrix of size \f$ [m, n] \f$, representing the rectangular matrix for which the determinant is calculated. If `overwrite_a`, it is an `inout` argument and may be modified during computation.
86
+
-`overwrite_a` (optional, default = `.false.`): A logical flag that determines whether the input matrix `a` can be overwritten. If `.true.`, the matrix `a` may be destroyed and modified in place to save memory.
87
+
-`err` (optional): A state return flag of [type(la_state)](@ref la_state_type::la_state). If an error occurs and `err` is not provided, the function will stop execution.
88
+
89
+
### Return value
90
+
91
+
The function returns a scalar value representing the determinant of the input matrix \f$ A \f$. The return type is the same as the input matrix (real precision).
92
+
93
+
### Errors
94
+
95
+
- Raises [LINALG_VALUE_ERROR](@ref la_state_type::linalg_value_error) if the matrix `a` is not square.
96
+
- If `err` is not provided, the function will stop execution on errors.
97
+
98
+
### Notes
99
+
100
+
- The determinant of the matrix is computed using the LAPACK [getrf](@ref la_lapack::getrf) backend.
101
+
- If `overwrite_a` is enabled, the input matrix `a` will be destroyed during the computation process.
0 commit comments