@@ -467,16 +467,23 @@ Returns the number.
467
467
"""
468
468
bunchkaufman_instance (a:: Any ) = bunchkaufman (a, check = false )
469
469
470
+ @static if VERSION < v " 1.7beta"
471
+ const DEFAULT_CHOLESKY_PIVOT = Val (false )
472
+ else
473
+ const DEFAULT_CHOLESKY_PIVOT = LinearAlgebra. NoPivot ()
474
+ end
475
+
470
476
"""
471
477
cholesky_instance(A, pivot = LinearAlgebra.RowMaximum()) -> cholesky_factorization_instance
472
478
473
479
Returns an instance of the Cholesky factorization object with the correct type
474
480
cheaply.
475
481
"""
476
- function cholesky_instance (A:: Matrix{T} , pivot = LinearAlgebra . NoPivot () ) where {T}
482
+ function cholesky_instance (A:: Matrix{T} , pivot = DEFAULT_CHOLESKY_PIVOT ) where {T}
477
483
return cholesky (similar (A, 0 , 0 ), pivot, check = false )
478
484
end
479
- function cholesky_instance (A:: Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}} , pivot = LinearAlgebra. RowMaximum ())
485
+
486
+ function cholesky_instance (A:: Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}} , pivot = DEFAULT_CHOLESKY_PIVOT)
480
487
cholesky (sparse (similar (A, 1 , 1 )), check = false )
481
488
end
482
489
@@ -485,15 +492,15 @@ cholesky_instance(a::Number, pivot = LinearAlgebra.RowMaximum()) -> a
485
492
486
493
Returns the number.
487
494
"""
488
- cholesky_instance (a:: Number , pivot = LinearAlgebra . RowMaximum () ) = a
495
+ cholesky_instance (a:: Number , pivot = DEFAULT_CHOLESKY_PIVOT ) = a
489
496
490
497
"""
491
498
cholesky_instance(a::Any, pivot = LinearAlgebra.RowMaximum()) -> cholesky(a, check=false)
492
499
493
500
Slow fallback which gets the instance via factorization. Should get
494
501
specialized for new matrix types.
495
502
"""
496
- cholesky_instance (a:: Any , pivot = LinearAlgebra . RowMaximum () ) = cholesky (a, pivot, check = false )
503
+ cholesky_instance (a:: Any , pivot = DEFAULT_CHOLESKY_PIVOT ) = cholesky (a, pivot, check = false )
497
504
498
505
"""
499
506
ldlt_instance(A) -> ldlt_factorization_instance
0 commit comments