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

BatList.modify_at instead of an array and a.(i) <- x ? #1

Closed
Naereen opened this issue Feb 21, 2018 · 2 comments
Closed

BatList.modify_at instead of an array and a.(i) <- x ? #1

Naereen opened this issue Feb 21, 2018 · 2 comments

Comments

@Naereen
Copy link

Naereen commented Feb 21, 2018

Hi,
For example, here,

u = if b.a>=0 then BatList.modify_at b.a (fun ui -> ui +. x) b.u else b.u}

I wonder why you use this BatList module and a modify_at function (which cannot be in O(1) but is in O(n) if the list has n elements), instead of using a simple int array or float array and changing its i-th value with a.(i) <- x.
Thanks, I'm curious 😃.

@freuk
Copy link
Owner

freuk commented Feb 21, 2018

Hey Lilian, because performance wasn't the concern.
If you have any serious use don't use the current opam release, there is a bugfix pending to be pushed. master is fine.

Ton travail est sympa, tu peux contacter @albietz qui travaille sur des choses similaires je pense, au vu de son dernier article et de ta librairie fraichement publiee.

@Naereen
Copy link
Author

Naereen commented Feb 21, 2018

Hi,
OK, it makes sense, thanks for the quick reply. I don't plan on using obandit sorry.

Merci du pointeur, j'avais vu passé son dernier article mais sans relever que c'était quelqu'un d'Inria Grenoble 😮 !
Bonne continuation 👍 !

@Naereen Naereen closed this as completed Feb 21, 2018
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