stdlib-js / stdlib-js/stdlib

[RFC]: Add matrix assertion utilities to @stdlib/assert (tracking issue)

未关闭
#7,334 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Needs Discussion RFC
主要语言
JavaScript
星标
6k
派生
1.3k
平均合并
1 天 3 小时
30 天内合并 PR
611

描述

### Description

This RFC proposes adding basic matrix structure assertion utilities to the `@stdlib/assert` namespace.
These functions test whether an ndarray-like object conforms to specific matrix patterns listed below.

#### Matrix Assertion Checklist

- [ ] `is-null-matrix`
A matrix where all elements are zero. [Learn more](https://en.wikipedia.org/wiki/Zero_matrix)
- [ ] `is-identity-matrix`
A diagonal matrix where all diagonal elements are one. [Learn more](https://en.wikipedia.org/wiki/Identity_matrix)
- [ ] `is-diagonal-matrix`
A square matrix where all off-diagonal elements are zero. [Learn more](https://en.wikipedia.org/wiki/Diagonal_matrix)
- [ ] `is-upper-triangular-matrix`
A square matrix where all elements below the main diagonal are zero. [Learn more](https://en.wikipedia.org/wiki/Triangular_matrix)

- [ ] `is-lower-triangular-matrix`
A square matrix where all elements above the main diagonal are zero. [Learn more](https://en.wikipedia.org/wiki/Triangular_matrix)
- [ ] `is-permutation-matrix`
A binary square matrix with exactly one entry of `1` in each row and column, and `0`s elsewhere. [Learn more](https://en.wikipedia.org/wiki/Permutation_matrix)

### Related Issues

No existing related issues

### Questions

Would maintainers be open to including these matrix-related assertions in `@stdlib/assert`?
Let me know if any specific requirements need to be fulfilled.

### Other

No.

### Checklist

- [x] I have read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [x] Searched for existing issues and pull requests.
- [x] The issue name begins with `RFC:`.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。