octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OF miscellaneous] changes to hilbert curve and new functions


From: JuanPi
Subject: [OF miscellaneous] changes to hilbert curve and new functions
Date: Sun, 6 Aug 2017 03:37:45 +0200

Hi all,

* New functions:
- I added a new function to miscellaneous: idxmatrix.m[1]. It
generates a matrix with elements indicating their own position
(subindexes) in the matrix, i.e. M(i,j) = i * 10 + j
I use it quite a lot in preparing educational material, specially when
explaining functions like reshape, transpose, permute, etc.
Let me know if you have comments or suggestions for improvements.

- I added a function to convert a Hilbert curve to linear matrix
indexes: hc2ind.m [2]

- I added the usual Makefile to help with the maintenance.

* Changes to Hilbert curve:
I have improved the performance of the recursive function generating
pseudo Hilbert curves: hilbert_curve.m [3].
I encapsulated the recursion to avoid input checking at each level and
removed calls to helper functions. In my machine I got about 3x
speed-up
See mail "[OF miscellaneous] Hilbert curve: recursion faster than
loop?" for discussion.

I think it is time to make a new release of the package. 1.3.0?

[1]: 
https://sourceforge.net/p/octave/miscellaneous/ci/default/tree/inst/idxmatrix.m
[2]: 
https://sourceforge.net/p/octave/miscellaneous/ci/default/tree/inst/hc2ind.m
[3]: 
https://sourceforge.net/p/octave/miscellaneous/ci/default/tree/inst/hilbert_curve.m
-- 
JuanPi Carbajal
https://goo.gl/ayiJzi
Public GnuPG key: 9C5B72BF
-----
"Why is thought, being a secretion of the brain, more wonderful than
gravity, a property of matter?"
- C. Darwin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]