Skip to content

Commit ade751e

Browse files
authored
Update LDLFactorizations tutorial (#74)
1 parent a3ee173 commit ade751e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • tutorials/introduction-to-ldlfactorizations

tutorials/introduction-to-ldlfactorizations/index.jmd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,21 @@ LDL.r1 = 2 * ϵ # if any of the n_d first pivots |D[i]| < ϵ, then D[i] = sign(L
7575
LDL.r2 = -ϵ # if any of the n - n_d last pivots |D[i]| < ϵ, then D[i] = sign(LDL.r2) * max(abs(D[i] + LDL.r2), abs(LDL.r2))
7676
ldl_factorize!(Au, LDL)
7777
```
78+
79+
## Choosing the precision of the factorization
80+
81+
It is possible to factorize a matrix in a different type than the type of its elements:
82+
83+
```julia
84+
# with eltype(Au) == Float64
85+
LDL64 = ldl(Au) # factorization in eltype(Au) = Float64
86+
LDL32 = ldl(Au, Float32) # factorization in Float32
87+
```
88+
89+
```julia
90+
# with eltype(Au) == Float64
91+
LDL64 = ldl_analyze(Au) # symbolic analysis in eltype(Au) = Float64
92+
LDL32 = ldl_analyze(Au, Float32) # symbolic analysis in Float32
93+
ldl_factorize!(Au, LDL64)
94+
ldl_factorize!(Au, LDL32)
95+
```

0 commit comments

Comments
 (0)