@@ -14,7 +14,8 @@ import Base: (\), size, getproperty, setproperty!, propertynames, show,
14
14
copy, eachindex, view, sortperm, unsafe_load, zeros, convert, eltype,
15
15
length, parent, stride, finalizer, Complex, complex, imag, real, map!,
16
16
summary, println, oneunit, sizeof, isdefined, setfield!, getfield,
17
- OutOfMemoryError, ArgumentError, OverflowError, ErrorException, DimensionMismatch
17
+ OutOfMemoryError, ArgumentError, OverflowError, ErrorException,
18
+ DimensionMismatch
18
19
19
20
# Convert from 1-based to 0-based indices
20
21
function decrement! (A:: AbstractArray{T} ) where {T <: Integer }
@@ -166,6 +167,7 @@ function _free_symbolic(K::AbstractKLUFactorization{Tv, Ti}) where {Ti <: KLUITy
166
167
end
167
168
168
169
for Ti in KLUIndexTypes, Tv in KLUValueTypes
170
+
169
171
klufree = _klu_name (" free_numeric" , Tv, Ti)
170
172
ptr = _klu_name (" numeric" , :Float64 , Ti)
171
173
@eval begin
218
220
# Certain sets of inputs must be non-null *together*:
219
221
# [Lp, Li, Lx], [Up, Ui, Ux], [Fp, Fi, Fx]
220
222
for Tv in KLUValueTypes, Ti in KLUIndexTypes
223
+
221
224
extract = _klu_name (" extract" , Tv, Ti)
222
225
sort = _klu_name (" sort" , Tv, Ti)
223
226
if Tv === :ComplexF64
@@ -436,6 +439,7 @@ function klu_analyze!(K::KLUFactorization{Tv, Ti}, P::Vector{Ti},
436
439
end
437
440
438
441
for Tv in KLUValueTypes, Ti in KLUIndexTypes
442
+
439
443
factor = _klu_name (" factor" , Tv, Ti)
440
444
@eval begin
441
445
function klu_factor! (
@@ -464,6 +468,7 @@ for Tv in KLUValueTypes, Ti in KLUIndexTypes
464
468
end
465
469
466
470
for Tv in KLUValueTypes, Ti in KLUIndexTypes
471
+
467
472
rgrowth = _klu_name (" rgrowth" , Tv, Ti)
468
473
rcond = _klu_name (" rcond" , Tv, Ti)
469
474
condest = _klu_name (" condest" , Tv, Ti)
@@ -639,6 +644,7 @@ See also: [`klu`](@ref)
639
644
klu!
640
645
641
646
for Tv in KLUValueTypes, Ti in KLUIndexTypes
647
+
642
648
refactor = _klu_name (" refactor" , Tv, Ti)
643
649
@eval begin
644
650
function klu! (K:: KLUFactorization{$Tv, $Ti} , nzval:: Vector{$Tv} ;
@@ -676,8 +682,8 @@ function klu!(K::KLUFactorization{U}, S::SparseMatrixCSC{U};
676
682
# what should happen here when check = false? This is not really a KLU error code.
677
683
K. colptr == S. colptr && K. rowval == S. rowval ||
678
684
(decrement! (K. colptr);
679
- decrement! (K. rowval);
680
- throw (ArgumentError (" The pattern of the original matrix must match the pattern of the refactor." ))
685
+ decrement! (K. rowval);
686
+ throw (ArgumentError (" The pattern of the original matrix must match the pattern of the refactor." ))
681
687
)
682
688
decrement! (K. colptr)
683
689
decrement! (K. rowval)
@@ -710,6 +716,7 @@ This function overwrites `B` with the solution `X`, for a new solution vector `X
710
716
"""
711
717
solve!
712
718
for Tv in KLUValueTypes, Ti in KLUIndexTypes
719
+
713
720
solve = _klu_name (" solve" , Tv, Ti)
714
721
@eval begin
715
722
function solve! (klu:: AbstractKLUFactorization{$Tv, $Ti} ,
@@ -726,6 +733,7 @@ for Tv in KLUValueTypes, Ti in KLUIndexTypes
726
733
end
727
734
728
735
for Tv in KLUValueTypes, Ti in KLUIndexTypes
736
+
729
737
tsolve = _klu_name (" tsolve" , Tv, Ti)
730
738
if Tv === :ComplexF64
731
739
call = :($ tsolve (
0 commit comments