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

Using any float-like type for the field #20

Closed
benruijl opened this issue Oct 2, 2019 · 2 comments
Closed

Using any float-like type for the field #20

benruijl opened this issue Oct 2, 2019 · 2 comments

Comments

@benruijl
Copy link

benruijl commented Oct 2, 2019

I'd like to use Totsu over any num_traits::Float type, like f128 floats or perhaps even dual numbers. Is this possible?

@convexbrain
Copy link
Owner

Hi benruijl,

It's possible to make Mat generic using num_traits::Float, but its implementation will take a little time, I think. Not to make it generic but to use just f128, modifying FP, FP_EPSILON and FP_MINPOS in matgen.rs to those of f128 maybe works.

As for dual numbers, you need to re-write an optimization problem by using dual numbers' element-wise real number vectors and matrices. It's because the base algorithm I used is based on $R^n$.

@convexbrain
Copy link
Owner

At version https://github.com/convexbrain/Totsu/releases/tag/rust_conic_v0.6.0, num::Float is employed overall.

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

No branches or pull requests

2 participants