JuliaDynamics / RecurrenceAnalysis.jl

Recurrence Quantification Analysis in Julia
https://juliadynamics.github.io/RecurrenceAnalysis.jl/stable/
MIT License
45 stars 12 forks source link

Specific code for `recurrencematrix` #22

Closed heliosdrm closed 4 years ago

heliosdrm commented 5 years ago

recurrencematrix calls crossrecurrencematrix with the same x and y arguments, thus duplicating the number of comparisons and the size of the nonzero indices of the resulting matrix.

If we have different RecurrenceMatrix and CrossRecurrenceMatrix types, the size and number of calculations for the former may be reduced. Type-specific methods for RQA and for the creation of the plottable matrix can take into account the symmetry of recurrence matrices. (And also for joint recurrence matrices.)

Datseris commented 5 years ago

Yeah, I guess it is better to do this via multiple dispatch than by comparing strings :D I'll edit #25 to have independent types

edit: (already done)

heliosdrm commented 5 years ago

So, are you working on this at the same time as in the new types? This is not breaking, but only to improve performance, so perhaps you may finish #25 first without dealing with symmetry, and then we put our hands into this.

This needs:

For the second task, there may be one method that dispatches on Union{RecurrenceMatrix, JointRecurrenceMatrix} (symmetric), and another for CrossRecurrenceMatrix. The current code uses one method for all, branching according to the result of issymmetric.

I can take over this when #25 is finished.

Datseris commented 5 years ago

This is not breaking, but only to improve performance, so perhaps you may finish #25 first without dealing with symmetry, and then we put our hands into this.

Yeap, this is the plan for now.

I can take over this when #25 is finished.

Awesome, thanks so much!