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

Display or return rqa results in the order shown in the docs #125

Closed
rs7q5 opened this issue Dec 5, 2021 · 3 comments
Closed

Display or return rqa results in the order shown in the docs #125

rs7q5 opened this issue Dec 5, 2021 · 3 comments

Comments

@rs7q5
Copy link
Contributor

rs7q5 commented Dec 5, 2021

I would like the rqa results to be shown or returned in the order that they are inserted because as it sits it currently makes sense (RR, then diagonal measures then vertical measures if desired) and it would also be consistent with how it is presented in the docs.

I understand why the exported version of it is a Dict, but to achieve the desired result the quickest way I can think of is to allow the rqa type specified to be an AbstractDict to allow for an OrderedDict to be specified and without adding a dependency for different types of collections.

In other words the proposed change is to change the rqa function to

function rqa(::Type{DT},R;kwargs...) where {DT<:AbstractDict} end

I would also be content with just editing Base.show, but I wasn't sure which would be preferred.

@Datseris
Copy link
Member

Datseris commented Dec 5, 2021

What happens if you just do OrderedDict(rqa(...))?

@Datseris
Copy link
Member

Datseris commented Dec 5, 2021

but sure, you can just do a pr that uses AbstractDict.

@rs7q5
Copy link
Contributor Author

rs7q5 commented Dec 5, 2021

If you just do OrderedDict you will get the default order that the dictionary displays it as because OrderedDict is the insertion order.

I'll submit a PR request though. thanks!

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