Back to home page

CODE

DIFFUSION GEOMETRY CODE

Matlab code for Diffusion Geometry and Diffusion Wavelets.
This has been a joint effort with James C. Bremer Jr. and Arthur D. Szlam.

Last update: 08/14/08 - New beta version. Download.


Instructions: unzip in a directory, preserving the subdirectory structure. Open Matlab, go in the installation directory and run DGPaths, which will add the appropriate subdirectories to the Matlab path.
The main script for constructing graphs and computing Laplacians and their eigenfunctions is called GraphDiffusion. Type help GraphDiffusion at the Matlab prompt to see the options, and run the example there (diffusion on a circle) to test installation.
The main script of constructing diffusion wavelets is called DWPTree. The help information contain a sample test, for constructing diffusion wavelet packets on the circle.

Note on nearest neighbor searches. The package supports either the nn_search and range_search functions of the TSToolbox and the ANNsearch functions of the Approximate Nearest Neighbor Searching Library by D. Mount and S. Arya. The former toolbox is hard to compile undex Unix - there are reports of successes, but mostly of failures. The latter is easy to compile under Unix. This is my experience in compiling on a Duke Math Unix machine. Untar in a directory and run make. This should produce the file libANN.a in the lib subdirectory. This file is already included in the Diffusion Geometry package, in the MEX directory, compiled on a Unix machine at Duke Math (therefore I do not expect this to be compatible with other Unix systems). Copy this library libANN.a in the MEX directory, under the directory where the Diffusion Geometry package was installed, and from the Matlab prompt run mex ANNsearch libANN.a and mex ANNrsearch libANN.a. This produces two .mexglx files, that are what Matlab will call. These two files are already included in the Diffusion Geometry package, after compilation on a Unix machine at Duke Math (so, again, they are not compatible in general with other Unix systems).

Please let me know if encounter problems with the installation, or report successes under different systems. Thanks.

 

Some demo code I use in a class on Spectral Graph Theory.

This code allows to take a black and white picture with points, and constructing an associated proximity graph, and then computing and displaying eigenvalues/eigenfunctions of the Laplacian on such graph. You need to first download and install the general code for Diffusion Geometry above and then download and install this code for running the demo I ran in class, with some images already prepared.
The script for the demo is called GraphEigenFcnsEx_01.m, and it is fairly extensively commented. I will be happy to add your own examples here!

 

 

Back to home page