Skip to content

Commit 34fbcad

Browse files
authored
row/colsupport for QL/QRPackedQ (#62)
* row/colsupport for QL/QRPackedQ * v2.1.3
1 parent 423a683 commit 34fbcad

File tree

7 files changed

+443
-419
lines changed

7 files changed

+443
-419
lines changed

.github/workflows/TagBot.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
name: TagBot
22
on:
3-
issue_comment:
3+
issue_comment: # THIS BIT IS NEW
44
types:
55
- created
66
workflow_dispatch:
7-
inputs:
8-
lookback:
9-
default: 3
10-
permissions:
11-
contents: write
127
jobs:
138
TagBot:
9+
# THIS 'if' LINE IS NEW
1410
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
11+
# NOTHING BELOW HAS CHANGED
1512
runs-on: ubuntu-latest
1613
steps:
1714
- uses: JuliaRegistries/TagBot@v1

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "MatrixFactorizations"
22
uuid = "a3b82374-2e81-5b9e-98ce-41277c0e4c87"
3-
version = "2.1.2"
3+
version = "2.1.3"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
@@ -9,7 +9,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
99
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1010

1111
[compat]
12-
ArrayLayouts = "1.0"
12+
ArrayLayouts = "1.9.2"
1313
julia = "1.9"
1414

1515
[extras]

src/MatrixFactorizations.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module MatrixFactorizations
22
using Base, LinearAlgebra, ArrayLayouts
3-
import Base: axes, axes1, getproperty, iterate, tail
3+
import Base: axes, axes1, getproperty, iterate, tail, oneto
44
import LinearAlgebra: BlasInt, BlasReal, BlasFloat, BlasComplex, axpy!,
55
copy_oftype, checksquare, adjoint, transpose, AdjOrTrans, HermOrSym,
66
det, logdet, logabsdet, isposdef
@@ -34,7 +34,7 @@ import Base: convert, size, view, unsafe_indices,
3434
import ArrayLayouts: reflector!, reflectorApply!, materialize!, @_layoutlmul, @_layoutrmul,
3535
MemoryLayout, adjointlayout, AbstractQLayout, QRPackedQLayout,
3636
QRCompactWYQLayout, AdjQRCompactWYQLayout, QRPackedLayout, AdjQRPackedQLayout,
37-
layout_getindex
37+
layout_getindex, rowsupport, colsupport
3838

3939

4040
export ul, ul!, ql, ql!, qrunblocked, qrunblocked!, UL, QL, reversecholesky, reversecholesky!, ReverseCholesky

src/ql.jl

+6
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ adjointlayout(::Type, ::QLPackedQLayout{SLAY,TLAY}) where {SLAY,TLAY} = AdjQLPac
316316
MemoryLayout(::Type{<:QLPackedQ{<:Any,Mat,Tau}}) where {Mat,Tau} =
317317
QLPackedQLayout{typeof(MemoryLayout(Mat)),typeof(MemoryLayout(Tau))}()
318318

319+
colsupport(::QLPackedQLayout, Q, j) = minimum(colsupport(Q.factors, j)):size(Q,1)
320+
rowsupport(::QLPackedQLayout, Q, k) = oneto(maximum(rowsupport(Q.factors, k)))
321+
colsupport(::AdjQLPackedQLayout, Q, j) = oneto(maximum(colsupport(Q'.factors, j)))
322+
rowsupport(::AdjQLPackedQLayout, Q, k) = minimum(rowsupport(Q'.factors, k)):size(Q,2)
323+
324+
319325

320326
function materialize!(M::Lmul{<:QLPackedQLayout})
321327
A,B = M.A, M.B

0 commit comments

Comments
 (0)