Use of the `info` field in the `Smith` and `AbstractHermite` types over throwing errors?

Đang mở
#18 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
julia
Lĩnh vực
backend

Hướng nghiên cứu

Start from the Smith, RowHermite, and ColumnHermite type definitions and their show methods, then compare with LinearAlgebra.QR and LinearAlgebra.issuccess conventions. The proposal needs agreed bit meanings for info, changes wherever factorizations are constructed, and updated display behavior; it is also explicitly breaking. Done would mean documented semantics, tests for each failure bit, and a reviewed decision on the API change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Like other LinearAlgebra.Factorization types, the Smith, RowHermite, and ColumnHermite types have an info::LinearAlgebra.BlasInt field that is zero when the factorization is a success. This could be used to convey to a user why a factorization failed without throwing an exception. This is what factorization types in the linear algebra standard library do (for instance, LinearAlgebra.QR).

I don't know the details of how this value is intended to be interpreted, but I do think that we can use this value to convey information about why a factorization failed. For this, we'd need some standards, and my idea is to set each bit of info to indicate something about the factorization failure:

  • The first bit should be 1 if the Smith/Hermite normal form matrix does not take the expected form (diagonal for SNF, trapezoidal for HNF).
  • The second bit should be 1 if the left unimodular factor is not unimodular.
  • The third bit should be 1 if the right unimodular factor is not unimodular.

This information can be exploited by the show(::IO, ::MIME"text/plain", ::T) method to explain to a user why a factorization failed in interactive use. My issue is that users writing non-interactive code would have to manually check for successful factorizations with LinearAlgebra.issuccess. Of course, this would be a breaking change if implemented.

Ngôn ngữ chính
Julia
Star
6
Fork
3
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của brainandforce/NormalForms.jl

Tất cả issue của brainandforce/NormalForms.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.