-
Notifications
You must be signed in to change notification settings - Fork 166
betti_numbers(::SimplicialComplex) over a given field
#5618
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
base: master
Are you sure you want to change the base?
Conversation
| function betti_numbers(F::Field, K::SimplicialComplex) | ||
| b = Int[] | ||
| q = characteristic(F) | ||
| L = iszero(q) ? QQ : fpField(UInt(q)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line makes the whole function type unstable, and thus inefficient.
Why do you even construct a new field here, and not just use F instead in the matrix constructions below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GF(2) is slower than fpField(UInt(2))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just a change inputs to expects the characteristic instead.
maybe then I make it a keyword arg?
betti_numbers(::SimplicialComplex) over a given field
HechtiDerLachs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be worthwhile to add
betti_numbers(R::Ring, S::SimplicialComplex) = betti_numbers(characteristic(R), S) ?
And betti_number([p::Int], S::SimplicialComplex, i::Int) to return only a single Betti number?
Another question I had: The function returns a list of integers. Is it clear that the first entry always stands for the 0-th Betti number, the second for the first, etc.? If yes, everything is fine. But otherwise, one could think of returning a dictionary?
Sorry for the delayed review, btw. The request slipped me through. Feel free to ping me through other channels if this happens again.
Co-authored-by: Simon Brandhorst <[email protected]>
…dv/betti-numbers-char-p
Extend betti_numbers function to accept optional parameter for the Field