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

Provide several options for saddle_connections bound #104

Open
slel opened this issue Jul 12, 2021 · 3 comments · May be fixed by #323
Open

Provide several options for saddle_connections bound #104

slel opened this issue Jul 12, 2021 · 3 comments · May be fixed by #323
Assignees

Comments

@slel
Copy link
Contributor

slel commented Jul 12, 2021

The method saddle_connections has a squared_length_bound argument.

While in technical terms working with a bound on the squared length
has advantages, the user expects the bound to be on the length.

Even the saddle connections examples page trips over this at:

with an example phrased as

We get a list of all saddle connections of length less than 10.

but which uses

sc_list = s.saddle_connections(10)

and so only goes up to squared length 10, i.e. up to length sqrt(10).

Ideally this method could use keyword arguments to offer a choice:

  • max_length=0
  • max_length_squared=0
  • max_combinatorial_length=0

If several of them are provided, we could combine the constraints
(or raise an error). Combining the constraints would allow to bound
both the combinatorial and geometric length in dilation surfaces.

The main advantage of using squared length is to avoid taking
square roots, but we can avoid it anyway by checking whether
a^2 + b^2 < c^2 instead of checking whether sqrt(a^2 + b^2) < c.

It would also be nice to allow users to specify whether to use
<= or < when checking against the provided bound.

@slel slel changed the title Provide several option for saddle_connections bound Provide several options for saddle_connections bound Jul 19, 2021
@saraedum saraedum self-assigned this Mar 17, 2023
@saraedum
Copy link
Member

@slel any suggestion for the interface here?

It would also be nice to allow users to specify whether to use <= or < when checking against the provided bound.

@saraedum
Copy link
Member

I can't think of anything much better than max_length_strict and max_length_squared_scrict.

@saraedum saraedum linked a pull request Dec 11, 2024 that will close this issue
3 tasks
@slel
Copy link
Contributor Author

slel commented Dec 11, 2024

Either that, or use length_squared_less_than, length_squared_up_to, length_less_than, length_up_to, so all keywords in that family start with "length", and deprecate max_length.

saraedum added a commit to saraedum/sage-flatsurf that referenced this issue Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants