Skip to content

Name of tr argument in _packedInds method #23

@dmbates

Description

@dmbates

There are two methods for _packedInds defined in src/utilities.jl, one of which marshals the arguments for the other.

function _packedinds(A::AbstractRFP, i::Integer, j::Integer, neven::Bool, l::Int)
    return _packedinds(Int(i), Int(j), A.uplo == 'L', neven, A.transr == 'N', l)
end

function _packedinds(i::Int, j::Int, lower::Bool, neven::Bool, tr::Bool, l::Int)
    if lower
        conj = l < j
        inds = conj ? (j - l, i + !neven - l) : (i + neven, j)
    else
        conj = (j + !neven)  l
        inds = conj ? (l + neven + j, i) : (i, j + !neven - l)
    end
    return tr ? (inds, conj) : (reverse(inds), !conj)
end

I think it is potentially confusing that, in the second method, the tr argument is true when A.transr is 'N', indicating that A.data is not stored transposed. It may be worth the expense of a few additional characters to change the name tr to not_tr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions