Skip to content

Prohibit setindex! call if element of Jacobian is zero #452

Open
@MaximilianJHuber

Description

@MaximilianJHuber

I want to provide a sparse matrix to jacobian!, see this thread on Discourse.

However, setting zero-valued elements in a sparse matrix is expensive, because one needs to search if that element exists and has a non-zero value that is to be overwritten.

I propose that before the Jacobian/Hessian is filled, it is set to zero or emptied. Then setindex! is only called it the element is non-zero.

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