Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor boundary matrix code #14

Open
aepereira opened this issue Mar 18, 2021 · 0 comments
Open

Refactor boundary matrix code #14

aepereira opened this issue Mar 18, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@aepereira
Copy link
Collaborator

A boundary operator is a linear map from the space generated by all the k-dimensional simplices of an ASC to the space generated by a subset of the (k-1)-dimensional simplices of the ASC. The matrix of this map has columns that correspond to each unique k-simplex in the ASC. The rows of the matrix correspond to each unique (k-1)-simplex in the ASC. We have a way to compute and return the boundary matrix now in ASC.compute_boundary, but the following improvements could be made to that initial implementation:

  • Right now, the function returns the matrix for the boundary map of dimension k if the matrix bool parameter is given a True argument. Rather than returning, the matrix should be saved in an ASC member variable.
  • The bookkeeping dictionary and index logic used in the function can be refactored into a class-level member and shorter methods to keep the compute_boundary function simple.
  • Just like simplices are stored by dimension, we should store boundary matrices by dimension.
  • Consider casting sets of simplices as lists and sorting them if deterministic row and column order is desired for the matrices. This is not necessary if the matrices are just used to calculate rank, so consider making it an option.
  • Can potentially delegate work of deciding how individual columns should be generated to individual Simplex objects, but the number and order of rows of the matrix depends on the entire ASC, which is an argument for keeping all the related code at the ASC level.
  • Add more comments.
@aepereira aepereira added the enhancement New feature or request label Mar 18, 2021
@aepereira aepereira self-assigned this Mar 18, 2021
@aepereira aepereira assigned senchromatic and unassigned aepereira Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants