Document ARing headers and implementation guide#61
Conversation
|
I'm not sure that the header AI summaries correctly describe the big picture (i.e., how these elements are used). There's a lot of discussion of how these relate to concrete rings, but this connection doesn't seem to be as strong as promised by the AI. |
|
The headers are not uniform in how they interpret these files (even though they all act in nearly the same way). Perhaps the best headers can be cherry-picked from this collection. |
| M2_arrayint getModPolynomialCoeffs() const; | ||
| M2_arrayint getGeneratorCoeffs() const; | ||
| M2_arrayint fieldElementToM2Array(ElementType a) const; | ||
| ``` |
There was a problem hiding this comment.
Why is this list important? What is the theme between these elements.?
|
Thanks, Michael. I pushed I revised the ARing header summaries to use a more uniform structure: what storage/backend the ARing owns, what lifetime contract it follows, what I also updated This is still documentation-only. Validation: |
| /// fields. Elements are compact integers interpreted through logarithm and | ||
| /// exponent tables for a primitive element, and the class follows the | ||
| /// `SimpleARing` contract for lifetime and arithmetic over that storage. | ||
| /// |
There was a problem hiding this comment.
The point is that there is a contract that does involve lifetime. If this is mentioned elsewhere, there should be a pointer directly to it.
There was a problem hiding this comment.
- Function names changed due to recent push by Doug
- Add commments in the code chunks
- Add examples under the quick checklist
| results, construction from ZZ/QQ, predicates, comparison, hashing, core | ||
| arithmetic, printing, random elements, and evaluation. | ||
|
|
||
| Wire the ring into build files and factory code. |
There was a problem hiding this comment.
Specify what "factory code" refers too -- be more precise rather than sweeping generalizations
| `ConcreteRing` is the adapter for the usual ARing path. It receives a | ||
| `ring_elem` from the rest of the engine, asks the ARing to unpack it into the | ||
| ARing's `ElementType`, calls the ARing operation, and asks the ARing to pack the | ||
| result back into a `ring_elem`. Some hooks are used by factory, translation, |
There was a problem hiding this comment.
Be more precise on this "factory"
Summary
basic-rings.basic-rings/arings.mdwith guidance for implementing new ARing types.Validation
git diff --check origin/arings..HEADNotes