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

Implement TranslateScale * Affine (both directions) #287

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

richard-uk1
Copy link
Collaborator

As part of testing this, I also added float_cmp to dev dependencies and implemented it for Point/Affine. I propose that we start to standardize on this method for checking approximate equality.

Finally, I've added some MathML to the docs to make it so people can understand the code. In the TranslateScale * Affine (and rev) case, one probably doesn't need more docs, but having them proves the concept.

As part of testing this, I also added `float_cmp` to dev dependencies
and implemented it for Point/Affine. I propose that we start to
standardize on this method for checking approximate equality.

Finally, I've added some MathML to the docs to make it so people can
understand the code. In the TranslateScale * Affine (and rev) case,
one probably doesn't need more docs, but having them proves the concept.
/// ```
///
/// [matrix-norm#entry-wise]: https://en.wikipedia.org/wiki/Matrix_norm#%22Entry-wise%22_matrix_norms
pub fn norm_l_1_1(self) -> f64 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this function for error checking, before deciding that max(element-wise error) was a better way. I've left it in to stimulate conversation about matrix norms, but fully expect to need to remove it before merging.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we did keep it I almost certainly think we should remove the 1, otherwise |a - a| != 0.

@richard-uk1
Copy link
Collaborator Author

(from @DJMcNab on Zulip)

In terms of the first point, I do agree that precomputing the MathML seems like the best approach
I'd like to have a slightly different directory structure, where the inputs and the outputs are not directly adjacent, and the mapping is 1 tex -> 1 Mathml
I'd also support having a two file script setup - package.json importing https://www.npmjs.com/package/temml and an index.js which runs through all the items in the folder and creates the corresponding mathml file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant