├── README.md ├── bspline ├── Contents.m ├── README ├── bspline_approx.m ├── bspline_basis.m ├── bspline_basismatrix.m ├── bspline_deboor.m ├── bspline_deriv.m ├── bspline_estimate.m ├── bspline_footpoint.m ├── bspline_gui.m ├── bspline_wapprox.m ├── bspline_wdeboor.m ├── example_bindevent.m ├── example_bsplineapprox.m ├── example_bsplinebasis.m ├── example_bsplinedeboor.m ├── example_bsplinederiv.m ├── example_bsplineestim.m ├── example_bsplinefoot.m ├── funminbnd.m ├── gui_bind_event.m ├── gui_dock_vertical.m ├── guipoints.m ├── license.txt └── uispanedit.m ├── bspline_basis.m ├── chebyshev_basis.m ├── data2.mat ├── demo1.m ├── demo10.m ├── demo11.m ├── demo2.m ├── demo3.m ├── demo4.m ├── demo5.m ├── demo6.m ├── demo7.m ├── demo8.m ├── demo9.m ├── gspbox ├── 3rdparty │ ├── .gitignore │ ├── CSCbox │ │ ├── LICENSE │ │ ├── README.txt │ │ ├── codes │ │ │ ├── CSC.m │ │ │ ├── SC.m │ │ │ ├── compute_modularity.m │ │ │ ├── create_SBM.m │ │ │ ├── estimate_lambda_k.m │ │ │ ├── interpolate_on_complete_graph.m │ │ │ └── jackson_cheby_poly_coefficients.m │ │ ├── main_CSC.m │ │ └── third_party │ │ │ ├── PartAgreeCoef_ARonly.m │ │ │ ├── README.txt │ │ │ ├── ind2sub4up.m │ │ │ ├── my_binornd.m │ │ │ └── rand_index.m │ ├── Community_BGLL_Matlab │ │ ├── cluster_jl.m │ │ ├── cluster_jl_cpp.m │ │ ├── cluster_jl_orient.m │ │ ├── cluster_jl_orientT.m │ │ ├── cluster_jl_orientT_cpp.m │ │ ├── cluster_jl_orient_cpp.m │ │ ├── jl_clust.cpp │ │ ├── jl_clust.mexglx │ │ ├── jl_clust_orient.cpp │ │ ├── jl_clust_orient.mexglx │ │ ├── jl_mnew.cpp │ │ ├── jl_mnew.mexglx │ │ └── readme.txt │ ├── LDL │ │ ├── AMD │ │ │ ├── Demo │ │ │ │ ├── Makefile │ │ │ │ ├── amd_demo.c │ │ │ │ ├── amd_demo.out │ │ │ │ ├── amd_demo2.c │ │ │ │ ├── amd_demo2.out │ │ │ │ ├── amd_f77cross.f │ │ │ │ ├── amd_f77cross.out │ │ │ │ ├── amd_f77demo.f │ │ │ │ ├── amd_f77demo.out │ │ │ │ ├── amd_f77simple.f │ │ │ │ ├── amd_f77simple.out │ │ │ │ ├── amd_f77wrapper.c │ │ │ │ ├── amd_l_demo.c │ │ │ │ ├── amd_l_demo.out │ │ │ │ ├── amd_simple.c │ │ │ │ └── amd_simple.out │ │ │ ├── Doc │ │ │ │ ├── AMD_UserGuide.bib │ │ │ │ ├── AMD_UserGuide.pdf │ │ │ │ ├── AMD_UserGuide.tex │ │ │ │ ├── ChangeLog │ │ │ │ ├── License │ │ │ │ ├── Makefile │ │ │ │ └── lesser.txt │ │ │ ├── Include │ │ │ │ ├── amd.h │ │ │ │ └── amd_internal.h │ │ │ ├── Lib │ │ │ │ ├── GNUmakefile │ │ │ │ ├── Makefile │ │ │ │ └── libamd.def │ │ │ ├── MATLAB │ │ │ │ ├── Contents1.m │ │ │ │ ├── amd2.m │ │ │ │ ├── amd2.mexw64 │ │ │ │ ├── amd_demo.m │ │ │ │ ├── amd_demo.m.out │ │ │ │ ├── amd_install.m │ │ │ │ ├── amd_make.m │ │ │ │ ├── amd_mex.c │ │ │ │ └── can_24 │ │ │ ├── Makefile │ │ │ ├── README.txt │ │ │ └── Source │ │ │ │ ├── amd.f │ │ │ │ ├── amd_1.c │ │ │ │ ├── amd_2.c │ │ │ │ ├── amd_aat.c │ │ │ │ ├── amd_control.c │ │ │ │ ├── amd_defaults.c │ │ │ │ ├── amd_dump.c │ │ │ │ ├── amd_global.c │ │ │ │ ├── amd_info.c │ │ │ │ ├── amd_order.c │ │ │ │ ├── amd_post_tree.c │ │ │ │ ├── amd_postorder.c │ │ │ │ ├── amd_preprocess.c │ │ │ │ ├── amd_valid.c │ │ │ │ └── amdbar.f │ │ ├── LDL │ │ │ ├── Demo │ │ │ │ ├── Makefile │ │ │ │ ├── ldlamd.out │ │ │ │ ├── ldllamd.out │ │ │ │ ├── ldllmain.out │ │ │ │ ├── ldllsimple.c │ │ │ │ ├── ldllsimple.out │ │ │ │ ├── ldlmain.c │ │ │ │ ├── ldlmain.out │ │ │ │ ├── ldlsimple.c │ │ │ │ └── ldlsimple.out │ │ │ ├── Doc │ │ │ │ ├── ChangeLog │ │ │ │ ├── Makefile │ │ │ │ ├── ldl.bib │ │ │ │ ├── ldl_userguide.pdf │ │ │ │ ├── ldl_userguide.tex │ │ │ │ └── lesser.txt │ │ │ ├── Include │ │ │ │ └── ldl.h │ │ │ ├── Lib │ │ │ │ └── Makefile │ │ │ ├── MATLAB │ │ │ │ ├── Contents1.m │ │ │ │ ├── ldl_install.m │ │ │ │ ├── ldl_make.m │ │ │ │ ├── ldldemo.m │ │ │ │ ├── ldldemo.out │ │ │ │ ├── ldlmain2.m │ │ │ │ ├── ldlmain2.out │ │ │ │ ├── ldlmex.c │ │ │ │ ├── ldlmex_short.c │ │ │ │ ├── ldlnumeric.mexw64 │ │ │ │ ├── ldlnumericmex.c │ │ │ │ ├── ldlnumericmex_old.c │ │ │ │ ├── ldlrow.m │ │ │ │ ├── ldlsparse.m │ │ │ │ ├── ldlsparse.mexw64 │ │ │ │ ├── ldlsparse_short.mexw64 │ │ │ │ ├── ldlsymbol.m │ │ │ │ ├── ldlsymbol.mexw64 │ │ │ │ ├── ldlsymbol_extra.c │ │ │ │ ├── ldlsymbol_extra.mexw64 │ │ │ │ ├── ldlsymbol_extra_old.c │ │ │ │ ├── ldlsymbolmex.c │ │ │ │ ├── ldltest.m │ │ │ │ └── ldltest.out │ │ │ ├── Makefile │ │ │ ├── Matrix │ │ │ │ ├── A01 │ │ │ │ ├── A02 │ │ │ │ ├── A03 │ │ │ │ ├── A04 │ │ │ │ ├── A05 │ │ │ │ ├── A06 │ │ │ │ ├── A07 │ │ │ │ ├── A08 │ │ │ │ ├── A09 │ │ │ │ ├── A10 │ │ │ │ ├── A11 │ │ │ │ ├── A12 │ │ │ │ ├── A13 │ │ │ │ ├── A14 │ │ │ │ ├── A15 │ │ │ │ ├── A16 │ │ │ │ ├── A17 │ │ │ │ ├── A18 │ │ │ │ ├── A19 │ │ │ │ ├── A20 │ │ │ │ ├── A21 │ │ │ │ ├── A22 │ │ │ │ ├── A23 │ │ │ │ ├── A24 │ │ │ │ ├── A25 │ │ │ │ ├── A26 │ │ │ │ ├── A27 │ │ │ │ ├── A28 │ │ │ │ ├── A29 │ │ │ │ └── A30 │ │ │ ├── README.txt │ │ │ └── Source │ │ │ │ └── ldl.c │ │ └── SuiteSparse_config │ │ │ ├── Makefile │ │ │ ├── README.txt │ │ │ ├── SuiteSparse_config.c │ │ │ ├── SuiteSparse_config.h │ │ │ ├── SuiteSparse_config.mk │ │ │ ├── SuiteSparse_config_GPU.mk │ │ │ ├── SuiteSparse_config_Mac.mk │ │ │ └── xerbla │ │ │ ├── Makefile │ │ │ ├── xerbla.c │ │ │ ├── xerbla.f │ │ │ └── xerbla.h │ ├── eq_sphere_partitions │ │ ├── AUTHORS │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── Contents.m │ │ ├── INSTALL.txt │ │ ├── README.txt │ │ ├── eq_illustrations │ │ │ ├── Contents.m │ │ │ ├── illustration_options.m │ │ │ ├── private │ │ │ │ ├── show_s2_sphere.m │ │ │ │ ├── surf_jet.m │ │ │ │ ├── x2eqarea.m │ │ │ │ └── x2stereo.m │ │ │ ├── project_point_set.m │ │ │ ├── project_s2_partition.m │ │ │ ├── project_s3_partition.m │ │ │ ├── show_r3_point_set.m │ │ │ └── show_s2_partition.m │ │ ├── eq_partitions │ │ │ ├── Contents.m │ │ │ ├── eq_caps.m │ │ │ ├── eq_point_set.m │ │ │ ├── eq_point_set_polar.m │ │ │ ├── eq_regions.m │ │ │ ├── illustrate_eq_algorithm.m │ │ │ ├── partition_options.m │ │ │ └── private │ │ │ │ ├── bot_cap_region.m │ │ │ │ ├── cap_colats.m │ │ │ │ ├── centres_of_regions.m │ │ │ │ ├── circle_offset.m │ │ │ │ ├── ideal_region_list.m │ │ │ │ ├── num_collars.m │ │ │ │ ├── polar_colat.m │ │ │ │ ├── rot3.m │ │ │ │ ├── round_to_naturals.m │ │ │ │ ├── s2_offset.m │ │ │ │ ├── sphere_region.m │ │ │ │ └── top_cap_region.m │ │ ├── eq_point_set_props │ │ │ ├── Contents.m │ │ │ ├── calc_dist_coeff.m │ │ │ ├── calc_energy_coeff.m │ │ │ ├── calc_packing_density.m │ │ │ ├── eq_dist_coeff.m │ │ │ ├── eq_energy_coeff.m │ │ │ ├── eq_energy_dist.m │ │ │ ├── eq_min_dist.m │ │ │ ├── eq_packing_density.m │ │ │ ├── eq_point_set_property.m │ │ │ ├── point_set_dist_coeff.m │ │ │ ├── point_set_energy_coeff.m │ │ │ ├── point_set_energy_dist.m │ │ │ ├── point_set_min_dist.m │ │ │ └── point_set_packing_density.m │ │ ├── eq_region_props │ │ │ ├── Contents.m │ │ │ ├── eq_diam_bound.m │ │ │ ├── eq_diam_coeff.m │ │ │ ├── eq_regions_property.m │ │ │ ├── eq_vertex_diam.m │ │ │ ├── eq_vertex_diam_coeff.m │ │ │ └── private │ │ │ │ ├── expand_region_for_diam.m │ │ │ │ ├── max_diam_bound_of_regions.m │ │ │ │ ├── max_vertex_diam_of_regions.m │ │ │ │ └── pseudo_region_for_diam.m │ │ ├── eq_test │ │ │ ├── Contents.m │ │ │ └── eq_area_error.m │ │ ├── eq_utilities │ │ │ ├── Contents.m │ │ │ ├── area_of_cap.m │ │ │ ├── area_of_collar.m │ │ │ ├── area_of_ideal_region.m │ │ │ ├── area_of_sphere.m │ │ │ ├── cart2polar2.m │ │ │ ├── euc2sph_dist.m │ │ │ ├── euclidean_dist.m │ │ │ ├── fatcurve.m │ │ │ ├── haslight.m │ │ │ ├── ideal_collar_angle.m │ │ │ ├── polar2cart.m │ │ │ ├── sph2euc_dist.m │ │ │ ├── spherical_dist.m │ │ │ ├── sradius_of_cap.m │ │ │ └── volume_of_ball.m │ │ ├── info.ins │ │ ├── install_eq_toolbox.m │ │ ├── private │ │ │ ├── install.m │ │ │ ├── savepathonly.m │ │ │ └── uninstall.m │ │ └── uninstall_eq_toolbox.m │ ├── flann │ │ ├── flann_build_index.m │ │ ├── flann_free_index.m │ │ ├── flann_load_index.m │ │ ├── flann_save_index.m │ │ ├── flann_search.m │ │ ├── flann_set_distance_type.m │ │ ├── test_flann.m │ │ └── testset.dat │ ├── gendist.m │ ├── print2eps.m │ └── sources │ │ └── flann-1.8.4-src │ │ ├── CMakeLists.txt │ │ ├── COPYING │ │ ├── ChangeLog │ │ ├── README.md │ │ ├── bin │ │ ├── download_checkmd5.py │ │ ├── indent.sh │ │ ├── make_release.sh │ │ ├── run_test.py │ │ └── uncrustify.cfg │ │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── images │ │ │ └── cmake-gui.png │ │ ├── manual.tex │ │ └── references.bib │ │ ├── examples │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── flann_example.c │ │ ├── flann_example.cpp │ │ └── flann_example_mpi.cpp │ │ ├── src │ │ ├── CMakeLists.txt │ │ ├── cpp │ │ │ ├── CMakeLists.txt │ │ │ └── flann │ │ │ │ ├── algorithms │ │ │ │ ├── all_indices.h │ │ │ │ ├── autotuned_index.h │ │ │ │ ├── center_chooser.h │ │ │ │ ├── composite_index.h │ │ │ │ ├── dist.h │ │ │ │ ├── hierarchical_clustering_index.h │ │ │ │ ├── kdtree_cuda_3d_index.cu │ │ │ │ ├── kdtree_cuda_3d_index.h │ │ │ │ ├── kdtree_cuda_builder.h │ │ │ │ ├── kdtree_index.h │ │ │ │ ├── kdtree_single_index.h │ │ │ │ ├── kmeans_index.h │ │ │ │ ├── linear_index.h │ │ │ │ ├── lsh_index.h │ │ │ │ └── nn_index.h │ │ │ │ ├── config.h │ │ │ │ ├── config.h.in │ │ │ │ ├── defines.h │ │ │ │ ├── flann.cpp │ │ │ │ ├── flann.h │ │ │ │ ├── flann.hpp │ │ │ │ ├── flann_cpp.cpp │ │ │ │ ├── general.h │ │ │ │ ├── io │ │ │ │ └── hdf5.h │ │ │ │ ├── mpi │ │ │ │ ├── client.h │ │ │ │ ├── flann_mpi_client.cpp │ │ │ │ ├── flann_mpi_server.cpp │ │ │ │ ├── index.h │ │ │ │ ├── matrix.h │ │ │ │ ├── queries.h │ │ │ │ └── server.h │ │ │ │ ├── nn │ │ │ │ ├── ground_truth.h │ │ │ │ ├── index_testing.h │ │ │ │ └── simplex_downhill.h │ │ │ │ └── util │ │ │ │ ├── allocator.h │ │ │ │ ├── any.h │ │ │ │ ├── cuda │ │ │ │ ├── heap.h │ │ │ │ └── result_set.h │ │ │ │ ├── cutil_math.h │ │ │ │ ├── dynamic_bitset.h │ │ │ │ ├── heap.h │ │ │ │ ├── logger.h │ │ │ │ ├── lsh_table.h │ │ │ │ ├── matrix.h │ │ │ │ ├── object_factory.h │ │ │ │ ├── params.h │ │ │ │ ├── random.h │ │ │ │ ├── result_set.h │ │ │ │ ├── sampling.h │ │ │ │ ├── saving.h │ │ │ │ ├── serialization.h │ │ │ │ └── timer.h │ │ ├── matlab │ │ │ ├── CMakeLists.txt │ │ │ ├── flann_build_index.m │ │ │ ├── flann_free_index.m │ │ │ ├── flann_load_index.m │ │ │ ├── flann_save_index.m │ │ │ ├── flann_search.m │ │ │ ├── flann_set_distance_type.m │ │ │ ├── nearest_neighbors.cpp │ │ │ └── test_flann.m │ │ └── python │ │ │ ├── CMakeLists.txt │ │ │ ├── pyflann │ │ │ ├── __init__.py │ │ │ ├── exceptions.py │ │ │ ├── flann_ctypes.py │ │ │ └── index.py │ │ │ └── setup.py.tpl │ │ └── test │ │ ├── CMakeLists.txt │ │ ├── flann_autotuned_test.cpp │ │ ├── flann_cuda_test.cu │ │ ├── flann_hierarchical_test.cpp │ │ ├── flann_kdtree_single_test.cpp │ │ ├── flann_kdtree_test.cpp │ │ ├── flann_kmeans_test.cpp │ │ ├── flann_linear_test.cpp │ │ ├── flann_lsh_test.cpp │ │ ├── flann_multithreaded_test.cpp │ │ ├── flann_tests.h │ │ ├── memusage_clustering.py │ │ ├── memusage_nn.py │ │ ├── test_clustering.py │ │ ├── test_index_save.py │ │ ├── test_nn.py │ │ ├── test_nn_autotune.py │ │ └── test_nn_index.py ├── Contents.m ├── LICENSE ├── README.md ├── demos │ ├── Contents.m │ ├── gsp_demo.m │ ├── gsp_demo_graph_embedding.m │ ├── gsp_demo_graph_tv.m │ ├── gsp_demo_learn_graph.m │ ├── gsp_demo_learn_graph_large.m │ ├── gsp_demo_poster.m │ ├── gsp_demo_pyramid.m │ ├── gsp_demo_stationarity.m │ ├── gsp_demo_tv_inpainting.m │ ├── gsp_demo_wavelet.m │ └── gsp_demo_wavelet_dn.m ├── embedding │ ├── Contents.m │ ├── gsp_compute_coordinates.m │ ├── gsp_eigenspace_estimation.m │ ├── gsp_isomap.m │ ├── gsp_laplacian_eigenmaps.m │ ├── gsp_lle.m │ └── gsp_weight2distance.m ├── filters │ ├── Contents.m │ ├── gsp_approx_filter.m │ ├── gsp_design_abspline.m │ ├── gsp_design_can_dual.m │ ├── gsp_design_expwin.m │ ├── gsp_design_half_cosine.m │ ├── gsp_design_heat.m │ ├── gsp_design_held.m │ ├── gsp_design_itersine.m │ ├── gsp_design_mexican_hat.m │ ├── gsp_design_meyer.m │ ├── gsp_design_papadakis.m │ ├── gsp_design_regular.m │ ├── gsp_design_simoncelli.m │ ├── gsp_design_simple_tf.m │ ├── gsp_design_smooth_indicator.m │ ├── gsp_design_warped_translates.m │ ├── gsp_evaluate_can_dual.m │ ├── gsp_filter.m │ ├── gsp_filter_analysis.m │ ├── gsp_filter_evaluate.m │ ├── gsp_filter_inverse.m │ ├── gsp_filter_synthesis.m │ ├── gsp_filterbank_bounds.m │ ├── gsp_filterbank_matrix.m │ ├── gsp_gabor_filterbank.m │ ├── gsp_jtv_compute_frame.m │ ├── gsp_jtv_design_can_dual.m │ ├── gsp_jtv_design_damped_wave.m │ ├── gsp_jtv_design_dgw.m │ ├── gsp_jtv_design_diffusion.m │ ├── gsp_jtv_design_kleingordon.m │ ├── gsp_jtv_design_meyer.m │ ├── gsp_jtv_design_wave.m │ ├── gsp_jtv_evaluate_can_dual.m │ ├── gsp_jtv_filter_analysis.m │ ├── gsp_jtv_filter_array.m │ ├── gsp_jtv_filter_evaluate.m │ ├── gsp_jtv_filter_inverse.m │ ├── gsp_jtv_filter_synthesis.m │ ├── gsp_jtv_mat2vec.m │ ├── gsp_jtv_vec2mat.m │ ├── gsp_mat2vec.m │ ├── gsp_multiply_filters.m │ ├── gsp_test_duality.m │ ├── gsp_test_duality_coefficient.m │ ├── gsp_tighten_filter.m │ ├── gsp_vec2mat.m │ ├── gsp_warp_filter.m │ ├── gsp_wlog_scales.m │ └── utils │ │ ├── gsp_erdos_renyi_density.m │ │ ├── gsp_erdos_renyi_density_normalized.m │ │ ├── gsp_erdos_renyi_warp.m │ │ ├── gsp_free_conv_norm_semi.m │ │ ├── gsp_mono_cubic_warp_fn.m │ │ ├── gsp_pwl_warp_fn.m │ │ ├── gsp_random_regular_density.m │ │ └── histnorm.m ├── graph_ml │ ├── .gitignore │ ├── gsp_classification_knn.m │ ├── gsp_classification_matrix.m │ ├── gsp_classification_tik.m │ ├── gsp_classification_tv.m │ ├── gsp_classification_tv_new.m │ ├── gsp_frkhs.m │ ├── gsp_frpcaog_1g.m │ ├── gsp_frpcaog_2g.m │ ├── gsp_gpcatv_2g.m │ ├── gsp_knn_classify_graph.m │ ├── gsp_matrix2label.m │ ├── gsp_ml_rls.m │ ├── gsp_ml_rls_tik.m │ ├── gsp_ml_rls_tv.m │ ├── gsp_regression_Lx_l1.m │ ├── gsp_regression_knn.m │ ├── gsp_regression_tik.m │ ├── gsp_regression_tv.m │ └── gsp_rkhs_evaluate.m ├── graphs │ ├── Contents.m │ ├── gsp_2dgrid.m │ ├── gsp_airfoil.m │ ├── gsp_barabasi_albert.m │ ├── gsp_bunny.m │ ├── gsp_comet.m │ ├── gsp_community.m │ ├── gsp_components.m │ ├── gsp_copy_graph_attributes.m │ ├── gsp_cube.m │ ├── gsp_david_sensor_network.m │ ├── gsp_erdos_renyi.m │ ├── gsp_full_connected.m │ ├── gsp_graph.m │ ├── gsp_graph_default_parameters.m │ ├── gsp_graph_default_plotting_parameters.m │ ├── gsp_graph_product.m │ ├── gsp_hypergraph.m │ ├── gsp_jtv_graph.m │ ├── gsp_line_graph.m │ ├── gsp_logo.m │ ├── gsp_low_stretch_tree.m │ ├── gsp_minnesota.m │ ├── gsp_modified_path.m │ ├── gsp_nn_graph.m │ ├── gsp_nn_hypergraph.m │ ├── gsp_non_uniform.m │ ├── gsp_non_uniform_patch.m │ ├── gsp_path.m │ ├── gsp_random_regular.m │ ├── gsp_random_ring.m │ ├── gsp_ring.m │ ├── gsp_rmse_mv_graph.m │ ├── gsp_sensor.m │ ├── gsp_separate_graph.m │ ├── gsp_sphere.m │ ├── gsp_spiral.m │ ├── gsp_stochastic_block_graph.m │ ├── gsp_subgraph.m │ ├── gsp_swiss_roll.m │ ├── gsp_torus.m │ ├── gsp_tree.m │ ├── gsp_two_moons.m │ ├── gsp_update_coordinates.m │ ├── gsp_update_weights.m │ └── misc │ │ ├── createRandRegGraph.m │ │ ├── david500.mat │ │ ├── david64.mat │ │ ├── logogsp.mat │ │ ├── minnesota.mat │ │ └── rescale_center.m ├── gsp_install.m ├── gsp_install_unlocbox.m ├── gsp_make.m ├── gsp_start.m ├── gspbox_version ├── imageprocessing │ ├── Contents.m │ └── gsp_patch_graph.m ├── learn_graph │ ├── Contents.m │ ├── gsp_demo_learn_graph_parameters.m │ ├── gsp_learn_graph_l2_degrees.m │ ├── gsp_learn_graph_l2_degrees_mine.m │ ├── gsp_learn_graph_log_degrees.m │ └── gsp_learn_tcer.m ├── operators │ ├── Contents.m │ ├── gsp_div.m │ ├── gsp_gft.m │ ├── gsp_grad.m │ ├── gsp_grad_mat.m │ ├── gsp_graph_multiresolution.m │ ├── gsp_gwft.m │ ├── gsp_gwft_frame_matrix.m │ ├── gsp_igft.m │ ├── gsp_ijft.m │ ├── gsp_interpolate.m │ ├── gsp_itft.m │ ├── gsp_jft.m │ ├── gsp_jtwgft.m │ ├── gsp_kron_reduce.m │ ├── gsp_kron_reduction.m │ ├── gsp_localize.m │ ├── gsp_modulate.m │ ├── gsp_ngwft.m │ ├── gsp_ngwft_frame_matrix.m │ ├── gsp_pyramid_analysis.m │ ├── gsp_pyramid_analysis_single.m │ ├── gsp_pyramid_cell2coeff.m │ ├── gsp_pyramid_synthesis.m │ ├── gsp_pyramid_synthesis_single.m │ └── gsp_tft.m ├── plotting │ ├── Contents.m │ ├── gsp_plot_edges.m │ ├── gsp_plot_filter.m │ ├── gsp_plot_graph.m │ ├── gsp_plot_jft.m │ ├── gsp_plot_jtv_filter.m │ ├── gsp_plot_jtv_signal.m │ ├── gsp_plot_sgram.m │ ├── gsp_plot_signal.m │ └── gsp_plot_signal_spectral.m ├── pointsclouds │ ├── Contents.m │ ├── airfoil.mat │ ├── bunny.mat │ ├── gsp_pointcloud.m │ ├── gsp_twospirals.m │ ├── to_be_included │ │ ├── clusterincluster.m │ │ ├── corners.m │ │ ├── crescentfullmoon.m │ │ ├── datasets.png │ │ ├── datasetsdemo.m │ │ ├── halfkernel.m │ │ ├── outlier.m │ │ └── twospirals.m │ └── two_moons.mat ├── prox │ ├── Contents.m │ ├── gsp_proj_b2_filterbank.m │ ├── gsp_proj_filterbank.m │ ├── gsp_prox_l1_filterbank.m │ ├── gsp_prox_l2_filterbank.m │ ├── gsp_prox_tik.m │ ├── gsp_prox_tv.m │ ├── gsp_solve_l0.m │ ├── gsp_solve_l1.m │ └── gsp_wavelet_dn.m ├── sgwt_require │ ├── create_synthetic_dataset.m │ ├── sgwt_cheby_square.m │ ├── sgwt_kernel_abspline3.m │ ├── sgwt_kernel_abspline5.m │ └── sgwt_kernel_simple_tf.m ├── stationarity │ ├── Contents.m │ ├── gsp_design_translates.m │ ├── gsp_estimate_psd.m │ ├── gsp_experimental_psd.m │ ├── gsp_jtv_estimate_psd.m │ ├── gsp_jtv_wiener_inpainting.m │ ├── gsp_jtwgft.m │ ├── gsp_remove_mean.m │ ├── gsp_stationarity_cov.m │ ├── gsp_stationarity_ratio.m │ ├── gsp_wiener_inpainting.m │ ├── gsp_wiener_inpainting_exact.m │ ├── gsp_wiener_l2.m │ └── gsp_wiener_optimization.m └── utils │ ├── Contents.m │ ├── gsp_adj2vec.m │ ├── gsp_assign_rand_direction.m │ ├── gsp_cartesian.m │ ├── gsp_cfa.m │ ├── gsp_cheby_coeff.m │ ├── gsp_cheby_eval.m │ ├── gsp_cheby_op.m │ ├── gsp_check_connectivity.m │ ├── gsp_check_connectivity_undirected.m │ ├── gsp_check_filtertype.m │ ├── gsp_check_fourier.m │ ├── gsp_check_jtv.m │ ├── gsp_check_weights.m │ ├── gsp_classic2graph_eig_order.m │ ├── gsp_compute_fourier_basis.m │ ├── gsp_compute_graph_learning_theta.m │ ├── gsp_compute_theta_bounds.m │ ├── gsp_create_laplacian.m │ ├── gsp_ddf2dcdf.m │ ├── gsp_decompose_asymmatrix.m │ ├── gsp_delta.m │ ├── gsp_diameter.m │ ├── gsp_distanz.m │ ├── gsp_estimate_lmax.m │ ├── gsp_fast_estimate_lk.m │ ├── gsp_good_graph_index.m │ ├── gsp_graph_sparsify.m │ ├── gsp_hop_distanz.m │ ├── gsp_incidence.m │ ├── gsp_isdirected.m │ ├── gsp_jtv_cheby_coeff.m │ ├── gsp_jtv_cheby_op.m │ ├── gsp_jtv_delta.m │ ├── gsp_jtv_fa.m │ ├── gsp_jtv_ta.m │ ├── gsp_lanczos_op.m │ ├── gsp_laplacian.m │ ├── gsp_nn_distanz.m │ ├── gsp_norm_l1_filterbank.m │ ├── gsp_norm_l2_filterbank.m │ ├── gsp_norm_tig.m │ ├── gsp_norm_tik.m │ ├── gsp_norm_tv.m │ ├── gsp_plotfig.m │ ├── gsp_point2dcdf.m │ ├── gsp_repmatline.m │ ├── gsp_reset_seed.m │ ├── gsp_resistance_distance.m │ ├── gsp_resistance_distances.m │ ├── gsp_rmse_mv.m │ ├── gsp_smooth_downstep.m │ ├── gsp_smooth_step.m │ ├── gsp_sort_nodes.m │ ├── gsp_spectrum_cdf_approx.m │ ├── gsp_strong.m │ ├── gsp_symmetrize.m │ ├── gsp_tree_depths.m │ ├── gsp_vec2adj.m │ └── utils │ └── boolean.m └── mydata.mat /README.md: -------------------------------------------------------------------------------- 1 | # Graph Signal Processing 2 | 3 | In this repository, Some fascinating features of Graph Signal Processing were represented. Demos incudes applying a low-pass filter on both 1D and 2D euclidian domain signal by classical signal processing and also Graph signal processing to compare both results are the same. Within that way, we will validate the working mechanism of Graph Signal Processing. In addition to this, an example of filtering a signal on the non-euclidian domain was also represented. 4 | 5 | For full documentation of first part please have a look below link. 6 | 7 | https://medium.com/@muhammetbalcilar/struggling-signals-from-graph-34674e699df8 8 | 9 | For second part please have a look below link. 10 | 11 | https://medium.com/@muhammetbalcilar/spectral-feature-of-graph-signals-a54a244bab22 12 | -------------------------------------------------------------------------------- /bspline/Contents.m: -------------------------------------------------------------------------------- 1 | % Interactive B-spline drawing 2 | % Copyright 2010 Levente Hunyadi 3 | % 4 | % Interactive tool 5 | % bspline_gui - Get control points of uniform B-spline interactively. 6 | % 7 | % Examples 8 | % example_bsplinebasis - Illustrates B-spline basis functions. 9 | % example_bsplinedeboor - Illustrates drawing a B-spline. 10 | % example_bsplinefoot - Illustrates B-spline foot point calculation. 11 | % example_bsplineapprox - Illustrates B-spline curve approximation. 12 | % example_bsplineestim - Illustrates B-spline curve estimation without knowing parameter values. 13 | % example_bindevent - Illustrates how to bind multiple events to a single event hook. 14 | % 15 | % B-spline functions 16 | % bspline_basis - B-spline basis function value B(j,n) at x. 17 | % bspline_basismatrix - B-spline basis function value matrix B(n) for x. 18 | % bspline_deboor - Evaluate explicit B-spline at specified locations. 19 | % bspline_wdeboor - Evaluate explicit weighed B-spline at specified locations. 20 | % bspline_footpoint - B-spline foot point of a set of points. 21 | % bspline_approx - B-spline curve control point approximation with known knot vector. 22 | % bspline_wapprox - B-spline curve control point estimation with weight approximation. 23 | % bspline_estimate - B-spline curve control point estimation without knowing parameter values. 24 | % 25 | % GUI utility functions 26 | % gui_bind_event - Registers a callback on a handle graphics object. 27 | % gui_dock_vertical - Automatic layout for controls in a container. 28 | % guipoints - Input 2D points from user interactively. 29 | % uispanedit - Edit box user control with fixed height but spanning width. 30 | % 31 | % Optimization functions 32 | % funminbnd - Single-variable bounded nonlinear function minimization. 33 | -------------------------------------------------------------------------------- /bspline/bspline_approx.m: -------------------------------------------------------------------------------- 1 | function D = bspline_approx(k,t,x,M) 2 | % B-spline curve control point approximation with known knot vector. 3 | % 4 | % Input arguments: 5 | % k: 6 | % B-spline order (2 for linear, 3 for quadratic, etc.) 7 | % t: 8 | % knot vector 9 | % x: 10 | % B-spline values corresponding to which data points are observed 11 | % M: 12 | % d-by-m matrix of observed data points, possibly polluted with noise, 13 | % d is typically 2 for plane, 3 for space, or 3 or 4, respectively, if 14 | % weights are present 15 | % 16 | % Output arguments: 17 | % D: 18 | % d-by-n matrix of control points 19 | 20 | % Copyright 2010 Levente Hunyadi 21 | 22 | validateattributes(k, {'numeric'}, {'positive','integer','scalar'}); 23 | validateattributes(t, {'numeric'}, {'real','vector'}); 24 | validateattributes(x, {'numeric'}, {'real','vector'}); 25 | validateattributes(M, {'numeric'}, {'real','2d'}); 26 | 27 | B = bspline_basismatrix(k,t,x); 28 | Q = M * B; 29 | D = Q / (B'*B); 30 | -------------------------------------------------------------------------------- /bspline/bspline_basis.m: -------------------------------------------------------------------------------- 1 | function [y,x] = bspline_basis(j,n,t,x) 2 | % B-spline basis function value B(j,n) at x. 3 | % 4 | % Input arguments: 5 | % j: 6 | % interval index, 0 =< j < numel(t)-n 7 | % n: 8 | % B-spline order (2 for linear, 3 for quadratic, etc.) 9 | % t: 10 | % knot vector 11 | % x (optional): 12 | % value where the basis function is to be evaluated 13 | % 14 | % Output arguments: 15 | % y: 16 | % B-spline basis function value, nonzero for a knot span of n 17 | 18 | % Copyright 2010 Levente Hunyadi 19 | 20 | validateattributes(j, {'numeric'}, {'nonnegative','integer','scalar'}); 21 | validateattributes(n, {'numeric'}, {'positive','integer','scalar'}); 22 | validateattributes(t, {'numeric'}, {'real','vector'}); 23 | assert(all( t(2:end)-t(1:end-1) >= 0 ), ... 24 | 'Knot vector values should be nondecreasing.'); 25 | if nargin < 4 26 | x = linspace(t(n), t(end-n+1), 100); % allocate points uniformly 27 | else 28 | validateattributes(x, {'numeric'}, {'real','vector'}); 29 | end 30 | assert(0 <= j && j < numel(t)-n, ... 31 | 'Invalid interval index j = %d, expected 0 =< j < %d (0 =< j < numel(t)-n).', j, numel(t)-n); 32 | 33 | y = bspline_basis_recurrence(j,n,t,x); 34 | 35 | function y = bspline_basis_recurrence(j,n,t,x) 36 | 37 | y = zeros(size(x)); 38 | if n > 1 39 | b = bspline_basis(j,n-1,t,x); 40 | dn = x - t(j+1); 41 | dd = t(j+n) - t(j+1); 42 | if dd ~= 0 % indeterminate forms 0/0 are deemed to be zero 43 | y = y + b.*(dn./dd); 44 | end 45 | b = bspline_basis(j+1,n-1,t,x); 46 | dn = t(j+n+1) - x; 47 | dd = t(j+n+1) - t(j+1+1); 48 | if dd ~= 0 49 | y = y + b.*(dn./dd); 50 | end 51 | elseif t(j+2) < t(end) % treat last element of knot vector as a special case 52 | y(t(j+1) <= x & x < t(j+2)) = 1; 53 | else 54 | y(t(j+1) <= x) = 1; 55 | end 56 | -------------------------------------------------------------------------------- /bspline/bspline_basismatrix.m: -------------------------------------------------------------------------------- 1 | function [B,x] = bspline_basismatrix(n,t,x) 2 | % B-spline basis function value matrix B(n) for x. 3 | % 4 | % Input arguments: 5 | % n: 6 | % B-spline order (2 for linear, 3 for quadratic, etc.) 7 | % t: 8 | % knot vector 9 | % x (optional): 10 | % an m-dimensional vector of values where the basis function is to be 11 | % evaluated 12 | % 13 | % Output arguments: 14 | % B: 15 | % a matrix of m rows and numel(t)-n columns 16 | 17 | % Copyright 2010 Levente Hunyadi 18 | 19 | if nargin > 2 20 | B = zeros(numel(x),numel(t)-n); 21 | for j = 0 : numel(t)-n-1 22 | B(:,j+1) = bspline_basis(j,n,t,x); 23 | end 24 | else 25 | [b,x] = bspline_basis(0,n,t); 26 | B = zeros(numel(x),numel(t)-n); 27 | B(:,1) = b; 28 | for j = 1 : numel(t)-n-1 29 | B(:,j+1) = bspline_basis(j,n,t,x); 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /bspline/bspline_deriv.m: -------------------------------------------------------------------------------- 1 | function [dknots, dctrl] = bspline_deriv(order, knots, ctrl) 2 | % Knots and control points associated with the derivative of B-spline curve. 3 | % 4 | % Input arguments: 5 | % order: 6 | % B-spline order (2 for linear, 3 for quadratic, etc.) 7 | % knots: 8 | % knot vector 9 | % ctrl: 10 | % control points, typically 2-by-m, 3-by-m, or 4-by-m (for weights) 11 | % 12 | % Output arguments: 13 | % dctrl: 14 | % control points of the derivative of the input B-spline curve 15 | % dknots: 16 | % the new knot vector associated with the derivative B-spline curve 17 | 18 | % Copyright 2011 Joe Hays 19 | % Copyright 2010-2011 Levente Hunyadi 20 | 21 | p = order - 1; 22 | tmp = size(ctrl); 23 | n = tmp(2)-1; 24 | dim = tmp(1); 25 | 26 | % derivative knots 27 | dknots = knots(2:max(size(knots))-1); 28 | 29 | % derivative control points 30 | dctrl = zeros(dim,n); 31 | for i = 1 : n 32 | dctrl(:,i) = (p / (knots(i+p+1) - knots(i+1))) * (ctrl(:,i+1) - ctrl(:,i)); 33 | end 34 | -------------------------------------------------------------------------------- /bspline/bspline_estimate.m: -------------------------------------------------------------------------------- 1 | function D = bspline_estimate(k,t,M) 2 | % B-spline curve control point estimation without knowing parameter values. 3 | % 4 | % Input arguments: 5 | % k: 6 | % B-spline order (2 for linear, 3 for quadratic, etc.) 7 | % t: 8 | % knot vector 9 | % M: 10 | % d-by-m matrix of observed data points, possibly polluted with noise, 11 | % d is typically 2 for plane, 3 for space, or 3 or 4, respectively, if 12 | % weights are present 13 | % 14 | % Output arguments: 15 | % D: 16 | % d-by-n matrix of control points 17 | 18 | % Copyright 2010 Levente Hunyadi 19 | 20 | x = linspace(t(k), t(end-k+1), size(M,2)); % allocate points uniformly 21 | for iter = 1 : 50 22 | D = bspline_approx(k,t,x,M); 23 | x = bspline_footpoint(k,t,D,M); 24 | if 0 25 | C = bspline_deboor(k,t,D); 26 | Y = bspline_deboor(k,t,D,x); 27 | hold on; 28 | plot(C(1,:), C(2,:), 'b'); 29 | plot(M(1,:), M(2,:), 'kx'); 30 | plot(Y(1,:), Y(2,:), 'rx'); 31 | hold off; 32 | end 33 | end -------------------------------------------------------------------------------- /bspline/bspline_footpoint.m: -------------------------------------------------------------------------------- 1 | function [x,F] = bspline_footpoint(k,t,D,M) 2 | % B-spline foot point of a set of points. 3 | % 4 | % M: 5 | % d-by-m matrix of observed data points, possibly polluted with noise, 6 | % which are not necessarily lying on the B-spline curve 7 | % 8 | % Output arguments: 9 | % x: 10 | % parameter values for the B-spline foot points 11 | % F: 12 | % foot points on the B-spline curve 13 | 14 | % Copyright 2010 Levente Hunyadi 15 | 16 | lb = t(k); 17 | ub = t(end-k+1); 18 | 19 | % simple algorithm, find close enough points 20 | u = linspace(lb, ub, 500); 21 | E = bspline_error(k,t,D,M,u); 22 | [v,ix] = min(E,[],2); 23 | x0 = u(ix); 24 | 25 | if 1 % refine foot crude point estimates 26 | x = zeros(1,size(M,2)); 27 | for i = 1 : size(M,2) 28 | x(i) = funminbnd(@(u) bspline_error(k,t,D,M(:,i),u), lb, ub, x0(i)); 29 | end 30 | else 31 | x = x0; 32 | end 33 | 34 | if nargin > 1 35 | F = bspline_deboor(k,t,D,x); 36 | end 37 | 38 | function E = bspline_error(k,t,D,M,x) 39 | % B-spline approximation error. 40 | % 41 | % Input arguments: 42 | % k: 43 | % B-spline order (2 for linear, 3 for quadratic, etc.) 44 | % t: 45 | % knot vector 46 | % D: 47 | % control points 48 | % M: 49 | % points whose error to compute 50 | % x: 51 | % parameter values w.r.t. which distance from m is minimized 52 | % 53 | % Output arguments: 54 | % E: 55 | % sum of squares approximation error 56 | 57 | Y = bspline_deboor(k,t,D,x); 58 | Y = reshape(Y, size(Y,1), 1, size(Y,2)); % extend data with a singleton dimension 59 | M = reshape(M, size(M,1), size(M,2), 1); 60 | E = squeeze(sum(bsxfun(@minus, M, Y).^2, 1)); % calculate pairwise squared distance of points in M and Y 61 | E = sqrt(E); % pairwise distance 62 | -------------------------------------------------------------------------------- /bspline/bspline_wdeboor.m: -------------------------------------------------------------------------------- 1 | function [C,u] = bspline_wdeboor(n,t,P,w,u) 2 | % Evaluate explicit weighed B-spline at specified locations. 3 | % 4 | % Input arguments: 5 | % n: 6 | % B-spline order (2 for linear, 3 for quadratic, etc.) 7 | % t: 8 | % knot vector 9 | % P: 10 | % control points, typically 2-by-m, 3-by-m or 4-by-m (for weights) 11 | % w: 12 | % weight vector 13 | % u (optional): 14 | % values where the B-spline is to be evaluated, or a positive 15 | % integer to set the number of points to automatically allocate 16 | % Output arguments: 17 | % C: 18 | % points of the B-spline curve 19 | 20 | % Copyright 2010 Levente Hunyadi 21 | 22 | w = transpose(w(:)); 23 | P = bsxfun(@times, P, w); 24 | P = [P ; w]; % add weights to control points 25 | 26 | if nargin >= 5 27 | [Y,u] = bspline_deboor(n,t,P,u); 28 | else 29 | [Y,u] = bspline_deboor(n,t,P); 30 | end 31 | 32 | C = bsxfun(@rdivide, Y(1:end-1,:), Y(end,:)); % normalize and remove weights from computed points -------------------------------------------------------------------------------- /bspline/example_bindevent.m: -------------------------------------------------------------------------------- 1 | function example_bindevent 2 | % Illustrates how to bind multiple events to a single event hook. 3 | 4 | % Copyright 2010 Levente Hunyadi 5 | 6 | fig = figure; 7 | button = uicontrol(fig, ... 8 | 'Style', 'pushbutton', ... 9 | 'Units', 'normalized', ... 10 | 'Position', [0 0 0.2 0.2], ... 11 | 'String', 'Click me'); 12 | gui_bind_event(button, 'Callback', {@example_bindevent_disp, 'This is a sample text'}); 13 | gui_bind_event(button, 'Callback', @example_bindevent_font); 14 | 15 | button = uicontrol(fig, ... 16 | 'Style', 'pushbutton', ... 17 | 'Units', 'normalized', ... 18 | 'Position', [0.2 0 0.2 0.2], ... 19 | 'String', 'Click me'); 20 | gui_bind_event(button, 'Callback', @example_bindevent_font); 21 | 22 | function example_bindevent_disp(obj, event, text) 23 | 24 | disp(text); 25 | 26 | function example_bindevent_font(obj, event) 27 | 28 | switch get(obj, 'FontWeight') 29 | case 'light' 30 | set(obj, 'FontWeight', 'demi'); 31 | case 'normal' 32 | set(obj, 'FontWeight', 'bold'); 33 | case 'demi' 34 | set(obj, 'FontWeight', 'light'); 35 | case 'bold' 36 | set(obj, 'FontWeight', 'normal'); 37 | end 38 | -------------------------------------------------------------------------------- /bspline/example_bsplineapprox.m: -------------------------------------------------------------------------------- 1 | function example_bsplineapprox 2 | % Illustrates B-spline curve approximation. 3 | 4 | % Copyright 2010 Levente Hunyadi 5 | 6 | example = menu('Choose an example', 'Demonstration example 1', 'Demonstration example 2'); 7 | useweights = false; 8 | 9 | %example = 1; 10 | switch example 11 | case 1 12 | % spline order 13 | k = 4; 14 | % knot sequence 15 | t = [0 0 0 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 1 1]; 16 | % control points (unknown) 17 | D_0 = [ 0.1993 0.4965 0.6671 0.7085 0.6809 0.2938 0.1071 0.3929 0.5933 0.8099 0.8998 0.8906 ... 18 | ; 0.8377 0.8436 0.7617 0.6126 0.212 0.1067 0.3962 0.5249 0.5015 0.3991 0.6477 0.8553 ]; 19 | % points on B-spline curve 20 | [M_0,x] = bspline_deboor(k,t,D_0); 21 | M = M_0 + 0.01 * randn(size(M_0)); % contaminate with noise 22 | case 2 23 | k = 4; 24 | t = [0 0 0 0 0.2 0.4 0.6 0.8 1 1 1 1]; 25 | w = 2*[1.4 0.5 1.6 1.8 0.7 1.9 1.5 0.9]; 26 | D_0 = [0.09942 0.1398 0.4942 0.6787 0.8573 0.4741 0.4856 0.987;0.05994 0.5132 0.5716 0.2617 0.6711 0.7237 0.9839 0.7939]; 27 | [M_0,x] = bspline_wdeboor(k,t,D_0,w); 28 | M = M_0 + 0.01 * randn(size(M_0)); 29 | end 30 | 31 | if useweights % weighed approximation 32 | [D,w] = bspline_wapprox(k,t,x,M); 33 | disp('Control point weights:'); 34 | disp(w); 35 | else % unweighed approximation 36 | D = bspline_approx(k,t,x,M); 37 | end 38 | 39 | % plot control points and spline 40 | figure; 41 | hold all; 42 | plot(D_0(1,:), D_0(2,:), 'g'); 43 | plot(M_0(1,:), M_0(2,:), 'b'); 44 | plot(M(1,:), M(2,:), 'kx'); 45 | plot(D(1,:), D(2,:), 'r'); 46 | legend('true control points', 'original data', 'noisy data', 'estimated control points', ... 47 | 'Location', 'Best'); 48 | hold off; 49 | -------------------------------------------------------------------------------- /bspline/example_bsplinebasis.m: -------------------------------------------------------------------------------- 1 | function example_bsplinebasis 2 | % Illustrates B-spline basis functions. 3 | 4 | % Copyright 2010 Levente Hunyadi 5 | 6 | t = [0 0 0 0.5 1 1 1]; % knot vector 7 | n = 3; % quadratic spline 8 | figure( ... 9 | 'Name', sprintf('NURBS basis functions of order %d', n)); 10 | hold all; 11 | for j = 0 : numel(t)-n-1 12 | [y,x] = bspline_basis(j,n,t); 13 | plot(x, y); 14 | end 15 | hold off; 16 | 17 | % the bell-shaped curve 18 | figure( ... 19 | 'Name', 'The bell-shaped curve'); 20 | hold all; 21 | x = 0 : 0.1 : 3; 22 | y = bspline_basis(0, 3, [0 1 2 3], x); 23 | plot(x,y); 24 | hold off; 25 | 26 | % the linear case 27 | figure( ... 28 | 'Name', 'The linear case'); 29 | hold all; 30 | x = 0 : 0.1 : 3; 31 | y = bspline_basis(0, 2, [0 3 3], x); 32 | plot(x,y); 33 | hold off; 34 | 35 | % the constant case 36 | figure( ... 37 | 'Name', 'The constant case'); 38 | hold all; 39 | x = 0 : 0.1 : 3; 40 | y = bspline_basis(0, 1, [0 3], x); 41 | plot(x,y); 42 | hold off; 43 | -------------------------------------------------------------------------------- /bspline/example_bsplinederiv.m: -------------------------------------------------------------------------------- 1 | function example_bsplinederiv 2 | % Illustrates drawing a B-spline and its derivative. 3 | 4 | % Copyright 2011 Levente Hunyadi 5 | 6 | % spline order 7 | k = 4; 8 | % knot sequence 9 | t = [0 0 0 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 1 1]; 10 | % control points 11 | P = [ 0.1993 0.4965 0.6671 0.7085 0.6809 0.2938 0.1071 0.3929 0.5933 0.8099 0.8998 0.8906 ... 12 | ; 0.8377 0.8436 0.7617 0.6126 0.212 0.1067 0.3962 0.5249 0.5015 0.3991 0.6477 0.8553 ]; 13 | 14 | C = bspline_deboor(k,t,P); 15 | [dt,dP] = bspline_deriv(k,t,P); 16 | dC = bspline_deboor(k-1,dt,dP); 17 | 18 | % plot control points and spline 19 | figure; 20 | hold all; 21 | plot(C(1,:), C(2,:), 'b'); 22 | plot(P(1,:), P(2,:), 'kx'); 23 | plot(dC(1,:), dC(2,:), 'm'); 24 | plot(dP(1,:), dP(2,:), 'k.'); 25 | legend('original spline curve','control points','derivative spline curve','control points of derivative', ... 26 | 'Location', 'Best'); 27 | hold off; -------------------------------------------------------------------------------- /bspline/example_bsplineestim.m: -------------------------------------------------------------------------------- 1 | function example_bsplineestim() 2 | % Illustrates B-spline curve estimation without knowing parameter values. 3 | 4 | % Copyright 2010 Levente Hunyadi 5 | 6 | % spline order 7 | k = 4; 8 | % knot sequence 9 | t = [0 0 0 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 1 1]; 10 | % control points (unknown) 11 | D_0 = [ 0.1993 0.4965 0.6671 0.7085 0.6809 0.2938 0.1071 0.3929 0.5933 0.8099 0.8998 0.8906 ... 12 | ; 0.8377 0.8436 0.7617 0.6126 0.212 0.1067 0.3962 0.5249 0.5015 0.3991 0.6477 0.8553 ]; 13 | % points on B-spline curve 14 | M_0 = bspline_deboor(k,t,D_0,sort(rand(1,500))); 15 | M = M_0 + 0.01 * randn(size(M_0)); % contaminate with noise 16 | 17 | D = bspline_estimate(k,t,M); 18 | C = bspline_deboor(k,t,D); 19 | 20 | % plot control points and spline 21 | figure; 22 | hold all; 23 | plot(D_0(1,:), D_0(2,:), 'g'); 24 | plot(M_0(1,:), M_0(2,:), 'b'); 25 | plot(M(1,:), M(2,:), 'kx'); 26 | plot(D(1,:), D(2,:), 'r'); 27 | plot(C(1,:), C(2,:), 'c'); 28 | legend('true control points', 'original curve', 'noisy data', 'estimated control points', 'estimated curve', ... 29 | 'Location', 'Best'); 30 | hold off; 31 | -------------------------------------------------------------------------------- /bspline/example_bsplinefoot.m: -------------------------------------------------------------------------------- 1 | function example_bsplinefoot 2 | % Illustrates B-spline foot point calculation. 3 | 4 | % Copyright 2010 Levente Hunyadi 5 | 6 | k = 4; 7 | % knot sequence 8 | t = [0 0 0 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 1 1]; 9 | % control points 10 | D = [ 0.1993 0.4965 0.6671 0.7085 0.6809 0.2938 0.1071 0.3929 0.5933 0.8099 0.8998 0.8906 ... 11 | ; 0.8377 0.8436 0.7617 0.6126 0.212 0.1067 0.3962 0.5249 0.5015 0.3991 0.6477 0.8553 ]; 12 | % points on B-spline curve 13 | M = bspline_deboor(k,t,D); 14 | P = M + 0.04 * randn(size(M)); % contaminate with noise 15 | [x,F] = bspline_footpoint(k,t,D,P); 16 | 17 | % plot control points and spline 18 | figure; 19 | hold all; 20 | plot(D(1,:), D(2,:), 'g'); 21 | plot(M(1,:), M(2,:), 'b'); 22 | plot(P(1,:), P(2,:), 'kx'); 23 | plot(F(1,:), F(2,:), 'rx'); 24 | for i = 1 : size(P,2) 25 | line( ... 26 | [P(1,i), F(1,i)], ... 27 | [P(2,i), F(2,i)]); 28 | end 29 | hold off; 30 | -------------------------------------------------------------------------------- /bspline/guipoints.m: -------------------------------------------------------------------------------- 1 | function P = guipoints 2 | % Input 2D points from user interactively. 3 | 4 | % Copyright 2010 Levente Hunyadi 5 | 6 | fig = figure; 7 | ax = axes( ... 8 | 'Parent', fig, ... 9 | 'XLimMode', 'manual', ... 10 | 'YLimMode', 'manual'); 11 | x = []; 12 | y = []; 13 | ctrl = line(-1, -1, ... 14 | 'Parent', ax, ... 15 | 'LineStyle', 'none', ... 16 | 'Marker', 'x'); 17 | try 18 | cancel = false; 19 | while ~cancel 20 | [x1,y1,button] = ginput(1); 21 | if isempty(x1) || isempty(y1) % ENTER key 22 | break; 23 | elseif x1 < 0 || x1 > 1 || y1 < 0 || y1 > 1 % point outside domain 24 | continue; 25 | end 26 | switch button 27 | case 1 % left mouse button 28 | % record data 29 | case 3 % right mouse button 30 | cancel = true; % cancel with adding point 31 | case 27 % ESC key 32 | cancel = true; % cancel without adding point 33 | continue; 34 | end 35 | x = [x,x1]; %#ok 36 | y = [y,y1]; %#ok 37 | 38 | set(ctrl, 'XData', x, 'YData', y); 39 | end 40 | catch ex 41 | switch ex.identifier 42 | case 'MATLAB:ginput:FigureDeletionPause' 43 | % preserve values for x and y 44 | otherwise 45 | rethrow(ex); 46 | end 47 | end 48 | P = [x;y]; 49 | if nargout < 1 50 | disp(mat2str(P,4)); 51 | end -------------------------------------------------------------------------------- /bspline/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2012, Levente Hunyadi 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /bspline/uispanedit.m: -------------------------------------------------------------------------------- 1 | function editbox = uispanedit(varargin) 2 | % Edit box user control with fixed height but spanning width. 3 | % 4 | % This user control automatically takes all available space for width but 5 | % maintains a fixed height when resizing. 6 | 7 | % Copyright 2010 Levente Hunyadi 8 | 9 | ix = 1; 10 | if nargin >= ix && ishandle(varargin{ix}) 11 | parent = varargin{ix}; 12 | ix = ix + 1; 13 | end 14 | 15 | ixheight = 2*strmatch('Height', varargin(ix:2:end))-1; % offset of parameter 'Height' 16 | if ~isempty(ixheight) 17 | height = varargin{ix + ixheight}; 18 | varargin(ix + ixheight - 1 : ix + ixheight) = []; % remove parameter 'Height' 19 | else 20 | height = 25; 21 | end 22 | 23 | editbox = uicontrol(parent, ... 24 | 'Style', 'edit', ... 25 | 'Units', 'normalized', ... 26 | 'Position', [0,0,1,1], ... 27 | varargin{ix:end}); 28 | fig = ancestor(parent, 'figure'); 29 | uispanedit_resize(fig, [], editbox, height); 30 | gui_bind_event(fig, 'ResizeFcn', {@uispanedit_resize, editbox, height}); 31 | 32 | function uispanedit_resize(fig, event, editbox, height) 33 | 34 | pos = getpixelposition(editbox); 35 | left = pos(1); bottom = pos(2); width = pos(3); 36 | setpixelposition(editbox, [left, bottom, width, height]); -------------------------------------------------------------------------------- /bspline_basis.m: -------------------------------------------------------------------------------- 1 | function basis=bspline_basis(K, v, x, degree) 2 | 3 | kv1 = min(v) * ones(degree,1); 4 | kv2 = linspace(min(v), max(v), K-degree+1)'; 5 | kv3 = max(v) * ones(degree,1); 6 | kv = [kv1 ;kv2 ;kv3]; 7 | 8 | for k =1:K 9 | basis(:,k)=cox_deboor(k, degree); 10 | end 11 | %basis(end,end)=1; 12 | 13 | 14 | 15 | function ret= cox_deboor(k, d) 16 | 17 | % Test for end conditions, the rectangular degree zero spline. 18 | if (d == 0) 19 | ret= double(((x - kv(k) >= 0) & (x - kv(k + 1) < 0))); 20 | else 21 | 22 | denom1 = kv(k + d) - kv(k); 23 | term1 = 0; 24 | if denom1 > 0 25 | term1 = ((x - kv(k)) / denom1) .* cox_deboor(k, d - 1); 26 | end 27 | 28 | denom2 = kv(k + d + 1) - kv(k + 1); 29 | term2 = 0; 30 | if denom2 > 0 31 | term2 = ((-(x - kv(k + d + 1)) / denom2) .* cox_deboor(k + 1, d - 1)); 32 | end 33 | ret= term1 + term2; 34 | end 35 | 36 | end 37 | 38 | end -------------------------------------------------------------------------------- /chebyshev_basis.m: -------------------------------------------------------------------------------- 1 | function X=chebyshev_basis(L, x, degree) 2 | X=x; 3 | X(:,2)=L*x; 4 | for i=2:degree 5 | X(:,i+1)=2*L*X(:,i)-X(:,i-1); 6 | end -------------------------------------------------------------------------------- /data2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/data2.mat -------------------------------------------------------------------------------- /demo10.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % load predefined W matrix for 100 nodes 6 | load mydata 7 | 8 | 9 | % calculate combinatorial Laplacian Matrix 10 | d = sum(W,2); 11 | L = diag(d)-W; 12 | % calculate Laplacian Matrix 13 | 14 | % find eigenvector and eigenvalues of combinatorial Laplacian 15 | [u v]=eig(L); 16 | 17 | 18 | % make eignevalue as vector 19 | v=diag(v); 20 | % get maximum eigenvalue 21 | lmax=max(v); 22 | v(v<0)=0; 23 | 24 | % create signal where first node is 1 rest of them zero 25 | s=zeros(size(W,1),1); 26 | s(1)=1; 27 | 28 | % determine filter 29 | flt =exp(-20*v); 30 | % apply that filter on to graph signal 31 | sf=u*(flt.*(u'*s)); 32 | 33 | 34 | 35 | % filter over new eigenvalue basis 36 | K=50; 37 | nv=linspace(0,8,K)'; 38 | basis=bspline_basis(K, nv,v, 3); 39 | alpha=exp(-20*nv); 40 | flt=basis*alpha; 41 | 42 | 43 | % apply that filter on to graph signal 44 | 45 | sf2=u*diag(flt)*u'*s; 46 | 47 | figure;plot(sf,'b--','linewidth',2) 48 | hold on;plot(sf2,'r-') 49 | xlabel('node id') 50 | ylabel('node signal value') 51 | legend({'original basis','spline basis'}) 52 | 53 | G=gsp_graph(WW,coord2); 54 | figure;gsp_plot_signal(G,sf2) 55 | title('Filtered signal on second graph'); 56 | 57 | 58 | -------------------------------------------------------------------------------- /demo3.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % load predefined W matrix for 100 nodes 6 | load mydata 7 | 8 | 9 | % calculate combinatorial Laplacian Matrix 10 | d = sum(W,2); 11 | L = diag(d)-W; 12 | 13 | 14 | % find eigenvector and eigenvalues of combinatorial Laplacian 15 | [u v]=eig(L); 16 | 17 | 18 | % make eignevalue as vector 19 | v=diag(v); 20 | % get maximum eigenvalue 21 | lmax=max(v); 22 | 23 | 24 | % create signal where first node is 1 rest of them zero 25 | s=zeros(size(W,1),1); 26 | s(1)=1; 27 | 28 | 29 | % determine filter 30 | flt =exp(-100*v); 31 | 32 | % apply that filter on to graph signal 33 | sf=u*(flt.*(u'*s)); 34 | 35 | 36 | % visualize input and result 37 | %coord=u(:,2:4); 38 | G=gsp_graph(W,coord); 39 | figure;gsp_plot_signal(G,s) 40 | title('Input signal'); 41 | figure;gsp_plot_signal(G,sf) 42 | title('Filtered signal'); 43 | 44 | 45 | -------------------------------------------------------------------------------- /demo4.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % create time series grid as graph 6 | n=101; 7 | W=zeros(n,n); 8 | ang=linspace(0,2*pi,1010); 9 | p=randperm(length(ang)); 10 | p=sort(p(1:101)); 11 | p=[p p(1)]; 12 | 13 | for i=1:n+1 14 | loc(i,:)=[cos(ang(p(i))) sin(ang(p(i)))]; 15 | end 16 | 17 | for i=1:n-1 18 | d=norm(loc(i,:)-loc(i+1,:)); 19 | W(i,i+1)=(1/d); 20 | W(i+1,i)=(1/d); 21 | end 22 | d=norm(loc(1,:)-loc(n,:)); 23 | W(1,n)=(1/d); 24 | W(n,1)=(1/d); 25 | 26 | W=W/max(W(:)); 27 | 28 | 29 | 30 | 31 | % calculate combinatorial Laplacian Matrix 32 | d = sum(W,2); 33 | L = diag(d)-W; 34 | 35 | 36 | % calculate basis 37 | [u v]=eig(L); 38 | % make eignevalue as vector 39 | v=diag(v); 40 | % get maximum eigenvalue 41 | lmax=max(v); 42 | 43 | 44 | 45 | % create arbitrary signal 46 | s=1:n; 47 | 48 | 49 | 50 | 51 | %% show graph and signal 52 | run gspbox/gsp_start 53 | 54 | 55 | 56 | G=gsp_graph(W,loc(1:end-1,:)); 57 | figure;gsp_plot_signal(G,s) 58 | title('original coordinates '); 59 | 60 | G=gsp_graph(W,u(:,2:3)); 61 | figure;gsp_plot_signal(G,s) 62 | title('esimated coordinates'); 63 | 64 | 65 | 66 | du=diff(u(:,2:3)); 67 | dt=diff(loc(1:end-1,:)); 68 | figure;plot(diag(du*du'),diag(dt*dt'),'r.') 69 | xlabel('estimated '); 70 | ylabel('actual '); 71 | title('consecutive node distance'); 72 | 73 | -------------------------------------------------------------------------------- /demo8.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | 5 | % create time series grid as graph 6 | n=101; 7 | W=zeros(n,n); 8 | for i=1:n-1 9 | 10 | W(i,i+1)=1; 11 | W(i+1,i)=1; 12 | 13 | end 14 | 15 | W(1,n)=1; 16 | W(n,1)=1; 17 | 18 | 19 | % calculate combinatorial Laplacian Matrix 20 | 21 | d = sum(W,2); 22 | L = diag(d)-W; 23 | 24 | 25 | % calculate basis 26 | [u v]=eig(L); 27 | 28 | 29 | % make eignevalue as vector 30 | v=diag(v); 31 | v(v<0)=0; 32 | % get maximum eigenvalue 33 | lmax=max(v); 34 | 35 | nv=linspace(0,2,21); 36 | basis=bspline_basis(21, nv,v, 3); 37 | 38 | nu=u*basis; 39 | 40 | 41 | figure;subplot(2,3,1);plot(u(:,5));ylim([-0.15 0.15]);xlim([1 101]); 42 | title(['5th eigenvector, value=' num2str(v(5))]); 43 | subplot(2,3,2);plot(u(:,11));ylim([-0.15 0.15]);xlim([1 101]); 44 | title(['11th eigenvector, value=' num2str(v(11))]); 45 | subplot(2,3,3);plot(u(:,end));ylim([-0.15 0.15]);xlim([1 101]); 46 | title(['last eigenvector, value=' num2str(v(end))]); 47 | 48 | subplot(2,3,4);plot(nu(:,5));xlim([1 101]); %ylim([-0.15 0.15]); 49 | title(['5th eigenvector, value=' num2str(nv(5))]); 50 | subplot(2,3,5);plot(nu(:,11));xlim([1 101]); %ylim([-0.15 0.15]); 51 | title(['11th eigenvector, value=' num2str(nv(11))]); 52 | subplot(2,3,6);plot(nu(:,end));xlim([1 101]); %ylim([-0.15 0.15]); 53 | title(['last eigenvector, value=' num2str(nv(end))]); 54 | -------------------------------------------------------------------------------- /gspbox/3rdparty/.gitignore: -------------------------------------------------------------------------------- 1 | gaimc 2 | sources/flann-1.8.4-src/build/ 3 | sources/flann-1.8.4-src/cmake/ -------------------------------------------------------------------------------- /gspbox/3rdparty/CSCbox/README.txt: -------------------------------------------------------------------------------- 1 | This is the CSCbox, a Matlab toolbox that implements the Compressive 2 | Spectral Clustering (CSC) algorithm as detailed in 3 | 4 | N. Tremblay, G. Puy, R. Gribonval and P. Vandergheynst. 5 | Compressive Spectral Clustering. 6 | ArXiv e-prints:1602.02018 Feb. 2016. 7 | 8 | The authors of this Toolbox are Nicolas Tremblay and Gilles Puy; 9 | and can both be joined at firstname.lastname AT inria DOT fr 10 | 11 | This toolbox is probably not bug-free and this is its BETA-version. 12 | Please report any bug to help us improve it. 13 | 14 | This Toolbox is under the GNU Public License (see the attached 15 | document "LICENSE"). 16 | 17 | If you use this Toolbox, please kindly cite us! :-) 18 | -------------------------------------------------------------------------------- /gspbox/3rdparty/CSCbox/codes/compute_modularity.m: -------------------------------------------------------------------------------- 1 | % function MOD = compute_modularity(IDX,W) 2 | % 3 | % This computes the modularity MOD of a given partition IDX of a given 4 | % graph represented by its adjacency matrix W 5 | % 6 | % Copyright (C) 2016 Nicolas Tremblay, Gilles Puy. 7 | % This file is part of the CSCbox (Compressive Spectral Clustering toolbox) 8 | % 9 | % The CSCbox is free software: you can redistribute it and/or modify 10 | % it under the terms of the GNU General Public License as published by 11 | % the Free Software Foundation, either version 3 of the License, or 12 | % (at your option) any later version. 13 | % 14 | % The CSCbox is distributed in the hope that it will be useful, 15 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | % GNU General Public License for more details. 18 | % 19 | % You should have received a copy of the GNU General Public License 20 | % along with this program. If not, see . 21 | % 22 | % If you use this toolbox please kindly cite 23 | % N. Tremblay, G. Puy, R. Gribonval and P. Vandergheynst. 24 | % Compressive Spectral Clustering. 25 | % ArXiv e-prints:1602.02018 Feb. 2016. 26 | 27 | function MOD = compute_modularity(IDX,W) 28 | 29 | m = sum(sum(W)); 30 | MOD = 0; 31 | COMu = unique(IDX); 32 | for j=1:length(COMu) 33 | IDXj = find(IDX==COMu(j)); 34 | Ec = sum(sum(W(IDXj,IDXj))); 35 | Et = sum(sum(W(IDXj,:))); 36 | if Et>0 37 | MOD = MOD + Ec/m-(Et/m)^2; 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /gspbox/3rdparty/CSCbox/third_party/README.txt: -------------------------------------------------------------------------------- 1 | Authors of these 4 functions are detailed in their respective preamble. 2 | -------------------------------------------------------------------------------- /gspbox/3rdparty/Community_BGLL_Matlab/jl_clust.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/Community_BGLL_Matlab/jl_clust.mexglx -------------------------------------------------------------------------------- /gspbox/3rdparty/Community_BGLL_Matlab/jl_clust_orient.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/Community_BGLL_Matlab/jl_clust_orient.mexglx -------------------------------------------------------------------------------- /gspbox/3rdparty/Community_BGLL_Matlab/jl_mnew.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/Community_BGLL_Matlab/jl_mnew.mexglx -------------------------------------------------------------------------------- /gspbox/3rdparty/Community_BGLL_Matlab/readme.txt: -------------------------------------------------------------------------------- 1 | Matlab / C++ implementation of community detection algorithm. 2 | After "Fast unfolding of community hierarchies in large networks" 3 | Vincent D. Blondel, Jean-Loup Guillaume, Renaud Lambiotte and 4 | Etienne Lefebvre 5 | Journal of Statistical Mechanics: Theory and Experiment, 1742-5468, P10008 (12 pp.), 2008. 6 | 7 | Implementation : Antoine Scherrer 8 | antoine.scherrer@ens-lyon.fr 9 | 10 | *** USAGE - Full matlab 11 | 12 | See help of m files for details. 13 | 14 | cluster_jl.m : Weighted (or not), non oriented version of algorithm 15 | matrix is symetrized using sum of incoming and outgoing weights) 16 | 17 | cluster_jl_orient.m : Weighted (or not), oriented version of algorithm 18 | using extended definition of modularity for oriented graphs 19 | 20 | cluster_jl_orientT.m : Weighted (or not), oriented version of algorithm 21 | using symetric matrix A = M*M^t 22 | 23 | *** USAGE - Matlab/C++ 24 | 25 | You need to compile jl_clust.cpp, jl_mnew.cpp and jl_clust_orient.cpp 26 | with mex compiler. Then you can use the following routines to perform 27 | the community detection faster. 28 | 29 | cluster_jl_cpp.m : Weighted (or not), non oriented version of algorithm 30 | matrix is symetrized using sum of incoming and outgoing weights) 31 | 32 | cluster_jl_orient_cpp.m : Weighted (or not), oriented version of algorithm 33 | using extended definition of modularity for oriented graphs 34 | 35 | cluster_jl_orientT_cpp.m : Weighted (or not), oriented version of algorithm 36 | using symetric matrix A = M*M^t 37 | 38 | 39 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Demo/amd_f77simple.f: -------------------------------------------------------------------------------- 1 | C ---------------------------------------------------------------------- 2 | C AMD, Copyright (c) by Timothy A. Davis, Patrick R. 3 | C Amestoy, and Iain S. Duff. See ../README.txt for License. 4 | C email: DrTimothyAldenDavis@gmail.com 5 | C ---------------------------------------------------------------------- 6 | 7 | C This program provides an example of how to call the Fortran version 8 | C of AMD. It uses the same matrix as the amd_simple.c demo (in C). 9 | C Note that the diagonal entries are not present, and the matrix is 10 | C symmetric. 11 | 12 | INTEGER N, NZ, J, K, P, IWLEN, PFREE, NCMPA 13 | PARAMETER (N = 5, NZ = 10, IWLEN = 17) 14 | INTEGER AP (N+1), AI (NZ), LAST (N), PE (N), LEN (N), ELEN (N), 15 | $ IW (IWLEN), DEGREE (N), NV (N), NEXT (N), HEAD (N), W (N) 16 | DATA AP / 1, 2, 5, 8, 9, 11/ 17 | DATA AI / 2, 1,3,5, 2,4,5, 3, 2,3 / 18 | 19 | C load the matrix into the AMD workspace 20 | DO 10 J = 1,N 21 | PE (J) = AP (J) 22 | LEN (J) = AP (J+1) - AP (J) 23 | 10 CONTINUE 24 | DO 20 P = 1,NZ 25 | IW (P) = AI (P) 26 | 20 CONTINUE 27 | PFREE = NZ + 1 28 | 29 | C order the matrix (destroys the copy of A in IW, PE, and LEN) 30 | CALL AMD (N, PE, IW, LEN, IWLEN, PFREE, NV, NEXT, LAST, HEAD, 31 | $ ELEN, DEGREE, NCMPA, W) 32 | 33 | DO 60 K = 1, N 34 | PRINT 50, K, LAST (K) 35 | 50 FORMAT ('P (',I2,') = ', I2) 36 | 60 CONTINUE 37 | END 38 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Demo/amd_f77simple.out: -------------------------------------------------------------------------------- 1 | P ( 1) = 4 2 | P ( 2) = 1 3 | P ( 3) = 3 4 | P ( 4) = 5 5 | P ( 5) = 2 6 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Demo/amd_simple.c: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------- */ 2 | /* AMD Copyright (c) by Timothy A. Davis, */ 3 | /* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ 4 | /* email: DrTimothyAldenDavis@gmail.com */ 5 | /* ------------------------------------------------------------------------- */ 6 | 7 | #include 8 | #include "amd.h" 9 | 10 | int n = 5 ; 11 | int Ap [ ] = { 0, 2, 6, 10, 12, 14} ; 12 | int Ai [ ] = { 0,1, 0,1,2,4, 1,2,3,4, 2,3, 1,4 } ; 13 | int P [5] ; 14 | 15 | int main (void) 16 | { 17 | int k ; 18 | (void) amd_order (n, Ap, Ai, P, (double *) NULL, (double *) NULL) ; 19 | for (k = 0 ; k < n ; k++) printf ("P [%d] = %d\n", k, P [k]) ; 20 | return (0) ; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Demo/amd_simple.out: -------------------------------------------------------------------------------- 1 | P [0] = 0 2 | P [1] = 3 3 | P [2] = 2 4 | P [3] = 4 5 | P [4] = 1 6 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Doc/AMD_UserGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/AMD/Doc/AMD_UserGuide.pdf -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Doc/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # AMD Makefile for compiling on Unix systems (for GNU or original make) 3 | #------------------------------------------------------------------------------ 4 | 5 | default: dist 6 | 7 | include ../../SuiteSparse_config/SuiteSparse_config.mk 8 | 9 | #------------------------------------------------------------------------------ 10 | # Remove all but the files in the original distribution 11 | #------------------------------------------------------------------------------ 12 | 13 | clean: 14 | - $(RM) $(CLEAN) 15 | 16 | purge: distclean 17 | 18 | distclean: clean 19 | - $(RM) *.aux *.bbl *.blg *.log *.toc 20 | 21 | #------------------------------------------------------------------------------ 22 | # Create the User Guide and Quick Start Guide 23 | #------------------------------------------------------------------------------ 24 | 25 | AMD_UserGuide.pdf: AMD_UserGuide.tex AMD_UserGuide.bib ../Include/amd.h 26 | echo '\\begin{verbatim}' > amd_h.tex 27 | expand -8 ../Include/amd.h >> amd_h.tex 28 | echo '\end{verbatim}' >> amd_h.tex 29 | pdflatex AMD_UserGuide 30 | bibtex AMD_UserGuide 31 | pdflatex AMD_UserGuide 32 | pdflatex AMD_UserGuide 33 | 34 | dist: AMD_UserGuide.pdf 35 | - $(RM) *.aux *.bbl *.blg *.log *.toc amd_h.tex 36 | 37 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Lib/libamd.def: -------------------------------------------------------------------------------- 1 | LIBRARY libamd.dll 2 | EXPORTS 3 | amd_order 4 | amd_defaults 5 | amd_control 6 | amd_info 7 | amd_2 8 | amd_l_order 9 | amd_l_defaults 10 | amd_l_control 11 | amd_l_info 12 | amd_l2 13 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/MATLAB/Contents1.m: -------------------------------------------------------------------------------- 1 | %Contents of the AMD sparse matrix ordering package: 2 | % 3 | % amd2 - p = amd2 (A), the approximate minimum degree ordering of A 4 | % amd_demo - a demo of amd2, using the can_24 matrix 5 | % amd_make - to compile amd2 for use in MATLAB 6 | % amd_install - compile and install amd2 for use in MATLAB 7 | % 8 | % See also: amd, amd2, colamd, symamd, colmmd, symmmd, umfpack 9 | % 10 | % Note that amd2 and the built-in amd function in MATLAB 7.3 and later are one 11 | % and the same. 12 | % 13 | % Example: 14 | % p = amd2 (A) ; 15 | 16 | % Copyright 1994-2007, Tim Davis, Patrick R. Amestoy, and Iain S. Duff. 17 | 18 | help Contents 19 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/MATLAB/amd2.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/AMD/MATLAB/amd2.mexw64 -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/MATLAB/amd_install.m: -------------------------------------------------------------------------------- 1 | function amd_install 2 | %AMD_INSTALL compile and install amd2 for use in MATLAB 3 | % Your current directory must be AMD/MATLAB for this function to work. 4 | % 5 | % Example: 6 | % amd_install 7 | % 8 | % See also amd, amd2. 9 | 10 | % Copyright 1994-2007, Tim Davis, Patrick R. Amestoy, and Iain S. Duff. 11 | 12 | % This orders the same matrix as the ANSI C demo, amd_demo.c. It includes an 13 | 14 | amd_make 15 | addpath (pwd) 16 | fprintf ('\nThe following path has been added. You may wish to add it\n') ; 17 | fprintf ('permanently, using the MATLAB pathtool command.\n') ; 18 | fprintf ('%s\n\n', pwd) ; 19 | amd_demo 20 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/MATLAB/amd_make.m: -------------------------------------------------------------------------------- 1 | function amd_make 2 | %AMD_MAKE to compile amd2 for use in MATLAB 3 | % 4 | % Example: 5 | % amd_make 6 | % 7 | % See also amd, amd2. 8 | 9 | % Copyright 1994-2007, Tim Davis, Patrick R. Amestoy, and Iain S. Duff. 10 | 11 | details = 0 ; % 1 if details of each command are to be printed 12 | 13 | d = '' ; 14 | if (~isempty (strfind (computer, '64'))) 15 | d = '-largeArrayDims' ; 16 | end 17 | 18 | i = sprintf ('-I../Include -I../../SuiteSparse_config') ; 19 | cmd = sprintf ('mex -O %s -DDLONG -output amd2 %s amd_mex.c', d, i) ; 20 | files = {'amd_order', 'amd_dump', 'amd_postorder', 'amd_post_tree', ... 21 | 'amd_aat', 'amd_2', 'amd_1', 'amd_defaults', 'amd_control', ... 22 | 'amd_info', 'amd_valid', 'amd_global', 'amd_preprocess' } ; 23 | for i = 1 : length (files) 24 | cmd = sprintf ('%s ../Source/%s.c', cmd, files {i}) ; 25 | end 26 | if (details) 27 | fprintf ('%s\n', cmd) ; 28 | end 29 | eval (cmd) ; 30 | 31 | fprintf ('AMD successfully compiled.\n') ; 32 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/AMD/Source/amd_defaults.c: -------------------------------------------------------------------------------- 1 | /* ========================================================================= */ 2 | /* === AMD_defaults ======================================================== */ 3 | /* ========================================================================= */ 4 | 5 | /* ------------------------------------------------------------------------- */ 6 | /* AMD, Copyright (c) Timothy A. Davis, */ 7 | /* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ 8 | /* email: DrTimothyAldenDavis@gmail.com */ 9 | /* ------------------------------------------------------------------------- */ 10 | 11 | /* User-callable. Sets default control parameters for AMD. See amd.h 12 | * for details. 13 | */ 14 | 15 | #include "amd_internal.h" 16 | 17 | /* ========================================================================= */ 18 | /* === AMD defaults ======================================================== */ 19 | /* ========================================================================= */ 20 | 21 | GLOBAL void AMD_defaults 22 | ( 23 | double Control [ ] 24 | ) 25 | { 26 | Int i ; 27 | 28 | if (Control != (double *) NULL) 29 | { 30 | for (i = 0 ; i < AMD_CONTROL ; i++) 31 | { 32 | Control [i] = 0 ; 33 | } 34 | Control [AMD_DENSE] = AMD_DEFAULT_DENSE ; 35 | Control [AMD_AGGRESSIVE] = AMD_DEFAULT_AGGRESSIVE ; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Demo/ldllsimple.out: -------------------------------------------------------------------------------- 1 | Nonzeros in L, excluding diagonal: 13 2 | x [0] = 0.1 3 | x [1] = 0.2 4 | x [2] = 0.3 5 | x [3] = 0.4 6 | x [4] = 0.5 7 | x [5] = 0.6 8 | x [6] = 0.7 9 | x [7] = 0.8 10 | x [8] = 0.9 11 | x [9] = 1 12 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Demo/ldlsimple.out: -------------------------------------------------------------------------------- 1 | Nonzeros in L, excluding diagonal: 13 2 | x [0] = 0.1 3 | x [1] = 0.2 4 | x [2] = 0.3 5 | x [3] = 0.4 6 | x [4] = 0.5 7 | x [5] = 0.6 8 | x [6] = 0.7 9 | x [7] = 0.8 10 | x [8] = 0.9 11 | x [9] = 1 12 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Doc/ChangeLog: -------------------------------------------------------------------------------- 1 | Jun 1, 2012: version 2.1.0 2 | 3 | * UFconfig replaced with SuiteSparse_config 4 | 5 | Dec 7, 2011: version 2.0.4 6 | 7 | * fixed the Makefile to better align with CFLAGS and other standards 8 | * modified the demo program to check for errors in input test matrices 9 | 10 | Jan 25, 2011: version 2.0.3 11 | 12 | * minor fix to "make install" 13 | 14 | Nov 30, 2009: version 2.0.2 15 | 16 | * added "make install" and "make uninstall" 17 | 18 | May 31, 2007: version 2.0.0 19 | 20 | * C-callable 64-bit version added 21 | 22 | * ported to 64-bit MATLAB 23 | 24 | * subdirectories added (Source/, Include/, Lib/, Demo/, Doc/, MATLAB/) 25 | 26 | Dec 12, 2006: version 1.3.4 27 | 28 | * minor MATLAB cleanup 29 | 30 | Sept 11, 2006: version 1.3.1 31 | 32 | * The ldl m-file renamed to ldlsparse, to avoid name conflict with the 33 | new MATLAB ldl function (in MATLAB 7.3). 34 | 35 | Apr 30, 2006: version 1.3 36 | 37 | * requires AMD v2.0. ldlmain.c demo program modified, since AMD can now 38 | handle jumbled matrices. Minor change to Makefile. 39 | 40 | Aug 30, 2005: 41 | 42 | * Makefile changed to use ../UFconfig/UFconfig.mk. License changed to 43 | GNU LGPL. 44 | 45 | July 4, 2005: 46 | 47 | * user guide added. Since no changes to the code were made, 48 | the version number (1.1) and code release date (Apr 22, 2005) 49 | were left unchanged. 50 | 51 | Apr. 22, 2005: LDL v1.1 released. 52 | 53 | * No real changes were made. The code was revised so 54 | that each routine fits on a single page in the documentation. 55 | 56 | Dec 31, 2003: LDL v1.0 released. 57 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Doc/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Makefile for the LDL documentation 3 | #------------------------------------------------------------------------------- 4 | 5 | default: ldl_userguide.pdf 6 | 7 | include ../../SuiteSparse_config/SuiteSparse_config.mk 8 | 9 | #------------------------------------------------------------------------------- 10 | # clean-up: 11 | #------------------------------------------------------------------------------- 12 | 13 | distclean: purge 14 | 15 | purge: clean 16 | - $(RM) *.dvi *.aux *.log *.bak *.bbl *.blg *.ps 17 | 18 | clean: 19 | - $(RM) $(CLEAN) 20 | 21 | #------------------------------------------------------------------------------- 22 | # user guide: 23 | #------------------------------------------------------------------------------- 24 | 25 | ldl_userguide.pdf: ldl_userguide.tex ldl.bib 26 | latex ldl_userguide 27 | - bibtex ldl_userguide 28 | latex ldl_userguide 29 | latex ldl_userguide 30 | dvips ldl_userguide -o ldl_userguide.ps 31 | pdflatex ldl_userguide 32 | pdflatex ldl_userguide 33 | - $(RM) *.dvi *.aux *.log *.bak *.bbl *.blg *.ps 34 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Doc/ldl_userguide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/LDL/Doc/ldl_userguide.pdf -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Lib/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Makefile for the LDL library 3 | #------------------------------------------------------------------------------- 4 | 5 | default: all 6 | 7 | include ../../SuiteSparse_config/SuiteSparse_config.mk 8 | 9 | I = -I../../SuiteSparse_config -I../Include 10 | 11 | C = $(CC) $(CF) $(I) 12 | 13 | all: libldl.a 14 | 15 | #------------------------------------------------------------------------------- 16 | # the ldl library: 17 | #------------------------------------------------------------------------------- 18 | 19 | libldl.a: ../Source/ldl.c ../Include/ldl.h 20 | $(C) -c ../Source/ldl.c -o ldl.o 21 | $(C) -DLDL_LONG -c ../Source/ldl.c -o ldll.o 22 | $(ARCHIVE) libldl.a ldl.o ldll.o 23 | - $(RANLIB) libldl.a 24 | 25 | distclean: purge 26 | 27 | purge: clean 28 | - $(RM) libldl.a 29 | 30 | clean: 31 | - $(RM) $(CLEAN) 32 | 33 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/Contents1.m: -------------------------------------------------------------------------------- 1 | % LDL package: simple sparse LDL factorization 2 | % 3 | % Primary routines: 4 | % 5 | % ldlsparse - LDL' factorization of a real, sparse, symmetric matrix 6 | % ldlsymbol - symbolic Cholesky factorization 7 | % 8 | % Helper routines: 9 | % 10 | % ldldemo - demo program for LDL 11 | % ldlrow - an m-file description of the algorithm used by LDL 12 | % ldltest - test program for LDL 13 | % ldlmain2 - compiles and runs a longer test program for LDL 14 | % ldl_install - compile and install the LDL package for use in MATLAB. 15 | % ldl_make - compile LDL 16 | % 17 | % Example: 18 | % 19 | % [L, D, Parent, fl] = ldlsparse (A) 20 | 21 | % Copyright 2006-2007 by Timothy A. Davis, http://www.suitesparse.com 22 | 23 | % LDL License: GNU Lesser General Public License as published by the 24 | % Free Software Foundation; either version 2.1 of the License, or 25 | % (at your option) any later version. 26 | % 27 | % Acknowledgements: 28 | % 29 | % This work was supported by the National Science Foundation, under 30 | % grant CCR-0203270. 31 | % 32 | % Portions of this work were done while on sabbatical at Stanford University 33 | % and Lawrence Berkeley National Laboratory (with funding from the SciDAC 34 | % program). I would like to thank Gene Golub, Esmond Ng, and Horst Simon 35 | % for making this sabbatical possible. 36 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldl_install.m: -------------------------------------------------------------------------------- 1 | function ldl_install 2 | %LDL_INSTALL compile and install the LDL package for use in MATLAB. 3 | % Your current working directory must be LDL for this function to work. 4 | % 5 | % Example: 6 | % ldl_install 7 | % 8 | % See also ldlsparse, ldlsymbol 9 | 10 | % Copyright 2006-2007 by Timothy A. Davis, http://www.suitesparse.com 11 | 12 | ldl_make 13 | addpath (pwd) ; 14 | fprintf ('LDL has been compiled and installed. The path:\n') ; 15 | disp (pwd) ; 16 | fprintf ('has been added to your path. Use pathtool to add it permanently.\n'); 17 | ldldemo 18 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldl_make.m: -------------------------------------------------------------------------------- 1 | function ldl_make 2 | %LDL_MAKE compile LDL 3 | % 4 | % Example: 5 | % ldl_make % compiles ldlsparse and ldlsymbol 6 | % 7 | % See also ldlsparse, ldlsymbol 8 | 9 | % Copyright 2006-2007 by Timothy A. Davis, http://www.suitesparse.com 10 | 11 | d = '' ; 12 | if (~isempty (strfind (computer, '64'))) 13 | d = '-largeArrayDims' ; 14 | end 15 | eval (sprintf ('mex -O %s -DLDL_LONG -I../../SuiteSparse_config -I../Include -output ldlsparse ../Source/ldl.c ldlmex.c', d)) ; 16 | eval (sprintf ('mex -O %s -DLDL_LONG -I../../SuiteSparse_config -I../Include -output ldlsymbol ../Source/ldl.c ldlsymbolmex.c', d)) ; 17 | 18 | eval (sprintf ('mex -O %s -DLDL_LONG -I../../SuiteSparse_config -I../Include -output ldlsparse_short ../Source/ldl.c ldlmex_short.c', d)) ; 19 | eval (sprintf ('mex -O %s -DLDL_LONG -I../../SuiteSparse_config -I../Include -output ldlsymbol_extra ../Source/ldl.c ldlsymbol_extra.c', d)) ; 20 | eval (sprintf ('mex -O %s -DLDL_LONG -I../../SuiteSparse_config -I../Include -output ldlnumeric ../Source/ldl.c ldlnumericmex.c', d)) ; 21 | fprintf ('LDL successfully compiled.\n') ; 22 | 23 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlmain2.m: -------------------------------------------------------------------------------- 1 | function ldlmain2 2 | %LDLMAIN2 compiles and runs a longer test program for LDL 3 | % 4 | % Example: 5 | % ldlmain2 6 | % 7 | % See also ldlsparse. 8 | 9 | % Copyright 2006-2007 by Timothy A. Davis, http://www.suitesparse.com 10 | 11 | help ldlmain2 12 | 13 | detail = 0 ; 14 | 15 | ldl_make 16 | 17 | d = '' ; 18 | if (~isempty (strfind (computer, '64'))) 19 | d = '-largeArrayDims' ; 20 | end 21 | 22 | mx = sprintf (... 23 | 'mex -O %s -DLDL_LONG -DDLONG -I../../SuiteSparse_config -I../Include', d) ; 24 | 25 | % compile ldlmain without AMD 26 | cmd = sprintf ('%s ../Demo/ldlmain.c ../Source/ldl.c', mx) ; 27 | if (detail) 28 | fprintf ('%s\n', cmd) ; 29 | end 30 | eval (cmd) ; 31 | ldlmain 32 | 33 | % compile ldlamd (ldlmain with AMD) 34 | cmd = sprintf ('%s -I../../AMD/Include', mx) ; 35 | 36 | files = {'amd_order', 'amd_dump', 'amd_postorder', 'amd_post_tree', ... 37 | 'amd_aat', 'amd_2', 'amd_1', 'amd_defaults', 'amd_control', ... 38 | 'amd_info', 'amd_valid', 'amd_global', 'amd_preprocess' } ; 39 | for i = 1 : length (files) 40 | cmd = sprintf ('%s ../../AMD/Source/%s.c', cmd, files {i}) ; 41 | end 42 | 43 | cmd = [cmd ' -DUSE_AMD -output ldlamd ../Demo/ldlmain.c ../Source/ldl.c'] ; 44 | if (detail) 45 | fprintf ('%s\n', cmd) ; 46 | end 47 | eval (cmd) ; 48 | ldlamd 49 | 50 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlnumeric.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/LDL/MATLAB/ldlnumeric.mexw64 -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlsparse.m: -------------------------------------------------------------------------------- 1 | function [arg1, arg2, arg3, arg4] = ldlsparse (A, P, b) %#ok 2 | %LDLSPARSE LDL' factorization of a real, sparse, symmetric matrix 3 | % 4 | % Example: 5 | % [L, D, Parent, fl] = ldlsparse (A) 6 | % [L, D, Parent, fl] = ldlsparse (A, P) 7 | % [x, fl] = ldlsparse (A, [ ], b) 8 | % [x, fl] = ldlsparse (A, P, b) 9 | % 10 | % Let I = speye (size (A,1)). The factorization is (L+I)*D*(L+I)' = A or A(P,P). 11 | % A must be sparse, square, and real. Only the diagonal and upper triangular 12 | % part of A or A(P,P) are accessed. L is lower triangular with unit diagonal, 13 | % but the diagonal is not returned. D is a diagonal sparse matrix. P is either 14 | % a permutation of 1:n, or an empty vector, where n = size (A,1). If not 15 | % present, or empty, then P=1:n is assumed. Parent is the elimination tree of 16 | % A or A(P,P). If positive, fl is the floating point operation count, or 17 | % negative if any entry on the diagonal of D is zero. 18 | % 19 | % In the x = ldlsparse (A, P, b) usage, the LDL' factorization is not returned. 20 | % Instead, the system A*x=b is solved for x, where both b and x are dense. 21 | % 22 | % If a zero entry on the diagonal of D is encountered, the LDL' factorization is 23 | % terminated at that point. If there is no fl output argument, an error occurs. 24 | % Otherwise, fl is negative, and let d=-fl. D(d,d) is the first zero entry on 25 | % the diagonal of D. A partial factorization is returned. Let B = A, or A(P,P) 26 | % if P is present. Let F = (L+I)*D*(L+I)'. Then F (1:d,1:d) = B (1:d,1:d). 27 | % Rows d+1 to n of L and D are all zero. 28 | % 29 | % See also chol, ldl, ldlsymbol, symbfact, etree 30 | 31 | % Copyright 2006-2007 by Timothy A. Davis, http://www.suitesparse.com 32 | 33 | error ('ldlsparse mexFunction not found') ; 34 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlsparse.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/LDL/MATLAB/ldlsparse.mexw64 -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlsparse_short.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/LDL/MATLAB/ldlsparse_short.mexw64 -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlsymbol.m: -------------------------------------------------------------------------------- 1 | function [Lnz, Parent, fl] = ldlsymbol (A, P) %#ok 2 | %LDLSYMBOL symbolic Cholesky factorization 3 | % 4 | % Example: 5 | % [Lnz, Parent, fl] = ldlsymbol (A) 6 | % [Lnz, Parent, fl] = ldlsymbol (A, P) 7 | % 8 | % P is a permutation of 1:n, an output of AMD, SYMAMD, or SYMRCM, for example. 9 | % Only the diagonal and upper triangular part of A or A(P,P) is accessed; the 10 | % lower triangular part is ignored. If P is not provided, then P = 1:n is 11 | % assumed. 12 | % 13 | % The elimination tree is returned in the Parent array. The number of nonzeros 14 | % in each column of L is returned in Lnz. fl is the floating point operation 15 | % count for a subsequent LDL' factorization. This mexFunction replicates the 16 | % following MATLAB computations, using ldl_symbolic: 17 | % 18 | % Lnz = symbfact (A) - 1 ; 19 | % Parent = etree (A) ; 20 | % fl = sum (Lnz .* (Lnz + 2)) ; 21 | % 22 | % or, if P is provided, 23 | % 24 | % Lnz = symbfact (A (P,P)) - 1 ; 25 | % Parent = etree (A (P,P)) ; 26 | % fl = sum (Lnz .* (Lnz + 2)) ; 27 | % 28 | % Note that this routine is not required by LDL, since LDL does its own 29 | % symbolic factorization. 30 | % 31 | % See also ldlsparse, symbfact, etree 32 | 33 | % Copyright 2006-2007 by Timothy A. Davis, http://www.suitesparse.com 34 | 35 | error ('ldlsymbol mexFunction not found') ; 36 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlsymbol.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/LDL/MATLAB/ldlsymbol.mexw64 -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldlsymbol_extra.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/LDL/LDL/MATLAB/ldlsymbol_extra.mexw64 -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/MATLAB/ldltest.out: -------------------------------------------------------------------------------- 1 | ldltest 2 | LDLSPARSE LDL' factorization of a real, sparse, symmetric matrix 3 | 4 | Example: 5 | [L, D, Parent, fl] = ldlsparse (A) 6 | [L, D, Parent, fl] = ldlsparse (A, P) 7 | [x, fl] = ldlsparse (A, [ ], b) 8 | [x, fl] = ldlsparse (A, P, b) 9 | 10 | Let I = speye (size (A,1)). The factorization is (L+I)*D*(L+I)' = A or A(P,P). 11 | A must be sparse, square, and real. Only the diagonal and upper triangular 12 | part of A or A(P,P) are accessed. L is lower triangular with unit diagonal, 13 | but the diagonal is not returned. D is a diagonal sparse matrix. P is either 14 | a permutation of 1:n, or an empty vector, where n = size (A,1). If not 15 | present, or empty, then P=1:n is assumed. Parent is the elimination tree of 16 | A or A(P,P). If positive, fl is the floating point operation count, or 17 | negative if any entry on the diagonal of D is zero. 18 | 19 | In the x = ldlsparse (A, P, b) usage, the LDL' factorization is not returned. 20 | Instead, the system A*x=b is solved for x, where both b and x are dense. 21 | 22 | If a zero entry on the diagonal of D is encountered, the LDL' factorization is 23 | terminated at that point. If there is no fl output argument, an error occurs. 24 | Otherwise, fl is negative, and let d=-fl. D(d,d) is the first zero entry on 25 | the diagonal of D. A partial factorization is returned. Let B = A, or A(P,P) 26 | if P is present. Let F = (L+I)*D*(L+I)'. Then F (1:d,1:d) = B (1:d,1:d). 27 | Rows d+1 to n of L and D are all zero. 28 | 29 | See also chol, ldl, ldlsymbol, symbfact, etree 30 | 31 | err: 4.44089e-16 fl: 61 32 | err: 4.44089e-16 33 | err: 4.44089e-16 34 | err: 0 35 | err: 5.68989e-16 36 | err: 5.68989e-16 fl: 123 37 | err: 4.57967e-16 fl: 57 38 | err: 4.57967e-16 39 | err: 4.57967e-16 40 | err: 0 41 | err: 6.36644e-16 42 | err: 6.36644e-16 fl: 119 43 | 44 | ldl: all tests passed 45 | diary off 46 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # LDL Makefile 3 | #------------------------------------------------------------------------------ 4 | 5 | VERSION = 2.1.0 6 | 7 | default: all 8 | 9 | include ../SuiteSparse_config/SuiteSparse_config.mk 10 | 11 | demos: all 12 | 13 | # Compile all C code, including the C-callable routine. 14 | all: 15 | ( cd Lib ; $(MAKE) ) 16 | ( cd Demo ; $(MAKE) ) 17 | 18 | # compile just the C-callable libraries (not Demos) 19 | library: 20 | ( cd Lib ; $(MAKE) ) 21 | 22 | # remove object files, but keep the compiled programs and library archives 23 | clean: 24 | ( cd Lib ; $(MAKE) clean ) 25 | ( cd Demo ; $(MAKE) clean ) 26 | ( cd Doc ; $(MAKE) clean ) 27 | ( cd MATLAB ; $(RM) $(CLEAN) ) 28 | 29 | # clean, and then remove compiled programs and library archives 30 | purge: 31 | ( cd Lib ; $(MAKE) purge ) 32 | ( cd Demo ; $(MAKE) purge ) 33 | ( cd Doc ; $(MAKE) purge ) 34 | ( cd MATLAB ; $(RM) $(CLEAN) *.mex* ) 35 | 36 | distclean: purge 37 | 38 | # create PDF documents for the original distribution 39 | docs: 40 | ( cd Doc ; $(MAKE) ) 41 | 42 | # get ready for distribution 43 | dist: purge 44 | ( cd Demo ; $(MAKE) dist ) 45 | ( cd Doc ; $(MAKE) ) 46 | 47 | ccode: library 48 | 49 | lib: library 50 | 51 | # install LDL 52 | install: 53 | $(CP) Lib/libldl.a $(INSTALL_LIB)/libldl.$(VERSION).a 54 | ( cd $(INSTALL_LIB) ; ln -sf libldl.$(VERSION).a libldl.a ) 55 | $(CP) Include/ldl.h $(INSTALL_INCLUDE) 56 | chmod 644 $(INSTALL_LIB)/libldl*.a 57 | chmod 644 $(INSTALL_INCLUDE)/ldl.h 58 | 59 | # uninstall LDL 60 | uninstall: 61 | $(RM) $(INSTALL_LIB)/libldl*.a 62 | $(RM) $(INSTALL_INCLUDE)/ldl.h 63 | 64 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A01: -------------------------------------------------------------------------------- 1 | name: Dense/0 n: 0 entries: 0 2 | 0 0 3 | 0 4 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A02: -------------------------------------------------------------------------------- 1 | name: Dense/0 n: 0 entries: 0 (jumbled version) 2 | 0 1 3 | 0 4 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A03: -------------------------------------------------------------------------------- 1 | name: Dense/1 n: 1 entries: 1 2 | 1 0 3 | 0 4 | 1 5 | 0 6 | 1.90275 7 | 0 8 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A04: -------------------------------------------------------------------------------- 1 | name: Dense/1 n: 1 entries: 2 (jumbled version) 2 | 1 1 3 | 0 4 | 2 5 | 0 6 | 0 7 | 1.90275 8 | 0.606843 9 | 0 10 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A05: -------------------------------------------------------------------------------- 1 | name: Dense/2 n: 2 entries: 4 2 | 2 0 3 | 0 4 | 2 5 | 4 6 | 0 7 | 1 8 | 0 9 | 1 10 | 1.78915 11 | 0.389047 12 | 0.389047 13 | 1.67505 14 | 0 15 | 1 16 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A06: -------------------------------------------------------------------------------- 1 | name: Dense/2 n: 2 entries: 5 (jumbled version) 2 | 2 1 3 | 0 4 | 3 5 | 5 6 | 0 7 | 1 8 | 0 9 | 1 10 | 0 11 | 1.78915 12 | 0.389047 13 | 0.738207 14 | 1.67505 15 | 0.389047 16 | 0 17 | 1 18 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A07: -------------------------------------------------------------------------------- 1 | name: Dense/3 n: 3 entries: 9 2 | 3 0 3 | 0 4 | 3 5 | 6 6 | 9 7 | 0 8 | 1 9 | 2 10 | 0 11 | 1 12 | 2 13 | 0 14 | 1 15 | 2 16 | 1.92648 17 | 0.776267 18 | 0.405764 19 | 0.776267 20 | 1.68063 21 | 0.250703 22 | 0.405764 23 | 0.250703 24 | 1.44517 25 | 0 26 | 1 27 | 2 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A08: -------------------------------------------------------------------------------- 1 | name: Dense/3 n: 3 entries: 11 (jumbled version) 2 | 3 1 3 | 0 4 | 4 5 | 7 6 | 11 7 | 2 8 | 0 9 | 1 10 | 2 11 | 1 12 | 0 13 | 2 14 | 0 15 | 2 16 | 0 17 | 1 18 | 0.262576 19 | 1.92648 20 | 0.776267 21 | 0.405764 22 | 1.68063 23 | 0.776267 24 | 0.250703 25 | 0.262576 26 | 1.44517 27 | 0.405764 28 | 0.250703 29 | 0 30 | 1 31 | 2 32 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A15: -------------------------------------------------------------------------------- 1 | name: HB/bcsstm01 n: 48 entries: 24 2 | 48 0 3 | 0 4 | 1 5 | 2 6 | 3 7 | 3 8 | 3 9 | 3 10 | 4 11 | 5 12 | 6 13 | 6 14 | 6 15 | 6 16 | 7 17 | 8 18 | 9 19 | 9 20 | 9 21 | 9 22 | 10 23 | 11 24 | 12 25 | 12 26 | 12 27 | 12 28 | 13 29 | 14 30 | 15 31 | 15 32 | 15 33 | 15 34 | 16 35 | 17 36 | 18 37 | 18 38 | 18 39 | 18 40 | 19 41 | 20 42 | 21 43 | 21 44 | 21 45 | 21 46 | 22 47 | 23 48 | 24 49 | 24 50 | 24 51 | 24 52 | 0 53 | 1 54 | 2 55 | 6 56 | 7 57 | 8 58 | 12 59 | 13 60 | 14 61 | 18 62 | 19 63 | 20 64 | 24 65 | 25 66 | 26 67 | 30 68 | 31 69 | 32 70 | 36 71 | 37 72 | 38 73 | 42 74 | 43 75 | 44 76 | 100 77 | 100 78 | 100 79 | 100 80 | 100 81 | 100 82 | 100 83 | 100 84 | 100 85 | 100 86 | 100 87 | 100 88 | 200 89 | 200 90 | 200 91 | 200 92 | 200 93 | 200 94 | 200 95 | 200 96 | 200 97 | 200 98 | 200 99 | 200 100 | 0 101 | 1 102 | 2 103 | 3 104 | 4 105 | 5 106 | 6 107 | 7 108 | 8 109 | 9 110 | 10 111 | 11 112 | 12 113 | 13 114 | 14 115 | 15 116 | 16 117 | 17 118 | 18 119 | 19 120 | 20 121 | 21 122 | 22 123 | 23 124 | 24 125 | 25 126 | 26 127 | 27 128 | 28 129 | 29 130 | 30 131 | 31 132 | 32 133 | 33 134 | 34 135 | 35 136 | 36 137 | 37 138 | 38 139 | 39 140 | 40 141 | 41 142 | 42 143 | 43 144 | 44 145 | 45 146 | 46 147 | 47 148 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A16: -------------------------------------------------------------------------------- 1 | name: HB/bcsstm01 n: 48 entries: 26 (jumbled version) 2 | 48 1 3 | 0 4 | 1 5 | 2 6 | 3 7 | 3 8 | 3 9 | 3 10 | 4 11 | 5 12 | 7 13 | 7 14 | 7 15 | 7 16 | 8 17 | 9 18 | 10 19 | 10 20 | 10 21 | 10 22 | 11 23 | 12 24 | 13 25 | 13 26 | 13 27 | 13 28 | 14 29 | 15 30 | 16 31 | 16 32 | 16 33 | 16 34 | 17 35 | 18 36 | 19 37 | 19 38 | 19 39 | 19 40 | 20 41 | 21 42 | 22 43 | 22 44 | 22 45 | 22 46 | 24 47 | 25 48 | 26 49 | 26 50 | 26 51 | 26 52 | 0 53 | 1 54 | 2 55 | 6 56 | 7 57 | 8 58 | 8 59 | 12 60 | 13 61 | 14 62 | 18 63 | 19 64 | 20 65 | 24 66 | 25 67 | 26 68 | 30 69 | 31 70 | 32 71 | 36 72 | 37 73 | 38 74 | 42 75 | 42 76 | 43 77 | 44 78 | 100 79 | 100 80 | 100 81 | 100 82 | 100 83 | 100 84 | 0.700744 85 | 100 86 | 100 87 | 100 88 | 100 89 | 100 90 | 100 91 | 200 92 | 200 93 | 200 94 | 200 95 | 200 96 | 200 97 | 200 98 | 200 99 | 200 100 | 200 101 | 0.803129 102 | 200 103 | 200 104 | 0 105 | 1 106 | 2 107 | 3 108 | 4 109 | 5 110 | 6 111 | 7 112 | 8 113 | 9 114 | 10 115 | 11 116 | 12 117 | 13 118 | 14 119 | 15 120 | 16 121 | 17 122 | 18 123 | 19 124 | 20 125 | 21 126 | 22 127 | 23 128 | 24 129 | 25 130 | 26 131 | 27 132 | 28 133 | 29 134 | 30 135 | 31 136 | 32 137 | 33 138 | 34 139 | 35 140 | 36 141 | 37 142 | 38 143 | 39 144 | 40 145 | 41 146 | 42 147 | 43 148 | 44 149 | 45 150 | 46 151 | 47 152 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A25: -------------------------------------------------------------------------------- 1 | name: Dense/0 n: 0 entries: 0 (invalid matrix, Ap [0] = 1) 2 | 0 0 3 | 1 4 | 0 5 | 0 6 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A26: -------------------------------------------------------------------------------- 1 | name: Dense/2 n: 2 entries: 4 (invalid perm, P[1]=99) 2 | 2 0 3 | 0 4 | 2 5 | 4 6 | 0 7 | 1 8 | 0 9 | 1 10 | 1.78915 11 | 0.389047 12 | 0.389047 13 | 1.67505 14 | 0 15 | 99 16 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A27: -------------------------------------------------------------------------------- 1 | name: Dense/3 n: 3 entries: 9 (invalid perm) 2 | 3 0 3 | 0 4 | 3 5 | 6 6 | 9 7 | 0 8 | 1 9 | 2 10 | 0 11 | 1 12 | 2 13 | 0 14 | 1 15 | 2 16 | 1.92648 17 | 0.776267 18 | 0.405764 19 | 0.776267 20 | 1.68063 21 | 0.250703 22 | 0.405764 23 | 0.250703 24 | 1.44517 25 | 0 26 | 1 27 | 1 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A28: -------------------------------------------------------------------------------- 1 | name: Dense/3 n: 3 entries: 9 (invalid Ap) 2 | 3 0 3 | 0 4 | 3 5 | 2 6 | 9 7 | 0 8 | 1 9 | 2 10 | 0 11 | 1 12 | 2 13 | 0 14 | 1 15 | 2 16 | 1.92648 17 | 0.776267 18 | 0.405764 19 | 0.776267 20 | 1.68063 21 | 0.250703 22 | 0.405764 23 | 0.250703 24 | 1.44517 25 | 0 26 | 1 27 | 2 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A29: -------------------------------------------------------------------------------- 1 | name: Dense/3 n: 3 entries: 9 (invalid Ai) 2 | 3 0 3 | 0 4 | 3 5 | 6 6 | 9 7 | 0 8 | 1 9 | 3 10 | 0 11 | 1 12 | 2 13 | 0 14 | 1 15 | 2 16 | 1.92648 17 | 0.776267 18 | 0.405764 19 | 0.776267 20 | 1.68063 21 | 0.250703 22 | 0.405764 23 | 0.250703 24 | 1.44517 25 | 0 26 | 1 27 | 2 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/LDL/Matrix/A30: -------------------------------------------------------------------------------- 1 | name: Dense/3 n: 3 entries: 9 (invalid Ai) 2 | 3 0 3 | 0 4 | 3 5 | 6 6 | 9 7 | 0 8 | -1 9 | 2 10 | 0 11 | 1 12 | 2 13 | 0 14 | 1 15 | 2 16 | 1.92648 17 | 0.776267 18 | 0.405764 19 | 0.776267 20 | 1.68063 21 | 0.250703 22 | 0.405764 23 | 0.250703 24 | 1.44517 25 | 0 26 | 1 27 | 2 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/SuiteSparse_config/Makefile: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # SuiteSparse_config Makefile 3 | #------------------------------------------------------------------------------- 4 | 5 | VERSION = 4.0.2 6 | 7 | default: ccode 8 | 9 | include SuiteSparse_config.mk 10 | 11 | ccode: libsuitesparseconfig.a 12 | 13 | all: libsuitesparseconfig.a 14 | 15 | library: libsuitesparseconfig.a 16 | 17 | libsuitesparseconfig.a: SuiteSparse_config.c SuiteSparse_config.h 18 | $(CC) $(CF) -c SuiteSparse_config.c 19 | $(ARCHIVE) libsuitesparseconfig.a SuiteSparse_config.o 20 | $(RANLIB) libsuitesparseconfig.a 21 | - $(RM) SuiteSparse_config.o 22 | 23 | distclean: purge 24 | 25 | purge: clean 26 | - $(RM) *.o *.a 27 | 28 | clean: 29 | - $(RM) -r $(CLEAN) 30 | 31 | # install SuiteSparse_config 32 | install: 33 | $(CP) libsuitesparseconfig.a $(INSTALL_LIB)/libsuitesparseconfig.$(VERSION).a 34 | ( cd $(INSTALL_LIB) ; ln -sf libsuitesparseconfig.$(VERSION).a libsuitesparseconfig.a ) 35 | $(CP) SuiteSparse_config.h $(INSTALL_INCLUDE) 36 | chmod 644 $(INSTALL_LIB)/libsuitesparseconfig*.a 37 | chmod 644 $(INSTALL_INCLUDE)/SuiteSparse_config.h 38 | 39 | # uninstall SuiteSparse_config 40 | uninstall: 41 | $(RM) $(INSTALL_LIB)/libsuitesparseconfig*.a 42 | $(RM) $(INSTALL_INCLUDE)/SuiteSparse_config.h 43 | 44 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/SuiteSparse_config/xerbla/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for null-output xerbla 2 | 3 | default: ccode 4 | 5 | include ../SuiteSparse_config.mk 6 | 7 | ccode: libcerbla.a 8 | 9 | fortran: libxerbla.a 10 | 11 | all: libxerbla.a libcerbla.a 12 | 13 | # Fortran version: 14 | libxerbla.a: xerbla.f 15 | $(F77) $(F77FLAGS) -c xerbla.f 16 | $(ARCHIVE) libxerbla.a xerbla.o 17 | - $(RANLIB) libxerbla.a 18 | - $(RM) xerbla.o 19 | 20 | # C version: 21 | libcerbla.a: xerbla.c xerbla.h 22 | $(CC) $(CF) -c xerbla.c 23 | $(ARCHIVE) libcerbla.a xerbla.o 24 | - $(RANLIB) libcerbla.a 25 | - $(RM) xerbla.o 26 | 27 | distclean: purge 28 | 29 | purge: clean 30 | - $(RM) *.o *.a 31 | 32 | clean: 33 | - $(RM) $(CLEAN) 34 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/SuiteSparse_config/xerbla/xerbla.c: -------------------------------------------------------------------------------- 1 | 2 | void xerbla_ (char *srname, int *info) 3 | { 4 | /* do nothing */ ; 5 | } 6 | 7 | 8 | void xerbla (char *srname, int *info) 9 | { 10 | /* do nothing */ ; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/SuiteSparse_config/xerbla/xerbla.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE XERBLA( SRNAME, INFO ) 2 | * 3 | * -- LAPACK auxiliary routine (version 3.0) -- 4 | * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., 5 | * Courant Institute, Argonne National Lab, and Rice University 6 | * September 30, 1994 7 | * 8 | * .. Scalar Arguments .. 9 | CHARACTER*6 SRNAME 10 | INTEGER INFO 11 | * .. 12 | * 13 | * Purpose 14 | * ======= 15 | * 16 | * XERBLA is an error handler for the LAPACK routines. 17 | * It is called by an LAPACK routine if an input parameter has an 18 | * invalid value. A message is printed and execution stops. 19 | * 20 | * Installers may consider modifying the STOP statement in order to 21 | * call system-specific exception-handling facilities. 22 | * 23 | * Arguments 24 | * ========= 25 | * 26 | * SRNAME (input) CHARACTER*6 27 | * The name of the routine which called XERBLA. 28 | * 29 | * INFO (input) INTEGER 30 | * The position of the invalid parameter in the parameter list 31 | * of the calling routine. 32 | * 33 | * ===================================================================== 34 | * 35 | * .. Executable Statements .. 36 | * 37 | ***** WRITE( *, FMT = 9999 )SRNAME, INFO 38 | * 39 | ***** STOP 40 | * 41 | ***** 9999 FORMAT( ' ** On entry to ', A6, ' parameter number ', I2, ' had ', 42 | ***** $ 'an illegal value' ) 43 | * 44 | * End of XERBLA 45 | * 46 | END 47 | -------------------------------------------------------------------------------- /gspbox/3rdparty/LDL/SuiteSparse_config/xerbla/xerbla.h: -------------------------------------------------------------------------------- 1 | void xerbla_ (char *srname, int *info) ; 2 | void xerbla (char *srname, int *info) ; 3 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/COPYING: -------------------------------------------------------------------------------- 1 | Recursive Zonal Equal Area (EQ) Sphere Partitioning Toolbox. 2 | Release 1.10 2005-06-26 3 | COPYING 4 | 5 | For references, see AUTHORS. 6 | For revision history, see CHANGELOG. 7 | 8 | Copyright (c) 2004, 2005, University of New South Wales 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining 11 | a copy of this software and associated documentation files (the 12 | "Software"), to deal in the Software without restriction, including 13 | without limitation the rights to use, copy, modify, merge, publish, 14 | distribute, sublicense, and/or sell copies of the Software, and to 15 | permit persons to whom the Software is furnished to do so, subject to 16 | the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included 19 | in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_illustrations/Contents.m: -------------------------------------------------------------------------------- 1 | %Recursive Zonal Equal Area Sphere Partitioning: Illustrations 2 | % 3 | % Recursive Zonal Equal Area (EQ) Sphere Partitioning Toolbox. 4 | % Release 1.10 2005-06-01 5 | % 6 | %Functions by category 7 | %===================== 8 | % 9 | % Illustration of EQ Partitions of S^2 or S^3 10 | % show_s2_partition 3D illustration of an EQ partition of S^2 11 | % project_s2_partition Use projection to illustrate an EQ partition of S^2 12 | % project_s3_partition Use projection to illustrate an EQ partition of S^3 13 | % 14 | % Illustration of point sets on S^2 or S^3 15 | % show_r3_point_set 3D illustration of a point set 16 | % project_point_set Use projection to illustrate a point set of 17 | % S^2 or S^3 18 | % 19 | % Illustration options 20 | % illustration_options Options for illustrations of EQ partitions 21 | 22 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 23 | % $Revision 1.10 $ $Date 2005-06-01 $ 24 | % Documentation files renamed 25 | % $Revision 1.00 $ $Date 2005-02-13 $ 26 | % 27 | % For licensing, see COPYING. 28 | % For references, see AUTHORS. 29 | % For revision history, see CHANGELOG. 30 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_illustrations/private/show_s2_sphere.m: -------------------------------------------------------------------------------- 1 | function show_s2_sphere 2 | %SHOW_S2_SPHERE Illustrate the unit sphere S^2 3 | % 4 | %Syntax 5 | % show_s2_sphere 6 | 7 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 8 | % $Revision 1.10 $ $Date 2005-06-01 $ 9 | % Documentation files renamed 10 | % $Revision 1.00 $ $Date 2005-02-12 $ 11 | % 12 | % For licensing, see COPYING. 13 | % For references, see AUTHORS. 14 | % For revision history, see CHANGELOG. 15 | 16 | [X,Y,Z] = sphere(90); 17 | surf(X,Y,Z,zeros(size(Z)),... 18 | 'FaceColor','interp','FaceLighting','phong',... 19 | 'EdgeColor','none','SpecularStrength',0) 20 | axis equal 21 | grid off 22 | axis off 23 | % 24 | %end function 25 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_illustrations/private/surf_jet.m: -------------------------------------------------------------------------------- 1 | function surf_jet 2 | %SURF_JET Set up extreme color values using COLORMAP JET 3 | % 4 | %Syntax 5 | % surf_jet 6 | 7 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 8 | % $Revision 1.10 $ $Date 2005-06-01 $ 9 | % Documentation files renamed 10 | % $Revision 1.00 $ $Date 2005-02-12 $ 11 | % 12 | % For licensing, see COPYING. 13 | % For references, see AUTHORS. 14 | % For revision history, see CHANGELOG. 15 | 16 | [X,Y,Z] = sphere(2); 17 | surf(X*0,Y*0,Z*0,-ones(size(Z)),'FaceAlpha',0) 18 | hold on 19 | surf(X*0,Y*0,Z*0,ones(size(Z)),'FaceAlpha',0) 20 | hold on 21 | colormap jet 22 | axis equal 23 | grid off 24 | axis off 25 | if ~haslight(gca) 26 | camlight right 27 | end 28 | % 29 | %end function -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_illustrations/private/x2eqarea.m: -------------------------------------------------------------------------------- 1 | function result = x2eqarea(x) 2 | %X2EQUAREA Equal area projection of 3D Euclidean points 3 | % 4 | % result = x2eqarea(x); 5 | 6 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 7 | % $Revision 1.10 $ $Date 2005-06-01 $ 8 | % Documentation files renamed 9 | % $Revision 1.00 $ $Date 2005-02-12 $ 10 | % 11 | % For licensing, see COPYING. 12 | % For references, see AUTHORS. 13 | % For revision history, see CHANGELOG. 14 | 15 | dim = size(x,1)-1; 16 | theta = acos(-x(dim+1,:)); 17 | r = (area_of_cap(dim,theta)/volume_of_ball(dim)).^(1/dim); 18 | mask = (sin(theta) == 0); 19 | scale = ones(dim,1)*(r(~mask)./sin(theta(~mask))); 20 | eqarea = zeros(dim,size(x,2)); 21 | eqarea(:,~mask) = x(1:dim,~mask).*scale; 22 | mask1 = (x(dim+1,:) == 1); 23 | result = eqarea(:,~mask1); 24 | % end function 25 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_illustrations/private/x2stereo.m: -------------------------------------------------------------------------------- 1 | function result = x2stereo(x) 2 | %X2STEREO Stereographic projection of Euclidean points 3 | % 4 | % result = x2stereo(x); 5 | 6 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 7 | % $Revision 1.10 $ $Date 2005-06-01 $ 8 | % Documentation files renamed 9 | % $Revision 1.00 $ $Date 2005-02-12 $ 10 | % 11 | % For licensing, see COPYING. 12 | % For references, see AUTHORS. 13 | % For revision history, see CHANGELOG. 14 | 15 | dim = size(x,1)-1; 16 | mask = (x(dim+1,:) == 1); 17 | scale = ones(dim,1)*(1-x(dim+1,~mask)); 18 | result = x(1:dim,~mask)./scale; 19 | % end function 20 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/Contents.m: -------------------------------------------------------------------------------- 1 | %Recursive Zonal Equal Area Sphere Partitioning: EQ partitions 2 | % 3 | % Recursive Zonal Equal Area (EQ) Sphere Partitioning Toolbox. 4 | % Release 1.10 2005-06-01 5 | % 6 | %Functions by category 7 | %===================== 8 | % 9 | % Partitions 10 | % eq_caps Partition a sphere into to nested spherical caps 11 | % eq_regions Recursive zonal equal area (EQ) partition of sphere 12 | % 13 | % Point sets 14 | % eq_point_set Center points of regions of EQ partition, 15 | % in Cartesian coordinates 16 | % eq_point_set_polar Center points of regions of an EQ partition, 17 | % in spherical polar coordinates 18 | % 19 | % Partition options 20 | % partition_options Options for EQ partition 21 | % 22 | % Illustrations 23 | % illustrate_eq_algorithm Illustrate the EQ partition algorithm 24 | 25 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 26 | % $Revision 1.10 $ $Date 2005-06-01 $ 27 | % Documentation files renamed 28 | % $Revision 1.00 $ $Date 2005-02-13 $ 29 | % 30 | % For licensing, see COPYING. 31 | % For references, see AUTHORS. 32 | % For revision history, see CHANGELOG. 33 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/bot_cap_region.m: -------------------------------------------------------------------------------- 1 | function region = bot_cap_region(dim,a_cap) 2 | %BOT_CAP_REGION South polar (bottom) cap region of EQ partition 3 | % 4 | % An array of two points representing the bottom cap of radius a_cap as a region. 5 | % 6 | % region = bot_cap_region(dim,a_cap); 7 | 8 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 9 | % $Revision 1.10 $ $Date 2005-06-01 $ 10 | % Documentation files renamed 11 | % $Revision 1.00 $ $Date 2005-02-12 $ 12 | % 13 | % For licensing, see COPYING. 14 | % For references, see AUTHORS. 15 | % For revision history, see CHANGELOG. 16 | 17 | if dim == 1 18 | region = [2*pi-a_cap,2*pi]; 19 | else 20 | sphere_region_1 = sphere_region(dim-1); 21 | region = [[sphere_region_1(:,1); pi-a_cap],[sphere_region_1(:,2); pi]]; 22 | end 23 | % 24 | % end function 25 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/cap_colats.m: -------------------------------------------------------------------------------- 1 | function c_caps = cap_colats(dim,N,c_polar,n_regions) 2 | %CAP_COLATS Colatitudes of spherical caps enclosing cumulative sum of regions 3 | % 4 | % Given dim, N, c_polar and n_regions, determine c_caps, 5 | % an increasing list of colatitudes of spherical caps which enclose the same area 6 | % as that given by the cumulative sum of regions. 7 | % The number of elements is n_collars+2. 8 | % c_caps[1] is c_polar. 9 | % c_caps[n_collars+1] is Pi-c_polar. 10 | % c_caps[n_collars+2] is Pi. 11 | % 12 | % c_caps = cap_colats(dim,N,c_polar,n_regions); 13 | 14 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 15 | % $Revision 1.10 $ $Date 2005-06-01 $ 16 | % Documentation files renamed 17 | % $Revision 1.00 $ $Date 2005-02-12 $ 18 | % 19 | % For licensing, see COPYING. 20 | % For references, see AUTHORS. 21 | % For revision history, see CHANGELOG. 22 | 23 | c_caps = zeros(size(n_regions)); 24 | c_caps(1) = c_polar; 25 | ideal_region_area = area_of_ideal_region(dim,N); 26 | n_collars = size(n_regions,2)-2; 27 | subtotal_n_regions = 1; 28 | for collar_n = 1:n_collars 29 | subtotal_n_regions = subtotal_n_regions+n_regions(1+collar_n); 30 | c_caps(collar_n+1) =sradius_of_cap(dim,subtotal_n_regions*ideal_region_area); 31 | end 32 | c_caps(1+n_collars+1) = pi; 33 | 34 | % end function 35 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/centres_of_regions.m: -------------------------------------------------------------------------------- 1 | function points = centres_of_regions(regions) 2 | %CENTRES_OF_REGIONS Centre points of given regions 3 | % 4 | % points = centres_of_regions(regions); 5 | 6 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 7 | % $Revision 1.10 $ $Date 2005-06-01 $ 8 | % Documentation files renamed 9 | % $Revision 1.00 $ $Date 2005-02-12 $ 10 | % 11 | % For licensing, see COPYING. 12 | % For references, see AUTHORS. 13 | % For revision history, see CHANGELOG. 14 | 15 | tol = eps*2^5; 16 | dim = size(regions,1); 17 | N = size(regions,3); 18 | points = zeros(dim,N); 19 | top = regions(:,1,:); 20 | bot = regions(:,2,:); 21 | zero_bot = abs(bot(1,:)) < tol; 22 | bot(1,zero_bot) = 2*pi; 23 | equal_bot = abs(bot(1,:) - top(1,:)) < tol; 24 | bot(1,equal_bot) = top(1,equal_bot) + 2*pi; 25 | twopi_bot = abs(bot(1,:) - top(1,:) - 2*pi) < tol; 26 | points(1,twopi_bot) = 0; 27 | points(1,~twopi_bot) = mod((bot(1,~twopi_bot) + top(1,~twopi_bot))/2, 2*pi); 28 | for k = 2:dim 29 | pi_bot = abs(bot(k,:) - pi) < tol; 30 | points(k,pi_bot) = pi; 31 | zero_top = abs(top(k,:)) < tol; 32 | points(k,zero_top) = 0; 33 | all_else = ~(zero_top | pi_bot); 34 | points(k,all_else) = mod((top(k,all_else) + bot(k,all_else))/2, pi); 35 | end 36 | % end function 37 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/circle_offset.m: -------------------------------------------------------------------------------- 1 | function offset = circle_offset(n_top,n_bot,extra_twist) 2 | %CIRCLE_OFFSET Try to maximize minimum distance of center points for S^2 collars 3 | % 4 | % Given n_top and n_bot, calculate an offset. 5 | % 6 | % The values n_top and n_bot represent the numbers of 7 | % equally spaced points on two overlapping circles. 8 | % The offset is given in multiples of whole rotations, and 9 | % consists of three parts; 10 | % 1) Half the difference between a twist of one sector on each of bottom and top. 11 | % This brings the centre points into alignment. 12 | % 2) A rotation which will maximize the minimum angle between 13 | % points on the two circles. 14 | % 3) An optional extra twist by a whole number of sectors on the second circle. 15 | % The extra twist is added so that the location of 16 | % the minimum angle between circles will 17 | % progressively twist around the sphere with each collar. 18 | % 19 | % offset = circle_offset(n_top,n_bot,extra_twist); 20 | 21 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 22 | % $Revision 1.10 $ $Date 2005-06-01 $ 23 | % Documentation files renamed 24 | % $Revision 1.00 $ $Date 2005-02-12 $ 25 | % 26 | % For licensing, see COPYING. 27 | % For references, see AUTHORS. 28 | % For revision history, see CHANGELOG. 29 | 30 | if nargin < 3 31 | extra_twist = false; 32 | end 33 | offset = (1/n_bot - 1/n_top)/2 + gcd(n_top,n_bot)/(2*n_top*n_bot); 34 | if extra_twist 35 | twist = 6; 36 | offset = offset + twist/n_bot; 37 | end 38 | % end function 39 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/ideal_region_list.m: -------------------------------------------------------------------------------- 1 | function r_regions = ideal_region_list(dim,N,c_polar,n_collars) 2 | %IDEAL_REGION_LIST The ideal real number of regions in each zone 3 | % 4 | % List the ideal real number of regions in each collar, plus the polar caps. 5 | % 6 | % Given dim, N, c_polar and n_collars, determine r_regions, 7 | % a list of the ideal real number of regions in each collar, 8 | % plus the polar caps. 9 | % The number of elements is n_collars+2. 10 | % r_regions[1] is 1. 11 | % r_regions[n_collars+2] is 1. 12 | % The sum of r_regions is N. 13 | % 14 | % r_regions = ideal_region_list(dim,N,c_polar,n_collars); 15 | 16 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 17 | % $Revision 1.10 $ $Date 2005-06-01 $ 18 | % Documentation files renamed 19 | % $Revision 1.00 $ $Date 2005-02-12 $ 20 | % 21 | % For licensing, see COPYING. 22 | % For references, see AUTHORS. 23 | % For revision history, see CHANGELOG. 24 | 25 | r_regions = zeros(1,2+n_collars); 26 | r_regions(1) = 1; 27 | if n_collars > 0 28 | % 29 | % Based on n_collars and c_polar, determine a_fitting, 30 | % the collar angle such that n_collars collars fit between the polar caps. 31 | % 32 | a_fitting = (pi-2*c_polar)/n_collars; 33 | ideal_region_area = area_of_ideal_region(dim,N); 34 | for collar_n = 1:n_collars 35 | ideal_collar_area = area_of_collar(dim, c_polar+(collar_n-1)*a_fitting, c_polar+collar_n*a_fitting); 36 | r_regions(1+collar_n) = ideal_collar_area / ideal_region_area; 37 | end 38 | end 39 | r_regions(2+n_collars) = 1; 40 | 41 | % end function 42 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/num_collars.m: -------------------------------------------------------------------------------- 1 | function n_collars = num_collars(N,c_polar,a_ideal) 2 | %NUM_COLLARS The number of collars between the polar caps 3 | % 4 | % Given N, an ideal angle, and c_polar, 5 | % determine n_collars, the number of collars between the polar caps. 6 | % 7 | % n_collars = num_collars(N,c_polar,a_ideal); 8 | 9 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 10 | % $Revision 1.10 $ $Date 2005-06-01 $ 11 | % Documentation files renamed 12 | % $Revision 1.00 $ $Date 2005-02-12 $ 13 | % 14 | % For licensing, see COPYING. 15 | % For references, see AUTHORS. 16 | % For revision history, see CHANGELOG. 17 | 18 | n_collars = zeros(size(N)); 19 | enough = (N > 2) & (a_ideal > 0); 20 | n_collars(enough) = max(1,round((pi-2*c_polar(enough))./a_ideal(enough))); 21 | % 22 | % end function 23 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/polar_colat.m: -------------------------------------------------------------------------------- 1 | function c_polar = polar_colat(dim, N) 2 | %POLAR_COLAT The colatitude of the North polar (top) spherical cap 3 | % 4 | % Given dim and N, determine the colatitude of the North polar spherical cap. 5 | % 6 | % c_polar = polar_colat(dim, N); 7 | 8 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 9 | % $Revision 1.10 $ $Date 2005-06-01 $ 10 | % Documentation files renamed 11 | % $Revision 1.00 $ $Date 2005-02-12 $ 12 | % 13 | % For licensing, see COPYING. 14 | % For references, see AUTHORS. 15 | % For revision history, see CHANGELOG. 16 | 17 | enough = N > 2; 18 | c_polar(N == 1) = pi; 19 | c_polar(N == 2) = pi/2; 20 | c_polar(enough) = sradius_of_cap(dim,area_of_ideal_region(dim,N(enough))); 21 | % 22 | % end function 23 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/rot3.m: -------------------------------------------------------------------------------- 1 | function R = rot3(axis, angle) 2 | %ROT3 R^3 rotation about a coordinate axis 3 | % 4 | %Syntax 5 | % R = rot3(axis, angle); 6 | % 7 | %Description 8 | % R = ROT3(AXIS, ANGLE) sets R to be the 3 by 3 rotation matrix corresponding to 9 | % AXIS and ANGLE. Use this to create rotation matrices from Euler angles. 10 | % 11 | % AXIS must be 1, 2, or 3. 12 | % ANGLE must be a real number. 13 | % 14 | %Examples 15 | % > r=rot3(1,pi/6) 16 | % r = 17 | % 1.0000 0 0 18 | % 0 0.8660 -0.5000 19 | % 0 0.5000 0.8660 20 | % 21 | % > r=rot3(2,pi/6) 22 | % r = 23 | % 0.8660 0 -0.5000 24 | % 0 1.0000 0 25 | % 0.5000 0 0.8660 26 | % 27 | % > r=rot3(3,pi/6) 28 | % r = 29 | % 0.8660 -0.5000 0 30 | % 0.5000 0.8660 0 31 | % 0 0 1.0000 32 | 33 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 34 | % $Revision 1.10 $ $Date 2005-06-01 $ 35 | % Documentation files renamed 36 | % $Revision 1.00 $ $Date 2005-02-12 $ 37 | % 38 | % For licensing, see COPYING. 39 | % For references, see AUTHORS. 40 | % For revision history, see CHANGELOG. 41 | 42 | c = cos(angle); 43 | s = sin(angle); 44 | switch axis 45 | case 1 46 | R = [... 47 | 1, 0, 0; ... 48 | 0, c, -s; ... 49 | 0, s, c ]; 50 | case 2 51 | R = [... 52 | c, 0, -s; ... 53 | 0, 1, 0; ... 54 | s, 0, c]; 55 | case 3 56 | R = [... 57 | c, -s, 0; ... 58 | s, c, 0; ... 59 | 0, 0, 1]; 60 | end 61 | % 62 | %end function 63 | 64 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/round_to_naturals.m: -------------------------------------------------------------------------------- 1 | function n_regions = round_to_naturals(N,r_regions) 2 | %ROUND_TO_NATURALS Round off a given list of numbers of regions 3 | % 4 | % Given N and r_regions, determine n_regions, 5 | % a list of the natural number of regions in each collar and the polar caps. 6 | % This list is as close as possible to r_regions, using rounding. 7 | % The number of elements is n_collars+2. 8 | % n_regions[1] is 1. 9 | % n_regions[n_collars+2] is 1. 10 | % The sum of n_regions is N. 11 | % 12 | % n_regions = round_to_naturals(N,r_regions); 13 | 14 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 15 | % $Revision 1.10 $ $Date 2005-06-01 $ 16 | % Documentation files renamed 17 | % $Revision 1.00 $ $Date 2005-02-12 $ 18 | % 19 | % For licensing, see COPYING. 20 | % For references, see AUTHORS. 21 | % For revision history, see CHANGELOG. 22 | 23 | n_regions = r_regions; 24 | discrepancy = 0; 25 | for zone_n = 1:size(r_regions,2) 26 | n_regions(zone_n) = round(r_regions(zone_n)+discrepancy); 27 | discrepancy = discrepancy+r_regions(zone_n)-n_regions(zone_n); 28 | end 29 | % 30 | % end function 31 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/s2_offset.m: -------------------------------------------------------------------------------- 1 | function rotation = s2_offset(points_1) 2 | %S2_OFFSET Experimental offset rotation of S^2 3 | % 4 | %Syntax 5 | % rotation = s2_offset(points_1); 6 | % 7 | %Description 8 | % ROTATION = S2_OFFSET(POINTS_1) sets ROTATION to be an R^3 rotation matrix which 9 | % rotates the north pole of S^2 to a point specified by the points of POINTS_1. 10 | % 11 | % POINTS_1 must be a 2 by M matrix, representing M points of S^2 in spherical 12 | % polar coordinates, with M a positive integer. 13 | % 14 | %Examples 15 | % > s 16 | % s = 17 | % 0 0.7854 2.3562 3.9270 5.4978 0 18 | % 0 1.5708 1.5708 1.5708 1.5708 3.1416 19 | % 20 | % > r=s2_offset(s) 21 | % r = 22 | % 0.0000 0.7071 0.7071 23 | % -1.0000 0.0000 0 24 | % -0.0000 -0.7071 0.7071 25 | % 26 | %See also 27 | % ROT3, CIRCLE_OFFSET 28 | 29 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 30 | % $Revision 1.10 $ $Date 2005-06-01 $ 31 | % Documentation files renamed 32 | % $Revision 1.00 $ $Date 2005-02-12 $ 33 | % 34 | % For licensing, see COPYING. 35 | % For references, see AUTHORS. 36 | % For revision history, see CHANGELOG. 37 | 38 | n_in_collar = size(points_1,2); 39 | if n_in_collar > 2 40 | if (n_in_collar > 3) && (points_1(2,2) == points_1(2,3)) 41 | a_3 = (points_1(1,2) + points_1(1,3))/2; 42 | else 43 | a_3 = points_1(1,2) + pi; 44 | end 45 | a_2 = points_1(2,2)/2; 46 | else 47 | a_3 = 0; 48 | a_2 = pi/2; 49 | end 50 | rotation = rot3(2,-a_2)*rot3(3,-a_3); 51 | % 52 | %end function 53 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/sphere_region.m: -------------------------------------------------------------------------------- 1 | function region = sphere_region(dim) 2 | %SPHERE_REGION The sphere represented as a single region of an EQ partition 3 | % 4 | % An array of two points representing S^dim as a region. 5 | % 6 | % region = sphere_region(dim); 7 | 8 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 9 | % $Revision 1.10 $ $Date 2005-06-01 $ 10 | % Documentation files renamed 11 | % $Revision 1.00 $ $Date 2005-02-12 $ 12 | % 13 | % For licensing, see COPYING. 14 | % For references, see AUTHORS. 15 | % For revision history, see CHANGELOG. 16 | 17 | if dim == 1 18 | region = [0,2*pi]; 19 | else 20 | sphere_region_1 = sphere_region(dim-1); 21 | region = [[sphere_region_1(:,1); 0],[sphere_region_1(:,2); pi]] ; 22 | end 23 | % 24 | % end function 25 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_partitions/private/top_cap_region.m: -------------------------------------------------------------------------------- 1 | function region = top_cap_region(dim,a_cap) 2 | %TOP_CAP_REGION North polar (top) cap region of EQ partition 3 | % 4 | % An array of two points representing the top cap of radius a_cap as a region. 5 | % 6 | % region = top_cap_region(dim,a_cap); 7 | 8 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 9 | % $Revision 1.10 $ $Date 2005-06-01 $ 10 | % Documentation files renamed 11 | % $Revision 1.00 $ $Date 2005-02-12 $ 12 | % 13 | % For licensing, see COPYING. 14 | % For references, see AUTHORS. 15 | % For revision history, see CHANGELOG. 16 | 17 | if dim == 1 18 | region = [0,a_cap]; 19 | else 20 | sphere_region_1 = sphere_region(dim-1); 21 | region = [[sphere_region_1(:,1); 0], [sphere_region_1(:,2); a_cap]]; 22 | end 23 | % end function 24 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_point_set_props/eq_min_dist.m: -------------------------------------------------------------------------------- 1 | function dist = eq_min_dist(dim,N,varargin) 2 | %EQ_MIN_DIST Minimum distance between center points of an EQ partition 3 | % 4 | %Syntax 5 | % dist = eq_min_dist(dim,N,options); 6 | % 7 | %Description 8 | % DIST = EQ_MIN_DIST(dim,N) does the following: 9 | % 1) uses the recursive zonal equal area sphere partitioning algorithm to 10 | % partition the unit sphere S^dim into N regions, 11 | % 2) finds the EQ point set, the set of center points of each region, and 12 | % 3) sets DIST to be the minimum Euclidean distance between points of 13 | % the EQ point set. 14 | % 15 | % The argument dim must be a positive integer. 16 | % The argument N must be a positive integer or an array of positive integers. 17 | % The result DIST will be an array of the same size as N. 18 | % 19 | % DIST = EQ_MIN_DIST(dim,N,'offset','extra'), for dim == 2 or dim == 3, 20 | % uses exerimental extra rotation offsets to try to maximize the minimum 21 | % distance. For dim > 3, extra offsets are not used. 22 | % 23 | %Examples 24 | % > dist=eq_min_dist(2,10) 25 | % dist = 26 | % 1.0515 27 | % 28 | % > dist=eq_min_dist(3,1:6) 29 | % dist = 30 | % 2.0000 2.0000 1.4142 1.4142 1.4142 1.4142 31 | % 32 | %See also 33 | % PARTITION_OPTIONS, EUCLIDEAN_DIST, EQ_ENERGY_DIST 34 | 35 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 36 | % $Revision 1.10 $ $Date 2005-06-01 $ 37 | % Documentation files renamed 38 | % $Revision 1.00 $ $Date 2005-02-12 $ 39 | % 40 | % For licensing, see COPYING. 41 | % For references, see AUTHORS. 42 | % For revision history, see CHANGELOG. 43 | 44 | % 45 | % Check number of arguments 46 | % 47 | error(nargchk(2,4,nargin)); 48 | dist = eq_point_set_property(@point_set_min_dist,dim,N,varargin{:}); 49 | % 50 | % end function 51 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_point_set_props/point_set_min_dist.m: -------------------------------------------------------------------------------- 1 | function min_dist = point_set_min_dist(points) 2 | %POINT_SET_MIN_DIST Minimum distance between points of a point set 3 | % 4 | %Syntax 5 | % min_dist = point_set_min_dist(points); 6 | % 7 | %Description 8 | % MIN_DIST = POINT_SET_MIN_DIST(POINTS) sets MIN_DIST to be the minimum 9 | % Euclidean distance between points of the point set POINTS. 10 | % 11 | % POINTS must be an array of real numbers of size (M by N), where M and N 12 | % are positive integers, with each of the N columns representing a point of 13 | % R^M in Cartesian coordinates. 14 | % 15 | %Notes 16 | % Since this function is usually meant to be used for points on a unit sphere, 17 | % the value of POINT_SET_MIN_DIST for a single point is defined to be 2. 18 | % 19 | %Examples 20 | % > x 21 | % x = 22 | % 0 0 0.0000 0 23 | % 0 0 0 0 24 | % 0 1.0000 -1.0000 0.0000 25 | % 1.0000 0.0000 0.0000 -1.0000 26 | % 27 | % > d=point_set_min_dist(x) 28 | % d = 29 | % 1.4142 30 | % 31 | %See also 32 | % EUCLIDEAN_DIST, MIN_EUCLIDEAN_DIST, POINT_SET_ENERGY_DIST 33 | 34 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 35 | % $Revision 1.10 $ $Date 2005-06-01 $ 36 | % Documentation files renamed 37 | % $Revision 1.00 $ $Date 2005-02-12 $ 38 | % 39 | % For licensing, see COPYING. 40 | % For references, see AUTHORS. 41 | % For revision history, see CHANGELOG. 42 | 43 | min_dist = 2; 44 | n_points = size(points,2); 45 | for i = 1:(n_points-1) 46 | j = (i+1):n_points; 47 | dist = euclidean_dist(points(:,i)*ones(1,n_points-i),points(:,j)); 48 | min_dist = min(min_dist,min(dist)); 49 | end 50 | % 51 | % end function 52 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_region_props/Contents.m: -------------------------------------------------------------------------------- 1 | %Recursive Zonal Equal Area Sphere Partitioning: Properties of EQ partitions 2 | % 3 | % Recursive Zonal Equal Area (EQ) Sphere Partitioning Toolbox. 4 | % Release 1.10 2005-06-01 5 | % 6 | %Functions by category 7 | %===================== 8 | % 9 | % Diameter 10 | % eq_diam_bound Maximum per-region diameter bound of EQ partition 11 | % eq_vertex_diam Maximum vertex diameter of EQ partition 12 | % 13 | % eq_diam_coeff Coefficients of diameter bound and vertex diameter of 14 | % EQ partition 15 | % eq_vertex_diam_coeff Coefficient of maximum vertex diameter of EQ partition 16 | % 17 | %Hook for user-defined properties 18 | % eq_regions_property Property of regions of an EQ partition 19 | 20 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 21 | % $Revision 1.10 $ $Date 2005-06-01 $ 22 | % Documentation files renamed 23 | % $Revision 1.00 $ $Date 2005-02-13 $ 24 | % 25 | % For licensing, see COPYING. 26 | % For references, see AUTHORS. 27 | % For revision history, see CHANGELOG. 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_region_props/eq_diam_bound.m: -------------------------------------------------------------------------------- 1 | function diam_bound = eq_diam_bound(dim,N) 2 | %EQ_DIAM_BOUND Maximum per-region diameter bound of EQ partition 3 | % 4 | %Syntax 5 | % diam_bound = eq_diam_bound(dim,N); 6 | % 7 | %Description 8 | % DIAM_BOUND = EQ_DIAM_BOUND(dim,N) does the following: 9 | % 1) uses the recursive zonal equal area sphere partitioning algorithm to 10 | % partition the unit sphere S^dim into N regions, 11 | % 2) sets DIAM_BOUND to be the maximum of the per-region diameter bound over 12 | % all the regions of the partition. 13 | % 14 | % The argument dim must be a positive integer. 15 | % The argument N must be a positive integer or an array of positive integers. 16 | % The result DIAM_BOUND will an array of the same size as N. 17 | % 18 | %Examples 19 | % > diam_bound=eq_diam_bound(2,10) 20 | % diam_bound = 21 | % 1.6733 22 | % 23 | % > diam_bound=eq_diam_bound(3,1:6) 24 | % diam_bound = 25 | % 2 2 2 2 2 2 26 | % 27 | %See also 28 | % EQ_VERTEX_DIAM, EQ_DIAM_COEFF, EQ_REGIONS_PROPERTY 29 | 30 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 31 | % $Revision 1.10 $ $Date 2005-06-01 $ 32 | % Documentation files renamed 33 | % $Revision 1.00 $ $Date 2005-02-12 $ 34 | % 35 | % For licensing, see COPYING. 36 | % For references, see AUTHORS. 37 | % For revision history, see CHANGELOG. 38 | 39 | diam_bound = eq_regions_property(@max_diam_bound_of_regions,dim,N); 40 | % 41 | % end function 42 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_region_props/eq_vertex_diam.m: -------------------------------------------------------------------------------- 1 | function vertex_diam = eq_vertex_diam(dim,N) 2 | %EQ_VERTEX_DIAM Maximum vertex diameter of EQ partition 3 | % 4 | %Syntax 5 | % vertex_diam = eq_vertex_diam(dim,N); 6 | % 7 | %Description 8 | % VERTEX_DIAM = EQ_VERTEX_DIAM(dim,N) does the following: 9 | % 1) uses the recursive zonal equal area sphere partitioning algorithm to 10 | % partition the unit sphere S^dim into N regions, 11 | % 2) sets VERTEX_DIAM to be the maximum vertex diameter over all the regions 12 | % of the partition. 13 | % 14 | % The argument dim must be a positive integer. 15 | % The argument N must be a positive integer or an array of positive integers. 16 | % The result VERTEX_DIAM will an array of the same size as N. 17 | % 18 | %Examples 19 | % > vertex_diam=eq_vertex_diam(2,10) 20 | % vertex_diam = 21 | % 1.4142 22 | % 23 | % > vertex_diam=eq_vertex_diam(3,1:6) 24 | % vertex_diam = 25 | % 2 2 2 2 2 2 26 | % 27 | %See also 28 | % EQ_DIAM_BOUND, EQ_VERTEX_DIAM_COEFF, EQ_DIAM_COEFF, EQ_REGIONS_PROPERTY 29 | 30 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 31 | % $Revision 1.10 $ $Date 2005-06-01 $ 32 | % Documentation files renamed 33 | % $Revision 1.00 $ $Date 2005-02-12 $ 34 | % 35 | % For licensing, see COPYING. 36 | % For references, see AUTHORS. 37 | % For revision history, see CHANGELOG. 38 | 39 | vertex_diam = eq_regions_property(@max_vertex_diam_of_regions,dim,N); 40 | % 41 | % end function 42 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_region_props/eq_vertex_diam_coeff.m: -------------------------------------------------------------------------------- 1 | function coeff = eq_vertex_diam_coeff(dim,N) 2 | %EQ_VERTEX_DIAM_COEFF Coefficient of maximum vertex diameter of EQ partition 3 | % 4 | %Syntax 5 | % coeff = eq_vertex_diam_coeff(dim,N); 6 | % 7 | %Description 8 | % COEFF = EQ_VERTEX_DIAM_COEFF(dim,N) does the following: 9 | % 1) uses the recursive zonal equal area sphere partitioning algorithm to 10 | % partition the unit sphere S^dim into N regions, 11 | % 2) finds the maximum vertex diameter over all the regions of the partition, 12 | % 3) sets COEFF to be the vertex diameter coefficient, 13 | % defined as the solution to 14 | % 15 | % max_vertex_diam == COEFF N^(-1/dim). 16 | % 17 | % The argument dim must be a positive integer. 18 | % The argument N must be a positive integer or an array of positive integers. 19 | % The result COEFF will an array of the same size as N. 20 | % 21 | %Examples 22 | % > coeff=eq_vertex_diam_coeff(2,10) 23 | % coeff = 24 | % 4.4721 25 | % 26 | % > coeff=eq_vertex_diam_coeff(3,1:6) 27 | % coeff = 28 | % 2.0000 2.5198 2.8845 3.1748 3.4200 3.6342 29 | % 30 | %See also 31 | % EQ_VERTEX_DIAM, EQ_DIAM_COEFF 32 | 33 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 34 | % $Revision 1.10 $ $Date 2005-06-01 $ 35 | % Documentation files renamed 36 | % $Revision 1.00 $ $Date 2005-02-12 $ 37 | % 38 | % For licensing, see COPYING. 39 | % For references, see AUTHORS. 40 | % For revision history, see CHANGELOG. 41 | 42 | coeff = eq_vertex_diam(dim,N) .* N.^(1/dim); 43 | % 44 | %end function -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_region_props/private/expand_region_for_diam.m: -------------------------------------------------------------------------------- 1 | function expanded_region = expand_region_for_diam(region) 2 | %EXPAND_REGION_FOR_DIAM The set of 2^d vertices of a region 3 | % 4 | % Expand a region from the 2 vertex definition to the set of 2^dim vertices 5 | % of the pseudo-region of a region, so that the Euclidean diameter of a region 6 | % is approximated by the diameter of this set. 7 | % 8 | % expanded_region = expand_region_for_diam(region); 9 | 10 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 11 | % $Revision 1.10 $ $Date 2005-06-01 $ 12 | % Documentation files renamed 13 | % $Revision 1.00 $ $Date 2005-02-12 $ 14 | % 15 | % For licensing, see COPYING. 16 | % For references, see AUTHORS. 17 | % For revision history, see CHANGELOG. 18 | 19 | dim = size(region,1); 20 | if dim > 1 21 | s_top = region(dim,1); 22 | s_bot = region(dim,2); 23 | region_1 = expand_region_for_diam(region(1:dim-1,:)); 24 | expanded_region = [append(region_1, s_top), append(region_1, s_bot)]; 25 | else 26 | expanded_region = pseudo_region_for_diam(region); 27 | end 28 | % 29 | % end function 30 | 31 | function result = append(matrix,value) 32 | % Append a coordinate value to each column of a matrix. 33 | % 34 | % result = append(matrix,value); 35 | 36 | result = [matrix; ones(1,size(matrix,2))*value]; 37 | % 38 | % end function 39 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_region_props/private/pseudo_region_for_diam.m: -------------------------------------------------------------------------------- 1 | function pseudo_region = pseudo_region_for_diam(region) 2 | %PSEUDO_REGION_FOR_DIAM Two points which maximize the vertex diameter of a region 3 | % 4 | % pseudo_region = pseudo_region_for_diam(region) 5 | 6 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 7 | % $Revision 1.10 $ $Date 2005-06-01 $ 8 | % Documentation files renamed 9 | % $Revision 1.00 $ $Date 2005-02-12 $ 10 | % 11 | % For licensing, see COPYING. 12 | % For references, see AUTHORS. 13 | % For revision history, see CHANGELOG. 14 | 15 | tol = eps*2^5; 16 | phi_top = region(1,1); 17 | phi_bot = region(1,2); 18 | if phi_bot == 0 19 | phi_bot = 2*pi; 20 | end 21 | if (mod(phi_bot - phi_top, 2*pi) < tol) || (mod(phi_bot - phi_top, 2*pi) > pi) 22 | phi_bot = phi_top + pi; 23 | end 24 | pseudo_region = region; 25 | pseudo_region(1,2) = phi_bot; 26 | % 27 | % end function 28 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_test/Contents.m: -------------------------------------------------------------------------------- 1 | %Recursive Zonal Equal Area Sphere Partitioning: Tests 2 | % 3 | % Recursive Zonal Equal Area (EQ) Sphere Partitioning Toolbox. 4 | % Release 1.10 2005-06-01 5 | % 6 | %Functions 7 | %========= 8 | % 9 | % eq_area_error Total area error and max area error per region of an 10 | % EQ partition 11 | 12 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 13 | % $Revision 1.10 $ $Date 2005-06-01 $ 14 | % Documentation files renamed 15 | % $Revision 1.00 $ $Date 2005-02-13 $ 16 | % 17 | % For licensing, see COPYING. 18 | % For references, see AUTHORS. 19 | % For revision history, see CHANGELOG. 20 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/area_of_collar.m: -------------------------------------------------------------------------------- 1 | function area = area_of_collar(dim, a_top, a_bot) 2 | %AREA_OF_COLLAR Area of spherical collar 3 | % 4 | %Syntax 5 | % area = area_of_collar(dim, a_top, a_bot); 6 | % 7 | %Description 8 | % AREA = AREA_OF_COLLAR(dim, A_TOP, A_BOT) sets AREA to be the area of 9 | % an S^dim spherical collar specified by A_TOP, A_BOT, where 10 | % A_TOP is top (smaller) spherical radius, 11 | % A_BOT is bottom (larger) spherical radius. 12 | % 13 | % The argument dim must be a positive integer. 14 | % The arguments A_TOP and A_BOT must be real numbers or arrays of real numbers, 15 | % with the same array size. 16 | % The result AREA will be an array of the same size as A_TOP. 17 | % 18 | %Notes 19 | % A_TOP and A_BOT are assumed to be in the range [0, pi]. 20 | % 21 | % The area is defined via the Lebesgue measure on S^dim inherited from 22 | % its embedding in R^(dim+1). 23 | % 24 | % Ref: [LeGS01 Lemma 4.1 p255]. 25 | % 26 | %Examples 27 | % > area=area_of_collar(2,0:2,1:3) 28 | % area = 29 | % 2.8884 6.0095 3.6056 30 | % 31 | %See also 32 | % AREA_OF_CAP, AREA_OF_SPHERE 33 | 34 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 35 | % $Revision 1.10 $ $Date 2005-06-01 $ 36 | % Documentation files renamed 37 | % $Revision 1.00 $ $Date 2005-02-12 $ 38 | % 39 | % For licensing, see COPYING. 40 | % For references, see AUTHORS. 41 | % For revision history, see CHANGELOG. 42 | 43 | area = area_of_cap(dim, a_bot) - area_of_cap(dim, a_top); 44 | % 45 | % end function 46 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/area_of_ideal_region.m: -------------------------------------------------------------------------------- 1 | function area = area_of_ideal_region(dim,N) 2 | %AREA_OF_IDEAL_REGION Area of one region of an EQ partition 3 | % 4 | %Syntax 5 | % area = area_of_ideal_region(dim,N); 6 | % 7 | %Description 8 | % AREA = AREA_OF_IDEAL_REGION(dim,N) sets AREA to be the area of one of N equal 9 | % area regions on S^dim, that is 1/N times AREA_OF_SPHERE(dim). 10 | % 11 | % The argument dim must be a positive integer. 12 | % The argument N must be a positive integer or an array of positive integers. 13 | % The result AREA will be an array of the same size as N. 14 | % 15 | %Examples 16 | % > area=area_of_ideal_region(3,1:6) 17 | % area = 18 | % 19.7392 9.8696 6.5797 4.9348 3.9478 3.2899 19 | % 20 | %See also 21 | % AREA_OF_SPHERE 22 | 23 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 24 | % $Revision 1.10 $ $Date 2005-06-01 $ 25 | % Documentation files renamed 26 | % $Revision 1.00 $ $Date 2005-02-12 $ 27 | % 28 | % For licensing, see COPYING. 29 | % For references, see AUTHORS. 30 | % For revision history, see CHANGELOG. 31 | 32 | area = area_of_sphere(dim)./N; 33 | % 34 | % end function 35 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/area_of_sphere.m: -------------------------------------------------------------------------------- 1 | function area = area_of_sphere(dim) 2 | %AREA_OF_SPHERE Area of sphere 3 | % 4 | %Syntax 5 | % area = area_of_sphere(dim); 6 | % 7 | %Description 8 | % AREA = AREA_OF_SPHERE(dim) sets AREA to be the area of the sphere S^dim, 9 | % 10 | % The argument dim must be a positive integer or an array of positive integers. 11 | % The result AREA will be an array of the same size as dim. 12 | % 13 | %Notes 14 | % The area of S^dim is defined via the Lebesgue measure on S^dim inherited from 15 | % its embedding in R^(dim+1). 16 | % 17 | % Ref: [Mue98] p39. 18 | % 19 | %Examples 20 | % > area=area_of_sphere(1:7) 21 | % area = 22 | % 6.2832 12.5664 19.7392 26.3189 31.0063 33.0734 32.4697 23 | % 24 | %See also 25 | % AREA_OF_CAP, VOLUME_OF_BALL 26 | 27 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 28 | % $Revision 1.10 $ $Date 2005-06-01 $ 29 | % Documentation files renamed 30 | % $Revision 1.00 $ $Date 2005-02-12 $ 31 | % 32 | % For licensing, see COPYING. 33 | % For references, see AUTHORS. 34 | % For revision history, see CHANGELOG. 35 | 36 | power = (dim+1)/2; 37 | area = (2*pi.^power./gamma(power)); 38 | % 39 | % end function 40 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/cart2polar2.m: -------------------------------------------------------------------------------- 1 | function s = cart2polar2(x) 2 | %CART2POLAR2 Convert from Cartesian to spherical coordinates on sphere S^2 3 | % 4 | %Syntax 5 | % s = cart2polar2(x); 6 | % 7 | %Description 8 | % S = CART2POLAR2(X) sets S to be the spherical polar coordinates of the points 9 | % represented by the Cartesian coordinates X: 10 | % S = [phi;theta]: phi in [0, 2*pi), theta in [0, pi]. 11 | % 12 | % The argument X must be an array of real numbers of size (3 by N), where N is 13 | % any positive integer. The result S will be an array of size (2 by N). 14 | % 15 | %Examples 16 | % > x 17 | % x = 18 | % 0 0.0000 -0.0000 0.0000 19 | % 0 1.0000 -1.0000 0 20 | % 1.0000 0.0000 0.0000 -1.0000 21 | % 22 | % > s=cart2polar2(x) 23 | % s = 24 | % 0 1.5708 4.7124 0 25 | % 0 1.5708 1.5708 3.1416 26 | % 27 | %Note 28 | % CART2POLAR2(X) projects any X in R^3 onto the sphere S^2 via a line through 29 | % the origin. The origin [0 0 0]' is itself projected onto a point on the 30 | % equator such that 31 | % 32 | % POLAR2CART(CART2POLAR2([0 0 0]')) == [1 0 0]'. 33 | % 34 | %See also 35 | % POLAR2CART 36 | 37 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 38 | % $Revision 1.10 $ $Date 2005-06-01 $ 39 | % Documentation files renamed 40 | % $Revision 1.10 $ $Date 2005-05-28 $ 41 | % Use cart2sph 42 | % Change name from x2s2 to cart2polar2 43 | % $Revision 1.00 $ $Date 2005-02-12 $ 44 | % 45 | % For licensing, see COPYING. 46 | % For references, see AUTHORS. 47 | % For revision history, see CHANGELOG. 48 | 49 | [phi, theta] = cart2sph(x(1,:),x(2,:),x(3,:)); 50 | s = [mod(phi, 2*pi); pi/2-theta]; 51 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/euc2sph_dist.m: -------------------------------------------------------------------------------- 1 | function s = euc2sph_dist(e) 2 | %EUC2SPH_DIST Convert Euclidean to spherical distance 3 | % 4 | %Syntax 5 | % s = e2s(e); 6 | % 7 | %Description 8 | % S = EUC2SPH_DIST(E) converts the Euclidean distance E to the spherical 9 | % distance S, using a formula which is valid for the unit sphere in all 10 | % dimensions. 11 | % 12 | % The argument E must be a real number or an array of real numbers. 13 | % The result S will be an array of the same size as E. 14 | % 15 | %Note 16 | % The argument E is assumed to satsify abs(E) <= 2. 17 | % 18 | %Examples 19 | % > s=euc2sph_dist(2) 20 | % s = 21 | % 3.1416 22 | % 23 | % > s=euc2sph_dist(0:0.5:2) 24 | % s = 25 | % 0 0.5054 1.0472 1.6961 3.1416 26 | % 27 | % > s=euc2sph_dist(-2) 28 | % s = 29 | % -3.1416 30 | % 31 | %See also 32 | % SPH2EUC_DIST, EUCLIDEAN_DIST, SPHERICAL_DIST 33 | 34 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 35 | % $Revision 1.10 $ $Date 2005-06-01 $ 36 | % Change name from e2s to euc2sph_dist 37 | % Documentation files renamed 38 | % $Revision 1.00 $ $Date 2005-02-12 $ 39 | % 40 | % For licensing, see COPYING. 41 | % For references, see AUTHORS. 42 | % For revision history, see CHANGELOG. 43 | 44 | s = 2*asin(e/2); 45 | % 46 | % end function 47 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/euclidean_dist.m: -------------------------------------------------------------------------------- 1 | function distance = euclidean_dist(x,y) 2 | %EUCLIDEAN_DIST Euclidean distance between two points in Cartesian coordinates 3 | % 4 | %Syntax 5 | % distance = euclidean_dist(x,y); 6 | % 7 | %Description 8 | % DISTANCE = EUCLIDEAN_DIST(X,Y) sets DISTANCE to be the Euclidean distance 9 | % between the two points X and Y. 10 | % 11 | % The arguments X and Y must be arrays of the same size, M by N, where M and N 12 | % are positive integers. Each of X and Y is assumed to represent N points in 13 | % R^M, in Cartesian coordinates. 14 | % The result DISTANCE will be a 1 by N array. 15 | % 16 | %Examples 17 | % > x 18 | % x = 19 | % 0 0.0000 -0.0000 0.0000 20 | % 0 1.0000 -1.0000 0 21 | % 1.0000 0.0000 0.0000 -1.0000 22 | % 23 | % > y 24 | % y = 25 | % 0 0.0000 -0.0000 0.0000 26 | % -0.5000 0.8660 -0.8660 0.5000 27 | % 0.8660 0.5000 -0.5000 -0.8660 28 | % 29 | % > distance=euclidean_dist(x,y) 30 | % distance = 31 | % 0.5176 0.5176 0.5176 0.5176 32 | % 33 | %See also 34 | % SPHERICAL_DIST, E2S, S2E 35 | 36 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 37 | % $Revision 1.10 $ $Date 2005-06-01 $ 38 | % Documentation files renamed 39 | % $Revision 1.00 $ $Date 2005-02-12 $ 40 | % 41 | % For licensing, see COPYING. 42 | % For references, see AUTHORS. 43 | % For revision history, see CHANGELOG. 44 | 45 | distance = sqrt(sum((x-y).^2)); 46 | % 47 | % end function 48 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/haslight.m: -------------------------------------------------------------------------------- 1 | function lit = haslight(axish) 2 | %HASLIGHT Check if axis handle has a light attached 3 | % 4 | %Syntax 5 | % lit = haslight(axish); 6 | % 7 | %Description 8 | % LIT = HASLIGHT(AXISH) sets LIT to true if the axis specified by axis 9 | % handle AXISH has a child of type 'light', and sets LIT to false otherwise. 10 | % 11 | %Examples 12 | % > lit=haslight(gca) 13 | % lit = 14 | % 1 15 | 16 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 17 | % $Revision 1.10 $ $Date 2005-06-01 $ 18 | % Documentation files renamed 19 | % $Revision 1.00 $ $Date 2005-02-12 $ 20 | % 21 | % For licensing, see COPYING. 22 | % For references, see AUTHORS. 23 | % For revision history, see CHANGELOG. 24 | 25 | lit = false; 26 | ch = get(axish,'Children'); 27 | 28 | for k = 1:length(ch) 29 | type = get(ch(k),'Type'); 30 | if strcmp(type,'light') 31 | lit = true; 32 | return; 33 | end 34 | end 35 | % 36 | %end function 37 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/ideal_collar_angle.m: -------------------------------------------------------------------------------- 1 | function angle = ideal_collar_angle(dim,N) 2 | %IDEAL_COLLAR_ANGLE The ideal angle for spherical collars of an EQ partition 3 | % 4 | %Syntax 5 | % angle = ideal_collar_angle(dim,N); 6 | % 7 | %Description 8 | % ANGLE = IDEAL_COLLAR_ANGLE(dim,N) sets ANGLE to the ideal angle for the 9 | % spherical collars of an EQ partition of the unit sphere S^dim into N regions. 10 | % 11 | % The argument dim must be a positive integer. 12 | % The argument N must be a positive integer or an array of positive integers. 13 | % The result ANGLE will be an array of the same size as N. 14 | % 15 | %Notes 16 | % The ideal collar angle is determined by the side of a dim-dimensional 17 | % hypercube of the same volume as the area of a single region of an N region 18 | % equal area partition of S^dim. 19 | % 20 | % Since the EQ partition for N < 3 has no spherical collars, 21 | % the recursive zonal equal area sphere partitioning algorithm does not use 22 | % ideal_collar_angle(dim,N) for N < 3. 23 | % 24 | %Examples 25 | % > angle = ideal_collar_angle(2,10) 26 | % angle = 27 | % 1.1210 28 | % 29 | % > angle = ideal_collar_angle(3,1:6) 30 | % angle = 31 | % 2.7026 2.1450 1.8739 1.7025 1.5805 1.4873 32 | % 33 | %See also 34 | % AREA_OF_IDEAL_REGION 35 | 36 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 37 | % $Revision 1.10 $ $Date 2005-06-01 $ 38 | % Documentation files renamed 39 | % $Revision 1.00 $ $Date 2005-02-12 $ 40 | % 41 | % For licensing, see COPYING. 42 | % For references, see AUTHORS. 43 | % For revision history, see CHANGELOG. 44 | 45 | angle = area_of_ideal_region(dim,N).^(1/dim); 46 | % 47 | % end function 48 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/polar2cart.m: -------------------------------------------------------------------------------- 1 | function x = polar2cart(s) 2 | %POLAR2CART Convert spherical polar to Cartesian coordinates 3 | % 4 | %Syntax 5 | % x = polar2cart(s); 6 | % 7 | %Description 8 | % X = POLAR2CART(S) sets X to be the Cartesian coordinates of the points 9 | % represented by the spherical polar coordinates S. 10 | % 11 | % S is assumed to be an array of size (dim by N) representing N points of 12 | % S^dim in spherical polar coordinates, where dim and N are positive integers. 13 | % N will be an array of size (dim+1 by N). 14 | % 15 | %Examples 16 | % > s 17 | % s = 18 | % 0 1.5708 4.7124 0 19 | % 0 1.5708 1.5708 3.1416 20 | % 21 | % > x=polar2cart(s) 22 | % x = 23 | % 0 0.0000 -0.0000 0.0000 24 | % 0 1.0000 -1.0000 0 25 | % 1.0000 0.0000 0.0000 -1.0000 26 | % 27 | %See also 28 | % CART2POLAR2 29 | 30 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 31 | % $Revision 1.10 $ $Date 2005-06-01 $ 32 | % Change name from s2x to polar2cart 33 | % Documentation files renamed 34 | % $Revision 1.00 $ $Date 2005-02-12 $ 35 | % 36 | % For licensing, see COPYING. 37 | % For references, see AUTHORS. 38 | % For revision history, see CHANGELOG. 39 | 40 | dim = size(s,1); 41 | n=size(s,2); 42 | x = zeros(dim+1,n); 43 | sinprod = 1; 44 | for k = dim:-1:2 45 | x(k+1,:) = sinprod.*cos(s(k,:)); 46 | sinprod = sinprod.*sin(s(k,:)); 47 | end 48 | x(2,:)=sinprod.*sin(s(1,:)); 49 | x(1,:)=sinprod.*cos(s(1,:)); 50 | r = sqrt(sum(x.^2)); 51 | mask = (r ~= 1); 52 | if size(r(mask),2) > 0 53 | x(:,mask) = x(:,mask)./(ones(dim+1,1)*r(mask)); 54 | end 55 | % 56 | % end function 57 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/sph2euc_dist.m: -------------------------------------------------------------------------------- 1 | function e = sph2euc_dist(s) 2 | %SPHE2EUC_DIST Convert spherical to Euclidean distance 3 | % 4 | %Syntax 5 | % e = sph2euc_dist(s); 6 | % 7 | %Description 8 | % E = SPHE2EUC_DIST (S) converts the spherical distance S to Euclidean 9 | % distance E, using a formula which is valid for the unit sphere in all 10 | % dimensions. 11 | % 12 | % The argument S must be a real number or an array of real numbers. 13 | % The result E will be an array of the same size as S. 14 | % 15 | %Note 16 | % The argument S is assumed to satsify abs(S) <= pi. 17 | % 18 | %Examples 19 | % > e=sph2euc_dist(pi) 20 | % e = 21 | % 2 22 | % 23 | % > e=sph2euc_dist(0:pi/4:pi) 24 | % e = 25 | % 0 0.7654 1.4142 1.8478 2.0000 26 | % 27 | %See also 28 | % EUC2SPH_DIST, EUCLIDEAN_DIST, SPHERICAL_DIST 29 | 30 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 31 | % $Revision 1.10 $ $Date 2005-06-01 $ 32 | % Change name from s2e to sph2euc_dist 33 | % Documentation files renamed 34 | % $Revision 1.00 $ $Date 2005-02-12 $ 35 | % 36 | % For licensing, see COPYING. 37 | % For references, see AUTHORS. 38 | % For revision history, see CHANGELOG. 39 | 40 | e = 2*(sin(s/2)); 41 | % 42 | % end function 43 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/spherical_dist.m: -------------------------------------------------------------------------------- 1 | function a_dist = spherical_dist(x,y) 2 | %SPHERICAL_DIST Spherical distance between two points on the sphere 3 | % 4 | %Syntax 5 | % a_dist = spherical_dist(x,y); 6 | % 7 | %Description 8 | % A_DIST = SPHERICAL_DIST(X,Y) sets A_DIST to be the spherical distance 9 | % between the two points X and Y. 10 | % 11 | % The arguments X and Y must be arrays of the same size, M by N, where M and N 12 | % are positive integers. Each of X and Y is assumed to represent N points in 13 | % R^M, in Cartesian coordinates. 14 | % The result A_DIST will be a 1 by N array. 15 | % 16 | %Examples 17 | % > x 18 | % x = 19 | % 0 0.0000 -0.0000 0.0000 20 | % 0 1.0000 -1.0000 0 21 | % 1.0000 0.0000 0.0000 -1.0000 22 | % 23 | % > y 24 | % y = 25 | % 0 0.0000 -0.0000 0.0000 26 | % -0.5000 0.8660 -0.8660 0.5000 27 | % 0.8660 0.5000 -0.5000 -0.8660 28 | % 29 | % > a_dist=spherical_dist(x,y) 30 | % a_dist = 31 | % 0.5236 0.5236 0.5236 0.5236 32 | % 33 | %See also 34 | % EUCLIDEAN_DIST, E2S, S2E 35 | 36 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 37 | % $Revision 1.10 $ $Date 2005-06-01 $ 38 | % Documentation files renamed 39 | % $Revision 1.00 $ $Date 2005-02-12 $ 40 | % 41 | % For licensing, see COPYING. 42 | % For references, see AUTHORS. 43 | % For revision history, see CHANGELOG. 44 | 45 | a_dist = acos(sum(x.*y)); 46 | % 47 | % end function 48 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/eq_utilities/volume_of_ball.m: -------------------------------------------------------------------------------- 1 | function volume = volume_of_ball(dim) 2 | %VOLUME_OF_BALL Volume of the unit ball 3 | % 4 | %Syntax 5 | % volume = volume_of_ball(dim); 6 | % 7 | %Description 8 | % VOLUME = VOLUME_OF_BALL(dim) sets VOLUME to be the volume of the unit ball 9 | % B^dim in R^dim which is enclosed by the sphere S^(dim-1). 10 | % 11 | % The argument dim must be a positive integer or an array of positive integers. 12 | % The result VOLUME will be an array of the same size as dim. 13 | % 14 | %Notes 15 | % The volume of B^dim is defined via the Lebesgue measure on R^dim. 16 | % 17 | % Ref: [WeiMW]. 18 | % 19 | %Examples 20 | % > volume=volume_of_ball(1:7) 21 | % volume = 22 | % 2.0000 3.1416 4.1888 4.9348 5.2638 5.1677 4.7248 23 | % 24 | %See also 25 | % AREA_OF_SPHERE 26 | 27 | % Copyright 2004-2005 Paul Leopardi for the University of New South Wales. 28 | % $Revision 1.10 $ $Date 2005-06-01 $ 29 | % Documentation files renamed 30 | % $Revision 1.00 $ $Date 2005-02-12 $ 31 | % 32 | % For licensing, see COPYING. 33 | % For references, see AUTHORS. 34 | % For revision history, see CHANGELOG. 35 | 36 | volume = area_of_sphere(dim-1)./dim; 37 | % 38 | % end function 39 | -------------------------------------------------------------------------------- /gspbox/3rdparty/eq_sphere_partitions/info.ins: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: GLNX86, Created on: Fri May 27 13:36:06 2005 IM@ IS_INSTALLED0INS_DIRSP eq_illustrationsP eq_partitionsX$eq_point_set_propsPeq_region_props@eq_testH eq_utilities`INS_NAME(eq_sphere_partitions -------------------------------------------------------------------------------- /gspbox/3rdparty/flann/flann_free_index.m: -------------------------------------------------------------------------------- 1 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | % 4 | %THE BSD LICENSE 5 | % 6 | %Redistribution and use in source and binary forms, with or without 7 | %modification, are permitted provided that the following conditions 8 | %are met: 9 | % 10 | %1. Redistributions of source code must retain the above copyright 11 | % notice, this list of conditions and the following disclaimer. 12 | %2. Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % 16 | %THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | %IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | %OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | %IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | %INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | %NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | %DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | %THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | %(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | %THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | function flann_free_index(index_id) 28 | %FLANN_FREE_INDEX Deletes the nearest-neighbors index 29 | % 30 | % Deletes an index constructed using flann_build_index. 31 | 32 | % Marius Muja, January 2008 33 | 34 | nearest_neighbors('free_index',index_id); 35 | end 36 | -------------------------------------------------------------------------------- /gspbox/3rdparty/flann/flann_load_index.m: -------------------------------------------------------------------------------- 1 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | % 4 | %THE BSD LICENSE 5 | % 6 | %Redistribution and use in source and binary forms, with or without 7 | %modification, are permitted provided that the following conditions 8 | %are met: 9 | % 10 | %1. Redistributions of source code must retain the above copyright 11 | % notice, this list of conditions and the following disclaimer. 12 | %2. Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % 16 | %THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | %IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | %OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | %IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | %INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | %NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | %DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | %THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | %(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | %THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | function index = flann_load_index(filename, dataset) 28 | %FLANN_LOAD_INDEX Loads an index from disk 29 | % 30 | % Marius Muja, March 2009 31 | 32 | index = nearest_neighbors('load_index', filename, dataset); 33 | end 34 | -------------------------------------------------------------------------------- /gspbox/3rdparty/flann/flann_save_index.m: -------------------------------------------------------------------------------- 1 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | % 4 | %THE BSD LICENSE 5 | % 6 | %Redistribution and use in source and binary forms, with or without 7 | %modification, are permitted provided that the following conditions 8 | %are met: 9 | % 10 | %1. Redistributions of source code must retain the above copyright 11 | % notice, this list of conditions and the following disclaimer. 12 | %2. Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % 16 | %THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | %IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | %OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | %IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | %INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | %NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | %DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | %THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | %(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | %THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | function flann_save_index(index_id, filename) 28 | %FLANN_SAVE_INDEX Saves an index to disk 29 | % 30 | 31 | % Marius Muja, March 2010 32 | 33 | nearest_neighbors('save_index',index_id, filename); 34 | end 35 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/COPYING: -------------------------------------------------------------------------------- 1 | 2 | The BSD License 3 | 4 | Copyright (c) 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | Copyright (c) 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 11 | * Neither the name of the "University of British Columbia" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/ChangeLog: -------------------------------------------------------------------------------- 1 | Version 1.6.11 2 | * bug fixes 3 | 4 | Version 1.6.10 5 | * fixed a radiusSearch bug introduced in 1.6.9 6 | 7 | Version 1.6.9 8 | * bug fixes 9 | * fixed radius search bug on MSVC compiler 10 | * fixed windows linking problems 11 | 12 | Version 1.6.8 13 | * bug fixes, low dimensional search speedup 14 | 15 | Version 1.6.7 16 | * bug fixes 17 | 18 | Version 1.6.6 19 | * misc bug fixes 20 | 21 | Version 1.6.5 22 | * fix compilation problem on some C++ compilers 23 | * fixes in the python bindings 24 | 25 | Version 1.6.4 26 | * small bug fix 27 | 28 | Version 1.6.3 29 | * radius search speedup 30 | 31 | Version 1.6.2 32 | * slight API changes to the C++ bindings, now the main index type is templated 33 | * on the distance functor which makes it easier to use custom distances 34 | * new kd-tree implementation optimized for low dimensionality data 35 | * experimental MPI support for cluster computing 36 | 37 | Version 1.5 38 | * new C++ templated API 39 | * saving/loading of indices to disk 40 | * threadsafe search 41 | * new distance types (thanks to Radu Bogdan Rusu and Romain Thibaux for the patch) 42 | * (api change) autotuned is no longer selected by passing a precision >0, it's used when the algorithm type is set to autotuned 43 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/bin/indent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR=`dirname $0` 4 | uncrustify --no-backup -c ${DIR}/uncrustify.cfg $1 5 | 6 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/bin/make_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | VERSION=`grep "set(FLANN_VERSION" CMakeLists.txt | sed 's/[^0-9]*\([0-9]*\.[0-9]*\.[0-9]*\)[^0-9]*/\1/'` 3 | 4 | echo "Creating flann-$VERSION-src.zip" 5 | 6 | git archive --prefix=flann-$VERSION-src/ -o flann-$VERSION-src.zip $VERSION-src 7 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/bin/run_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | 3 | 4 | import sys 5 | import os.path as op 6 | import unittest 7 | 8 | if __name__ == "__main__": 9 | if len(sys.argv)==1: 10 | print "Usage: %s file"%sys.argv[0] 11 | sys.exit(1) 12 | 13 | python_path = op.abspath(op.join( op.dirname(__file__),"..","src","python")) 14 | sys.path.append(python_path) 15 | 16 | test_file = sys.argv[1] 17 | sys.argv = sys.argv[1:] 18 | execfile(test_file) 19 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(LATEX) 2 | 3 | if (EXISTS ${PDFLATEX_COMPILER} AND EXISTS ${BIBTEX_COMPILER}) 4 | include(${PROJECT_SOURCE_DIR}/cmake/UseLATEX.cmake) 5 | 6 | add_latex_document(manual.tex BIBFILES references.bib IMAGE_DIRS images DEFAULT_PDF) 7 | 8 | add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/manual.pdf 9 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/manual.pdf ${CMAKE_CURRENT_SOURCE_DIR}/manual.pdf 10 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/manual.pdf 11 | ) 12 | add_custom_target(doc DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/manual.pdf) 13 | endif() 14 | 15 | install( 16 | FILES manual.pdf 17 | DESTINATION share/doc/flann 18 | OPTIONAL 19 | ) 20 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/doc/images/cmake-gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/3rdparty/sources/flann-1.8.4-src/doc/images/cmake-gui.png -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_custom_target(examples ALL) 2 | 3 | 4 | if (BUILD_C_BINDINGS) 5 | add_executable(flann_example_c flann_example.c) 6 | target_link_libraries(flann_example_c flann) 7 | set_target_properties(flann_example_c PROPERTIES COMPILE_FLAGS -std=c99) 8 | 9 | add_dependencies(examples flann_example_c) 10 | install (TARGETS flann_example_c DESTINATION bin ) 11 | endif() 12 | 13 | if (HDF5_FOUND) 14 | include_directories(${HDF5_INCLUDE_DIR}) 15 | 16 | add_executable(flann_example_cpp flann_example.cpp) 17 | target_link_libraries(flann_example_cpp ${HDF5_LIBRARIES}) 18 | if (HDF5_IS_PARALLEL) 19 | target_link_libraries(flann_example_cpp ${MPI_LIBRARIES}) 20 | endif() 21 | 22 | add_dependencies(examples flann_example_cpp) 23 | install (TARGETS flann_example_cpp DESTINATION bin) 24 | 25 | 26 | if (USE_MPI AND HDF5_IS_PARALLEL) 27 | add_executable(flann_example_mpi flann_example_mpi.cpp) 28 | target_link_libraries(flann_example_mpi flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) 29 | 30 | add_dependencies(examples flann_example_mpi) 31 | install (TARGETS flann_example_mpi DESTINATION bin) 32 | endif() 33 | else() 34 | message("hdf5 library not found, not compiling flann_example.cpp") 35 | endif() 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/examples/README: -------------------------------------------------------------------------------- 1 | 2 | These examples use some datasets that are not included in the source distribution. You can download the datasets from here: 3 | 4 | http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/dataset.hdf5 5 | http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/dataset.dat 6 | http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/testset.dat 7 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/examples/flann_example.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | using namespace flann; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | int nn = 3; 12 | 13 | Matrix dataset; 14 | Matrix query; 15 | load_from_file(dataset, "dataset.hdf5","dataset"); 16 | load_from_file(query, "dataset.hdf5","query"); 17 | 18 | Matrix indices(new int[query.rows*nn], query.rows, nn); 19 | Matrix dists(new float[query.rows*nn], query.rows, nn); 20 | 21 | // construct an randomized kd-tree index using 4 kd-trees 22 | Index > index(dataset, flann::KDTreeIndexParams(4)); 23 | index.buildIndex(); 24 | 25 | // do a knn search, using 128 checks 26 | index.knnSearch(query, indices, dists, nn, flann::SearchParams(128)); 27 | 28 | flann::save_to_file(indices,"result.hdf5","result"); 29 | 30 | delete[] dataset.ptr(); 31 | delete[] query.ptr(); 32 | delete[] indices.ptr(); 33 | delete[] dists.ptr(); 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_subdirectory( cpp ) 3 | 4 | if (BUILD_MATLAB_BINDINGS) 5 | add_subdirectory( matlab ) 6 | endif() 7 | 8 | if (BUILD_PYTHON_BINDINGS) 9 | add_subdirectory( python ) 10 | endif() 11 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/cpp/flann/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef FLANN_CONFIG_H_ 31 | #define FLANN_CONFIG_H_ 32 | 33 | #ifdef FLANN_VERSION_ 34 | #undef FLANN_VERSION_ 35 | #endif 36 | #define FLANN_VERSION_ "1.8.4" 37 | 38 | #endif /* FLANN_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/cpp/flann/flann_cpp.cpp: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #include "flann/flann.hpp" 31 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/cpp/flann/mpi/flann_mpi_server.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char* argv[]) 7 | { 8 | boost::mpi::environment env(argc, argv); 9 | 10 | try { 11 | if (argc != 4) { 12 | std::cout << "Usage: " << argv[0] << " \n"; 13 | return 1; 14 | } 15 | flann::mpi::Server > server(argv[1], argv[2], std::atoi(argv[3]), 16 | flann::KDTreeIndexParams(4)); 17 | 18 | server.run(); 19 | } 20 | catch (std::exception& e) { 21 | std::cerr << "Exception: " << e.what() << "\n"; 22 | } 23 | 24 | return 0; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/matlab/flann_free_index.m: -------------------------------------------------------------------------------- 1 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | % 4 | %THE BSD LICENSE 5 | % 6 | %Redistribution and use in source and binary forms, with or without 7 | %modification, are permitted provided that the following conditions 8 | %are met: 9 | % 10 | %1. Redistributions of source code must retain the above copyright 11 | % notice, this list of conditions and the following disclaimer. 12 | %2. Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % 16 | %THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | %IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | %OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | %IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | %INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | %NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | %DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | %THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | %(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | %THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | function flann_free_index(index_id) 28 | %FLANN_FREE_INDEX Deletes the nearest-neighbors index 29 | % 30 | % Deletes an index constructed using flann_build_index. 31 | 32 | % Marius Muja, January 2008 33 | 34 | nearest_neighbors('free_index',index_id); 35 | end 36 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/matlab/flann_load_index.m: -------------------------------------------------------------------------------- 1 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | % 4 | %THE BSD LICENSE 5 | % 6 | %Redistribution and use in source and binary forms, with or without 7 | %modification, are permitted provided that the following conditions 8 | %are met: 9 | % 10 | %1. Redistributions of source code must retain the above copyright 11 | % notice, this list of conditions and the following disclaimer. 12 | %2. Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % 16 | %THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | %IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | %OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | %IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | %INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | %NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | %DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | %THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | %(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | %THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | function index = flann_load_index(filename, dataset) 28 | %FLANN_LOAD_INDEX Loads an index from disk 29 | % 30 | % Marius Muja, March 2009 31 | 32 | index = nearest_neighbors('load_index', filename, dataset); 33 | end 34 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/matlab/flann_save_index.m: -------------------------------------------------------------------------------- 1 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | %Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | % 4 | %THE BSD LICENSE 5 | % 6 | %Redistribution and use in source and binary forms, with or without 7 | %modification, are permitted provided that the following conditions 8 | %are met: 9 | % 10 | %1. Redistributions of source code must retain the above copyright 11 | % notice, this list of conditions and the following disclaimer. 12 | %2. Redistributions in binary form must reproduce the above copyright 13 | % notice, this list of conditions and the following disclaimer in the 14 | % documentation and/or other materials provided with the distribution. 15 | % 16 | %THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | %IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | %OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | %IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | %INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | %NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | %DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | %THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | %(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | %THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | function flann_save_index(index_id, filename) 28 | %FLANN_SAVE_INDEX Saves an index to disk 29 | % 30 | 31 | % Marius Muja, March 2010 32 | 33 | nearest_neighbors('save_index',index_id, filename); 34 | end 35 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file( setup.py.tpl setup.py ) 2 | 3 | install( DIRECTORY pyflann DESTINATION share/flann/python ) 4 | install( FILES ${CMAKE_CURRENT_BINARY_DIR}/setup.py DESTINATION share/flann/python ) 5 | 6 | 7 | # python instalation 8 | if (PYTHON_EXECUTABLE) 9 | install(CODE "execute_process( 10 | COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install 11 | WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\")") 12 | endif() 13 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/python/pyflann/__init__.py: -------------------------------------------------------------------------------- 1 | #Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | #Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | # 4 | #THE BSD LICENSE 5 | # 6 | #Redistribution and use in source and binary forms, with or without 7 | #modification, are permitted provided that the following conditions 8 | #are met: 9 | # 10 | #1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | #2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | #THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | #IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | #OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | #IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | #INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | #NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | #DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | #THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | #THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | #import sys 28 | #import os 29 | #sys.path.insert(0, os.path.split(__file__)[0]) # make python3 happy 30 | 31 | from pyflann.index import * 32 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/python/pyflann/exceptions.py: -------------------------------------------------------------------------------- 1 | #Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 2 | #Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 3 | # 4 | #THE BSD LICENSE 5 | # 6 | #Redistribution and use in source and binary forms, with or without 7 | #modification, are permitted provided that the following conditions 8 | #are met: 9 | # 10 | #1. Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | #2. Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in the 14 | # documentation and/or other materials provided with the distribution. 15 | # 16 | #THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | #IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | #OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | #IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | #INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | #NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | #DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | #THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | #THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | 28 | # This module defines exceptions that are used by the flann python bindings 29 | 30 | class FLANNException(Exception): 31 | def __init__(self, *args): 32 | Exception.__init__(self, *args) 33 | 34 | 35 | -------------------------------------------------------------------------------- /gspbox/3rdparty/sources/flann-1.8.4-src/src/python/setup.py.tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | 3 | from distutils.core import setup 4 | from os.path import exists, abspath, dirname, join 5 | import os 6 | import sys 7 | 8 | 9 | def find_path(): 10 | lib_paths = [ os.path.abspath('@LIBRARY_OUTPUT_PATH@'), abspath(join(dirname(dirname(sys.argv[0])), '../../../lib')) ] 11 | possible_libs = ['libflann.so', 'flann.dll', 'libflann.dll', 'libflann.dylib'] 12 | 13 | for path in lib_paths: 14 | for lib in possible_libs: 15 | if exists(join(path,lib)): 16 | return path 17 | 18 | setup(name='flann', 19 | version='@FLANN_VERSION@', 20 | description='Fast Library for Approximate Nearest Neighbors', 21 | author='Marius Muja', 22 | author_email='mariusm@cs.ubc.ca', 23 | license='BSD', 24 | url='http://www.cs.ubc.ca/~mariusm/flann/', 25 | packages=['pyflann', 'pyflann.lib'], 26 | package_dir={'pyflann.lib': find_path() }, 27 | package_data={'pyflann.lib': ['libflann.so', 'flann.dll', 'libflann.dll', 'libflann.dylib']}, 28 | ) 29 | -------------------------------------------------------------------------------- /gspbox/Contents.m: -------------------------------------------------------------------------------- 1 | % GSPBOX - Startup 2 | % 3 | % Start 4 | % gsp_start - Lauch the toolbox 5 | % gsp_make - Compile the toolbox 6 | % gsp_install - Install the 3rdparty software and try to compile souces 7 | % gsp_install_unlocbox - Install the UNLocBoX 8 | % 9 | % For help, bug reports, suggestions etc. please send email to 10 | % gspbox 'dash' support 'at' groupes 'dot' epfl 'dot' ch 11 | % 12 | % 13 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/Contents.html 14 | 15 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 16 | % This file is part of GSPbox version 0.7.5 17 | % 18 | % This program is free software: you can redistribute it and/or modify 19 | % it under the terms of the GNU General Public License as published by 20 | % the Free Software Foundation, either version 3 of the License, or 21 | % (at your option) any later version. 22 | % 23 | % This program is distributed in the hope that it will be useful, 24 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | % GNU General Public License for more details. 27 | % 28 | % You should have received a copy of the GNU General Public License 29 | % along with this program. If not, see . 30 | 31 | % If you use this toolbox please kindly cite 32 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 33 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 34 | % ArXiv e-prints, Aug. 2014. 35 | % http://arxiv.org/abs/1408.5781 36 | 37 | 38 | -------------------------------------------------------------------------------- /gspbox/README.md: -------------------------------------------------------------------------------- 1 | Graph Signal Processing Toolbox (GSPBox) 2 | ====== 3 | 4 | The official Graph Signal Processing Toolbox (GSPBox) 5 | 6 | Running the toolbox 7 | == 8 | 9 | In Matlab type 10 | 11 | gsp_start 12 | 13 | as the first command from the installation directory. This will set up the correct paths. 14 | 15 | The gsp_start command will add all the necessary subdirectories (so 16 | please don't add these manually), and it will print a statement 17 | telling you which backend you are currently using. 18 | 19 | Compiling the toolbox 20 | === 21 | 22 | In Matlab type 23 | 24 | gsp_make 25 | 26 | as the first command from the installation directory. This will try to compile the mex interface for 27 | the third party components: AMD and LDL. 28 | 29 | You need the library stdc++ to compile AMD and LDL. On Ubuntu you can type: 30 | 31 | sudo apt-get install libstdc++6 32 | 33 | 34 | Installing third party software 35 | ==== 36 | 37 | In Matlab type 38 | 39 | gsp_install 40 | 41 | as the first command from the installation directory. This will try to download and install third party 42 | software. 43 | 44 | 45 | Documentation 46 | === 47 | 48 | You can find the complete online documentation here : http://lts2research.epfl.ch/gsp/doc/start/ 49 | 50 | -------------------------------------------------------------------------------- /gspbox/embedding/Contents.m: -------------------------------------------------------------------------------- 1 | % GSPBOX - Embeddings 2 | % 3 | % Availlable embeddings 4 | % gsp_lle - Local Linear Embedding 5 | % gsp_laplacian_eigenmaps - Laplacian Eigenmaps 6 | % gsp_isomap - Isomap 7 | % gsp_eigenspace_estimation - Fast Eigenspace Approximation using Random Signals (FEARS) 8 | % 9 | % Utils 10 | % gsp_weight2distance - Distance matrix from weight matrix 11 | % gsp_compute_coordinates - Compute new coordinates for a graph 12 | % 13 | % For help, bug reports, suggestions etc. please send email to 14 | % gspbox 'dash' support 'at' groupes 'dot' epfl 'dot' ch 15 | % 16 | % 17 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/embedding/Contents.html 18 | 19 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 20 | % This file is part of GSPbox version 0.7.5 21 | % 22 | % This program is free software: you can redistribute it and/or modify 23 | % it under the terms of the GNU General Public License as published by 24 | % the Free Software Foundation, either version 3 of the License, or 25 | % (at your option) any later version. 26 | % 27 | % This program is distributed in the hope that it will be useful, 28 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | % GNU General Public License for more details. 31 | % 32 | % You should have received a copy of the GNU General Public License 33 | % along with this program. If not, see . 34 | 35 | % If you use this toolbox please kindly cite 36 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 37 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 38 | % ArXiv e-prints, Aug. 2014. 39 | % http://arxiv.org/abs/1408.5781 40 | 41 | -------------------------------------------------------------------------------- /gspbox/filters/gsp_jtv_mat2vec.m: -------------------------------------------------------------------------------- 1 | function C = gsp_jtv_mat2vec(C) 2 | %GSP_JTV_MAT2VEC vector to matrix transform 3 | % Usage: C = gsp_jtv_mat2vec(C); 4 | % 5 | % Input parameters: 6 | % C : Data 7 | % 8 | % Ouput parameter 9 | % C : Data 10 | % 11 | % Reshape the data from the matrix form to the vector form 12 | % 13 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/filters/gsp_jtv_mat2vec.html 14 | 15 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 16 | % This file is part of GSPbox version 0.7.5 17 | % 18 | % This program is free software: you can redistribute it and/or modify 19 | % it under the terms of the GNU General Public License as published by 20 | % the Free Software Foundation, either version 3 of the License, or 21 | % (at your option) any later version. 22 | % 23 | % This program is distributed in the hope that it will be useful, 24 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | % GNU General Public License for more details. 27 | % 28 | % You should have received a copy of the GNU General Public License 29 | % along with this program. If not, see . 30 | 31 | % If you use this toolbox please kindly cite 32 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 33 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 34 | % ArXiv e-prints, Aug. 2014. 35 | % http://arxiv.org/abs/1408.5781 36 | 37 | [N,T,Nf,Ns] = size(C); 38 | 39 | 40 | C = reshape(C,N*T*Nf,Ns); 41 | 42 | end 43 | -------------------------------------------------------------------------------- /gspbox/filters/gsp_jtv_vec2mat.m: -------------------------------------------------------------------------------- 1 | function X = gsp_jtv_vec2mat(G,X) 2 | %GSP_JTV_VEC2MAT vector to matrix transform 3 | % Usage: d = gsp_jtv_vec2mat(G,X); 4 | % 5 | % Input parameters: 6 | % G : Graph 7 | % X : Data 8 | % 9 | % Ouput parameter 10 | % X : Data 11 | % 12 | % Reshape the data from the vector form to the matrix form 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/filters/gsp_jtv_vec2mat.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | 39 | [Nx,Ny] = size(X); 40 | 41 | X = reshape(X,G.N,G.jtv.T,Nx/G.N/G.jtv.T,Ny); 42 | 43 | 44 | end 45 | -------------------------------------------------------------------------------- /gspbox/filters/gsp_mat2vec.m: -------------------------------------------------------------------------------- 1 | function [ d ,Nf] = gsp_mat2vec( d ) 2 | %GSP_MAT2VEC vector to matrix transform 3 | % Usage: d = gsp_mat2vec( d ); 4 | % [ d ,Nf] = gsp_mat2vec( d ); 5 | % 6 | % Input parameters: 7 | % d : Data 8 | % 9 | % Ouput parameter 10 | % d : Data 11 | % Nf : Number of filter 12 | % 13 | % Reshape the data from the matrix form to the vector form 14 | % 15 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/filters/gsp_mat2vec.html 16 | 17 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 18 | % This file is part of GSPbox version 0.7.5 19 | % 20 | % This program is free software: you can redistribute it and/or modify 21 | % it under the terms of the GNU General Public License as published by 22 | % the Free Software Foundation, either version 3 of the License, or 23 | % (at your option) any later version. 24 | % 25 | % This program is distributed in the hope that it will be useful, 26 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | % GNU General Public License for more details. 29 | % 30 | % You should have received a copy of the GNU General Public License 31 | % along with this program. If not, see . 32 | 33 | % If you use this toolbox please kindly cite 34 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 35 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 36 | % ArXiv e-prints, Aug. 2014. 37 | % http://arxiv.org/abs/1408.5781 38 | 39 | % TESTING: test_filter 40 | 41 | if iscell(d) 42 | Nc = numel(d); 43 | d2 = cell(Nc,1); 44 | for ii = 1:Nc 45 | d2{ii} = gsp_mat2vec(d{ii}); 46 | end 47 | d = d2; 48 | return 49 | end 50 | 51 | [M,Nf,N] = size(d); 52 | 53 | d = reshape(d,M*Nf,N); 54 | 55 | 56 | end 57 | 58 | 59 | -------------------------------------------------------------------------------- /gspbox/filters/gsp_vec2mat.m: -------------------------------------------------------------------------------- 1 | function [ d ] = gsp_vec2mat( d,Nf ) 2 | %GSP_VEC2MAT vector to matrix transform 3 | % Usage: d = gsp_vec2mat( d,Nf ); 4 | % 5 | % Input parameters: 6 | % d : Data 7 | % Nf : Number of filter 8 | % 9 | % Ouput parameter 10 | % d : Data 11 | % 12 | % Reshape the data from the vector form to the matrix form 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/filters/gsp_vec2mat.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | % TESTING: test_filter 39 | 40 | [M,N] = size(d); 41 | 42 | d = reshape(d,M/Nf,Nf,N); 43 | 44 | 45 | end 46 | 47 | 48 | -------------------------------------------------------------------------------- /gspbox/filters/gsp_warp_filter.m: -------------------------------------------------------------------------------- 1 | function gw = gsp_warp_filter(g,w) 2 | %GSP_WARP_FILTER Warp the filterbank g with the filter w 3 | % Usage: gw = gsp_warp_filter(g,w); 4 | % 5 | % Input parameters: 6 | % g : filterbank 7 | % w : warping filter 8 | % 9 | % Output parameters: 10 | % gw : warped filterbank 11 | % 12 | % The resulting filter gw is gw(x)=w(g(x)). 13 | % 14 | % 15 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/filters/gsp_warp_filter.html 16 | 17 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 18 | % This file is part of GSPbox version 0.7.5 19 | % 20 | % This program is free software: you can redistribute it and/or modify 21 | % it under the terms of the GNU General Public License as published by 22 | % the Free Software Foundation, either version 3 of the License, or 23 | % (at your option) any later version. 24 | % 25 | % This program is distributed in the hope that it will be useful, 26 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | % GNU General Public License for more details. 29 | % 30 | % You should have received a copy of the GNU General Public License 31 | % along with this program. If not, see . 32 | 33 | % If you use this toolbox please kindly cite 34 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 35 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 36 | % ArXiv e-prints, Aug. 2014. 37 | % http://arxiv.org/abs/1408.5781 38 | 39 | % Author: Nathanael Perraudin 40 | % Date : 30 September 2015 41 | 42 | Nf = numel(g); 43 | 44 | if ~iscell(g) 45 | g = {g}; 46 | end 47 | 48 | gw = cell(Nf,1); 49 | 50 | for ii = 1:Nf 51 | gw{ii} = @(x) w(g{ii}(x)); 52 | end 53 | 54 | 55 | end 56 | -------------------------------------------------------------------------------- /gspbox/graph_ml/.gitignore: -------------------------------------------------------------------------------- 1 | figures/* -------------------------------------------------------------------------------- /gspbox/graph_ml/gsp_classification_matrix.m: -------------------------------------------------------------------------------- 1 | function B = gsp_classification_matrix(f) 2 | %GSP_CLASSIFICATION_MATRIX Create the classification matrix from label f 3 | % Usage: B = gsp_classification_matrix(f); 4 | % 5 | % Input parameters: 6 | % f : Labels 7 | % Output parameters: 8 | % B : Classification matrix 9 | % 10 | % See also: gsp_matrix2label gsp_classification_tik gsp_classification_tv 11 | % 12 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/graph_ml/gsp_classification_matrix.html 13 | 14 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 15 | % This file is part of GSPbox version 0.7.5 16 | % 17 | % This program is free software: you can redistribute it and/or modify 18 | % it under the terms of the GNU General Public License as published by 19 | % the Free Software Foundation, either version 3 of the License, or 20 | % (at your option) any later version. 21 | % 22 | % This program is distributed in the hope that it will be useful, 23 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | % GNU General Public License for more details. 26 | % 27 | % You should have received a copy of the GNU General Public License 28 | % along with this program. If not, see . 29 | 30 | % If you use this toolbox please kindly cite 31 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 32 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 33 | % ArXiv e-prints, Aug. 2014. 34 | % http://arxiv.org/abs/1408.5781 35 | 36 | % Author: Nathanael Perraudin 37 | % Date : 24 July 2015 38 | 39 | minf = min(f); 40 | maxf = max(f); 41 | d = minf:maxf; 42 | B = zeros(numel(f),numel(d)); 43 | for ii = 1:numel(d) 44 | B(:,ii) = double(f==d(ii)); 45 | end 46 | 47 | B = double(B); 48 | 49 | end 50 | -------------------------------------------------------------------------------- /gspbox/graph_ml/gsp_matrix2label.m: -------------------------------------------------------------------------------- 1 | function [ f ] = gsp_matrix2label( B, minf ) 2 | %GSP_MATRIY2LABEL Reconstruct labels from matrix 3 | % Usage: f = gsp_matrix2label( B ); 4 | % f = gsp_matrix2label( B, minf ); 5 | % 6 | % Input parameters: 7 | % B : Classification matrix 8 | % minf: smallest integer (default 0) 9 | % Output parameters: 10 | % f : Labels 11 | % 12 | % See also: gsp_classification_matrix gsp_classification_tik gsp_classification_tv 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/graph_ml/gsp_matrix2label.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | % Author: Nathanael Perraudin 39 | % Date : 24 July 2015 40 | 41 | if nargin<2 42 | minf = 0; 43 | end 44 | 45 | [~,f] = max(B,[],2); 46 | f = f-1+minf; 47 | 48 | end 49 | 50 | 51 | -------------------------------------------------------------------------------- /gspbox/graphs/gsp_separate_graph.m: -------------------------------------------------------------------------------- 1 | function [ Gout ] = gsp_separate_graph( G ) 2 | %GSP_SEPARATE_GRAPH Separate the graph G into disconnected components 3 | % Usage: [ Gout ] = gsp_separate_graph( G ) 4 | % 5 | % Input parameters: 6 | % G : Original graph 7 | % 8 | % Output parameters: 9 | % Gout: Cell array of graphs 10 | % 11 | % 12 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/graphs/gsp_separate_graph.html 13 | 14 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 15 | % This file is part of GSPbox version 0.7.5 16 | % 17 | % This program is free software: you can redistribute it and/or modify 18 | % it under the terms of the GNU General Public License as published by 19 | % the Free Software Foundation, either version 3 of the License, or 20 | % (at your option) any later version. 21 | % 22 | % This program is distributed in the hope that it will be useful, 23 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | % GNU General Public License for more details. 26 | % 27 | % You should have received a copy of the GNU General Public License 28 | % along with this program. If not, see . 29 | 30 | % If you use this toolbox please kindly cite 31 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 32 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 33 | % ArXiv e-prints, Aug. 2014. 34 | % http://arxiv.org/abs/1408.5781 35 | 36 | % Author: Nathanael Perraudin 37 | % Date : Mai 2014 38 | 39 | % TODO: DO this operation better 40 | G = gsp_compute_fourier_basis(G); 41 | 42 | NG = sum(G.E < 1e-10); 43 | 44 | error('Not implemented'); 45 | 46 | Gout = 0; 47 | 48 | 49 | end 50 | 51 | 52 | -------------------------------------------------------------------------------- /gspbox/graphs/gsp_update_coordinates.m: -------------------------------------------------------------------------------- 1 | function G = gsp_update_coordinates(G, coords) 2 | %GSP_UPDATE_COORDINATES Updates the coordinates of a graph structure 3 | % Usage: G = gsp_update_coordinates(G, coords); 4 | % 5 | % Input parameters 6 | % G : Graph 7 | % coords : New coordinates 8 | % 9 | % Output parameters 10 | % G : Output graph 11 | % 12 | % Update the coordinates of a graph structure 13 | % 14 | % See also: gsp_compute_coordinates 15 | % 16 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/graphs/gsp_update_coordinates.html 17 | 18 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 19 | % This file is part of GSPbox version 0.7.5 20 | % 21 | % This program is free software: you can redistribute it and/or modify 22 | % it under the terms of the GNU General Public License as published by 23 | % the Free Software Foundation, either version 3 of the License, or 24 | % (at your option) any later version. 25 | % 26 | % This program is distributed in the hope that it will be useful, 27 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | % GNU General Public License for more details. 30 | % 31 | % You should have received a copy of the GNU General Public License 32 | % along with this program. If not, see . 33 | 34 | % If you use this toolbox please kindly cite 35 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 36 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 37 | % ArXiv e-prints, Aug. 2014. 38 | % http://arxiv.org/abs/1408.5781 39 | 40 | % Authors : Dion O. E. Tzamarias 41 | % Date : 20/11/2015 42 | 43 | G.coords = coords; 44 | G = rmfield(G,'plotting'); 45 | G = gsp_graph_default_plotting_parameters(G); 46 | 47 | end 48 | -------------------------------------------------------------------------------- /gspbox/graphs/misc/david500.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/graphs/misc/david500.mat -------------------------------------------------------------------------------- /gspbox/graphs/misc/david64.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/graphs/misc/david64.mat -------------------------------------------------------------------------------- /gspbox/graphs/misc/logogsp.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/graphs/misc/logogsp.mat -------------------------------------------------------------------------------- /gspbox/graphs/misc/minnesota.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/graphs/misc/minnesota.mat -------------------------------------------------------------------------------- /gspbox/graphs/misc/rescale_center.m: -------------------------------------------------------------------------------- 1 | function r = rescale_center(x) 2 | %RESCALE_CENTER Rescaling the dataset 3 | % 4 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/graphs/misc/rescale_center.html 5 | 6 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 7 | % This file is part of GSPbox version 0.7.5 8 | % 9 | % This program is free software: you can redistribute it and/or modify 10 | % it under the terms of the GNU General Public License as published by 11 | % the Free Software Foundation, either version 3 of the License, or 12 | % (at your option) any later version. 13 | % 14 | % This program is distributed in the hope that it will be useful, 15 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | % GNU General Public License for more details. 18 | % 19 | % You should have received a copy of the GNU General Public License 20 | % along with this program. If not, see . 21 | 22 | % If you use this toolbox please kindly cite 23 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 24 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 25 | % ArXiv e-prints, Aug. 2014. 26 | % http://arxiv.org/abs/1408.5781 27 | 28 | N=size(x,2); 29 | x=x-repmat(mean(x,2),[1,N]); 30 | c=max(abs(x(:))); 31 | r=x/c; 32 | 33 | 34 | end 35 | 36 | 37 | -------------------------------------------------------------------------------- /gspbox/gspbox_version: -------------------------------------------------------------------------------- 1 | 0.7.5 2 | -------------------------------------------------------------------------------- /gspbox/imageprocessing/Contents.m: -------------------------------------------------------------------------------- 1 | % GSPBOX - Image Processing 2 | % 3 | % Utils 4 | % gsp_patch_graph - Create a graph connecting image pixels 5 | % 6 | % For help, bug reports, suggestions etc. please send email to 7 | % gspbox 'dash' support 'at' groupes 'dot' epfl 'dot' ch 8 | % 9 | % 10 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/imageprocessing/Contents.html 11 | 12 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 13 | % This file is part of GSPbox version 0.7.5 14 | % 15 | % This program is free software: you can redistribute it and/or modify 16 | % it under the terms of the GNU General Public License as published by 17 | % the Free Software Foundation, either version 3 of the License, or 18 | % (at your option) any later version. 19 | % 20 | % This program is distributed in the hope that it will be useful, 21 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | % GNU General Public License for more details. 24 | % 25 | % You should have received a copy of the GNU General Public License 26 | % along with this program. If not, see . 27 | 28 | % If you use this toolbox please kindly cite 29 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 30 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 31 | % ArXiv e-prints, Aug. 2014. 32 | % http://arxiv.org/abs/1408.5781 33 | 34 | -------------------------------------------------------------------------------- /gspbox/learn_graph/Contents.m: -------------------------------------------------------------------------------- 1 | % GSPBOX - Graph learning 2 | % 3 | % Optimization model - Learning from smooth signal 4 | % gsp_learn_graph_log_degrees - Learn weighted adjacency matrix from pairwise distances using negative log prior on nodes degrees 5 | % gsp_learn_graph_l2_degrees - Learn weighted adjacency matrix from pairwise distances using l2 prior on nodes degrees 6 | % 7 | % Measure of graph quality 8 | % gsp_learn_tcer - Compute the total cumulative energy residual. 9 | % 10 | % For help, bug reports, suggestions etc. please send email to 11 | % gspbox 'dash' support 'at' groupes 'dot' epfl 'dot' ch 12 | % 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/learn_graph/Contents.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | 39 | -------------------------------------------------------------------------------- /gspbox/operators/gsp_kron_reduction.m: -------------------------------------------------------------------------------- 1 | function Gnew = gsp_kron_reduction( G,ind ) 2 | %GSP_KRON_REDUCTION See gsp_kron_reduce 3 | % 4 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/operators/gsp_kron_reduction.html 5 | 6 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 7 | % This file is part of GSPbox version 0.7.5 8 | % 9 | % This program is free software: you can redistribute it and/or modify 10 | % it under the terms of the GNU General Public License as published by 11 | % the Free Software Foundation, either version 3 of the License, or 12 | % (at your option) any later version. 13 | % 14 | % This program is distributed in the hope that it will be useful, 15 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | % GNU General Public License for more details. 18 | % 19 | % You should have received a copy of the GNU General Public License 20 | % along with this program. If not, see . 21 | 22 | % If you use this toolbox please kindly cite 23 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 24 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 25 | % ArXiv e-prints, Aug. 2014. 26 | % http://arxiv.org/abs/1408.5781 27 | 28 | Gnew = gsp_kron_reduce(G,ind); 29 | 30 | 31 | end 32 | 33 | 34 | -------------------------------------------------------------------------------- /gspbox/operators/gsp_modulate.m: -------------------------------------------------------------------------------- 1 | function [ fm ] = gsp_modulate( G,f,k ) 2 | %GSP_MODULATE Generalized modulation of the signal f to the frequency k 3 | % Usage: fm = gsp_modulate( G,f,k ); 4 | % 5 | % Input parameters 6 | % G : Graph 7 | % f : Signal (column) 8 | % k : Indices of frequencies (int) 9 | % Output parameters 10 | % fm : Modulated signal 11 | % 12 | % This function modulate the column vector f onto the node i. If f is a 13 | % matrix, the modulation will be applicated to each column. 14 | % 15 | % 16 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/operators/gsp_modulate.html 17 | 18 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 19 | % This file is part of GSPbox version 0.7.5 20 | % 21 | % This program is free software: you can redistribute it and/or modify 22 | % it under the terms of the GNU General Public License as published by 23 | % the Free Software Foundation, either version 3 of the License, or 24 | % (at your option) any later version. 25 | % 26 | % This program is distributed in the hope that it will be useful, 27 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | % GNU General Public License for more details. 30 | % 31 | % You should have received a copy of the GNU General Public License 32 | % along with this program. If not, see . 33 | 34 | % If you use this toolbox please kindly cite 35 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 36 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 37 | % ArXiv e-prints, Aug. 2014. 38 | % http://arxiv.org/abs/1408.5781 39 | 40 | % Author: Nathanael Perraudin 41 | % Date : 09.12.2013 42 | 43 | nt = size(f,2); 44 | 45 | fm = sqrt(G.N)*repmat(f,1,nt).*repmat(G.U(:,k+1),1,nt); 46 | 47 | 48 | end 49 | 50 | -------------------------------------------------------------------------------- /gspbox/pointsclouds/Contents.m: -------------------------------------------------------------------------------- 1 | % GSPBOX - Pointclouds 2 | % 3 | % Generate pointclouds 4 | % gsp_twospirals - Generate two spirals 5 | % 6 | % Utils 7 | % gsp_pointcloud - Load a pointcloud model and returns the set of points 8 | % 9 | % For help, bug reports, suggestions etc. please send email to 10 | % gspbox 'dash' support 'at' groupes 'dot' epfl 'dot' ch 11 | % 12 | % 13 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/pointsclouds/Contents.html 14 | 15 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 16 | % This file is part of GSPbox version 0.7.5 17 | % 18 | % This program is free software: you can redistribute it and/or modify 19 | % it under the terms of the GNU General Public License as published by 20 | % the Free Software Foundation, either version 3 of the License, or 21 | % (at your option) any later version. 22 | % 23 | % This program is distributed in the hope that it will be useful, 24 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | % GNU General Public License for more details. 27 | % 28 | % You should have received a copy of the GNU General Public License 29 | % along with this program. If not, see . 30 | 31 | % If you use this toolbox please kindly cite 32 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 33 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 34 | % ArXiv e-prints, Aug. 2014. 35 | % http://arxiv.org/abs/1408.5781 36 | 37 | -------------------------------------------------------------------------------- /gspbox/pointsclouds/airfoil.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/pointsclouds/airfoil.mat -------------------------------------------------------------------------------- /gspbox/pointsclouds/bunny.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/pointsclouds/bunny.mat -------------------------------------------------------------------------------- /gspbox/pointsclouds/to_be_included/crescentfullmoon.m: -------------------------------------------------------------------------------- 1 | function data = crescentfullmoon(N, r1, r2, r3) 2 | 3 | if nargin < 1 4 | N = 1000; 5 | end 6 | if mod(N,4) ~= 0 7 | N = round(N/4) * 4; 8 | end 9 | if nargin < 2 10 | r1 = 5; 11 | end 12 | if nargin < 3 13 | r2 = 10; 14 | end 15 | if nargin < 4 16 | r3 = 15; 17 | end 18 | 19 | N1 = N/4; 20 | N2 = N-N1; 21 | 22 | phi1 = rand(N1,1) * 2 * pi; 23 | R1 = sqrt(rand(N1, 1)); 24 | moon = [cos(phi1) .* R1 * r1 sin(phi1) .* R1 * r1 zeros(N1,1)]; 25 | 26 | d = r3 - r2; 27 | phi2 = pi + rand(N2,1) * pi; 28 | R2 = sqrt(rand(N2,1)); 29 | crescent = [cos(phi2) .* (r2 + R2 * d) sin(phi2) .* (r2 + R2 * d) ones(N2,1)]; 30 | 31 | data = [moon; crescent]; 32 | % 33 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/pointsclouds/to_be_included/crescentfullmoon.html 34 | 35 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 36 | % This file is part of GSPbox version 0.7.5 37 | % 38 | % This program is free software: you can redistribute it and/or modify 39 | % it under the terms of the GNU General Public License as published by 40 | % the Free Software Foundation, either version 3 of the License, or 41 | % (at your option) any later version. 42 | % 43 | % This program is distributed in the hope that it will be useful, 44 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 45 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 46 | % GNU General Public License for more details. 47 | % 48 | % You should have received a copy of the GNU General Public License 49 | % along with this program. If not, see . 50 | 51 | % If you use this toolbox please kindly cite 52 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 53 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 54 | % ArXiv e-prints, Aug. 2014. 55 | % http://arxiv.org/abs/1408.5781 56 | data = [moon; crescent]; 57 | -------------------------------------------------------------------------------- /gspbox/pointsclouds/to_be_included/datasets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/pointsclouds/to_be_included/datasets.png -------------------------------------------------------------------------------- /gspbox/pointsclouds/two_moons.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/gspbox/pointsclouds/two_moons.mat -------------------------------------------------------------------------------- /gspbox/utils/gsp_cfa.m: -------------------------------------------------------------------------------- 1 | function [ fa ] = gsp_cfa( T,fs ) 2 | %GSP_CFA Create frequency axis 3 | % Usage: fa = gsp_cfa(N); 4 | % fa = gsp_cfa(N,fs); 5 | % 6 | % Input parameters: 7 | % N : Number of samples 8 | % fs : Sampling frequency (default 1) 9 | % Ouput parameters: 10 | % fa : Frequency axis 11 | % 12 | % This function create a normalized frequency axis corresponding to the 13 | % frequency of the function fft. 14 | % 15 | % 16 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_cfa.html 17 | 18 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 19 | % This file is part of GSPbox version 0.7.5 20 | % 21 | % This program is free software: you can redistribute it and/or modify 22 | % it under the terms of the GNU General Public License as published by 23 | % the Free Software Foundation, either version 3 of the License, or 24 | % (at your option) any later version. 25 | % 26 | % This program is distributed in the hope that it will be useful, 27 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | % GNU General Public License for more details. 30 | % 31 | % You should have received a copy of the GNU General Public License 32 | % along with this program. If not, see . 33 | 34 | % If you use this toolbox please kindly cite 35 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 36 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 37 | % ArXiv e-prints, Aug. 2014. 38 | % http://arxiv.org/abs/1408.5781 39 | 40 | % Author: Nathanael Perraudin 41 | 42 | if nargin<2 43 | fs = 1; 44 | end 45 | 46 | if mod(T,2) 47 | fa = linspace(-0.5+1/(2*T),0.5-1/(2*T),T); 48 | else 49 | fa = linspace(-0.5,0.5-1/T,T); 50 | end 51 | 52 | fa = fa*fs; 53 | 54 | fa = ifftshift(fa); 55 | fa = fa(:); 56 | 57 | end 58 | 59 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_check_filtertype.m: -------------------------------------------------------------------------------- 1 | function bool = gsp_check_filtertype(filtertype,type) 2 | %GSP_CHECK_FILTERTYPE Check the type of filter used 3 | % 4 | % Usage: bool = gsp_check_fourier(G): 5 | % 6 | % Input parameters: 7 | % filtertype : filtertype to check 8 | % type : type list 9 | % Output parameters: 10 | % bool : boolean 11 | % 12 | % Check the type of filter used between js, js-array, ts, ts-array 13 | % 14 | % 15 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_check_filtertype.html 16 | 17 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 18 | % This file is part of GSPbox version 0.7.5 19 | % 20 | % This program is free software: you can redistribute it and/or modify 21 | % it under the terms of the GNU General Public License as published by 22 | % the Free Software Foundation, either version 3 of the License, or 23 | % (at your option) any later version. 24 | % 25 | % This program is distributed in the hope that it will be useful, 26 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | % GNU General Public License for more details. 29 | % 30 | % You should have received a copy of the GNU General Public License 31 | % along with this program. If not, see . 32 | 33 | % If you use this toolbox please kindly cite 34 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 35 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 36 | % ArXiv e-prints, Aug. 2014. 37 | % http://arxiv.org/abs/1408.5781 38 | 39 | if nargin<2 40 | type = {'js','js-array','ts','ts-array'}; 41 | end 42 | 43 | 44 | bool = 0; 45 | 46 | if ~ischar(filtertype) 47 | return 48 | end 49 | 50 | if ~any(strcmpi(filtertype,type)) 51 | return 52 | end 53 | 54 | bool = 1; 55 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_check_fourier.m: -------------------------------------------------------------------------------- 1 | function bool = gsp_check_fourier(G) 2 | %GSP_CHECK_FOURIER Check is the Fourier basis is computed 3 | % Usage: bool = gsp_check_fourier(G): 4 | % 5 | % Input parameters: 6 | % G : Graph structure 7 | % Output parameters: 8 | % bool : boolean 9 | % 10 | % This function check is the Laplacian eigenvalues and eigenfunctions are 11 | % computed. 12 | % 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_check_fourier.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | bool = ( isfield(G,'e') && isfield(G,'U') ); 39 | 40 | end 41 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_check_jtv.m: -------------------------------------------------------------------------------- 1 | function bool = gsp_check_jtv(G) 2 | %GSP_CHECK_JTV Check if G is a JTV graph 3 | % Usage: bool = gsp_check_jtv(G): 4 | % 5 | % Input parameters: 6 | % G : Graph structure 7 | % Output parameters: 8 | % bool : boolean 9 | % 10 | % This function check if the structure G is a valid Joint Time-Vertex 11 | % Graph structure 12 | % 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_check_jtv.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | bool = 0; 39 | 40 | if ~isstruct(G) 41 | error('Input is not a valid Graph structure') 42 | end 43 | 44 | if ~isfield(G.jtv,'T') 45 | return 46 | end 47 | 48 | if or(~isfield(G.jtv,'T'),~isfield(G.jtv,'fs')) 49 | return 50 | end 51 | 52 | bool = 1; 53 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_compute_graph_learning_theta.m: -------------------------------------------------------------------------------- 1 | function [theta, theta_min, theta_max] = gsp_compute_graph_learning_theta(Z, k, geom_mean, is_sorted) 2 | 3 | if nargin < 3 || isempty(geom_mean) 4 | geom_mean = 0; 5 | end 6 | 7 | if nargin < 4 8 | is_sorted = 0; 9 | end 10 | 11 | % Z is the zero-diagonal pairwise distance matrix between nodes 12 | % 13 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_compute_graph_learning_theta.html 14 | 15 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 16 | % This file is part of GSPbox version 0.7.5 17 | % 18 | % This program is free software: you can redistribute it and/or modify 19 | % it under the terms of the GNU General Public License as published by 20 | % the Free Software Foundation, either version 3 of the License, or 21 | % (at your option) any later version. 22 | % 23 | % This program is distributed in the hope that it will be useful, 24 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | % GNU General Public License for more details. 27 | % 28 | % You should have received a copy of the GNU General Public License 29 | % along with this program. If not, see . 30 | 31 | % If you use this toolbox please kindly cite 32 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 33 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 34 | % ArXiv e-prints, Aug. 2014. 35 | % http://arxiv.org/abs/1408.5781 36 | [theta_min, theta_max] = gsp_compute_theta_bounds(Z, geom_mean, is_sorted); 37 | theta_min = theta_min(k); 38 | theta_max = theta_max(k); 39 | 40 | if k > 1 41 | theta = sqrt(theta_min * theta_max); 42 | else 43 | theta = theta_min * 1.1; 44 | end 45 | 46 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_ddf2dcdf.m: -------------------------------------------------------------------------------- 1 | function [y,x] = gsp_ddf2dcdf(v,x) 2 | %GSP_DDF2DCDF Discrete density function to dicrete cumulative density function 3 | % Usage : [y] = gsp_ddf2dcdf(v); 4 | % [y,x] = gsp_ddf2dcdf(v,x); 5 | % 6 | % Input parameters: 7 | % v : Discrete density function 8 | % x : Axis value (Optional) 9 | % Output parameters: 10 | % y : Discrete cumulative ensity function 11 | % x : Axis value (Same as input) 12 | % 13 | % This function goes from discrete density function to discrete 14 | % cumulative density function. 15 | % 16 | % 17 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_ddf2dcdf.html 18 | 19 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 20 | % This file is part of GSPbox version 0.7.5 21 | % 22 | % This program is free software: you can redistribute it and/or modify 23 | % it under the terms of the GNU General Public License as published by 24 | % the Free Software Foundation, either version 3 of the License, or 25 | % (at your option) any later version. 26 | % 27 | % This program is distributed in the hope that it will be useful, 28 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | % GNU General Public License for more details. 31 | % 32 | % You should have received a copy of the GNU General Public License 33 | % along with this program. If not, see . 34 | 35 | % If you use this toolbox please kindly cite 36 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 37 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 38 | % ArXiv e-prints, Aug. 2014. 39 | % http://arxiv.org/abs/1408.5781 40 | 41 | 42 | N = length(v); 43 | y = zeros(N,1); 44 | y(1) = v(1); 45 | for ii = 1:(N-1) 46 | y(ii+1) = y(ii) +v(ii+1); 47 | end 48 | 49 | y = y/y(end); 50 | 51 | end 52 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_decompose_asymmatrix.m: -------------------------------------------------------------------------------- 1 | function [Wsym,Wasym] = gsp_decompose_asymmatrix(W) 2 | %GSP_DECOMPOSE_ASYMMATRIX Decompose a matrix in symmetric and asymmetric part 3 | % Usage: [Wsym,Wasym] = gsp_decompose_asymmatrix(W) 4 | % 5 | % Input parameters: 6 | % W : Asymmetric matrix 7 | % Output parameters: 8 | % Wsym : Symmetric part of W 9 | % Wasym : Asymmetric part of W 10 | % 11 | % Decompose a matrix in symmetric and asymmetric part 12 | % 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_decompose_asymmatrix.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | 38 | % Author: Francesco Grassi 39 | % Date : July 2016 40 | 41 | Wasym = W-W.'; 42 | 43 | Wasym(Wasym<0)=0; 44 | 45 | Wsym = W-Wasym; 46 | 47 | Wsym = (Wsym+Wsym')/2; 48 | 49 | end 50 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_delta.m: -------------------------------------------------------------------------------- 1 | function [ d, do ] = gsp_delta( G,at ) 2 | %GSP_DELTA 3 | % 4 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_delta.html 5 | 6 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 7 | % This file is part of GSPbox version 0.7.5 8 | % 9 | % This program is free software: you can redistribute it and/or modify 10 | % it under the terms of the GNU General Public License as published by 11 | % the Free Software Foundation, either version 3 of the License, or 12 | % (at your option) any later version. 13 | % 14 | % This program is distributed in the hope that it will be useful, 15 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | % GNU General Public License for more details. 18 | % 19 | % You should have received a copy of the GNU General Public License 20 | % along with this program. If not, see . 21 | 22 | % If you use this toolbox please kindly cite 23 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 24 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 25 | % ArXiv e-prints, Aug. 2014. 26 | % http://arxiv.org/abs/1408.5781 27 | 28 | 29 | 30 | if isstruct(G) 31 | N = G.N; 32 | else 33 | N = G; 34 | end 35 | 36 | 37 | Nat = numel(at); 38 | d = zeros(N,Nat); 39 | for ii = 1:Nat; 40 | d(at(ii),ii) = 1; 41 | end 42 | 43 | if nargout>1 44 | if isfield(G,'Gm') 45 | do = zeros(G.Gm.N-G.N,Nat); 46 | else 47 | error('This function returns two arguments only for oose.') 48 | end 49 | end 50 | 51 | end 52 | 53 | 54 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_diameter.m: -------------------------------------------------------------------------------- 1 | function d = gsp_diameter(G) 2 | 3 | d = 0; 4 | v = bfs(G.A,1); 5 | if any(v<0) 6 | warning('Disconnected graph!') 7 | end 8 | for ii = 1:G.N 9 | d = max(d,max(bfs(G.A,ii))); 10 | end 11 | 12 | end 13 | % 14 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_diameter.html 15 | 16 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 17 | % This file is part of GSPbox version 0.7.5 18 | % 19 | % This program is free software: you can redistribute it and/or modify 20 | % it under the terms of the GNU General Public License as published by 21 | % the Free Software Foundation, either version 3 of the License, or 22 | % (at your option) any later version. 23 | % 24 | % This program is distributed in the hope that it will be useful, 25 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | % GNU General Public License for more details. 28 | % 29 | % You should have received a copy of the GNU General Public License 30 | % along with this program. If not, see . 31 | 32 | % If you use this toolbox please kindly cite 33 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 34 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 35 | % ArXiv e-prints, Aug. 2014. 36 | % http://arxiv.org/abs/1408.5781 37 | end 38 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_norm_tv.m: -------------------------------------------------------------------------------- 1 | function y = gsp_norm_tv(G,x) 2 | %GSP_NORM_TV TV norm on graph 3 | % Usage: y = gsp_norm_tv(G,x); 4 | % 5 | % Input parameters: 6 | % G : Graph structure 7 | % x : Signal on graph 8 | % Output parameters: 9 | % y : Norm 10 | % 11 | % Compute the TV norm of a signal on a graph 12 | % 13 | % See also: gsp_prox_tv 14 | % 15 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_norm_tv.html 16 | 17 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 18 | % This file is part of GSPbox version 0.7.5 19 | % 20 | % This program is free software: you can redistribute it and/or modify 21 | % it under the terms of the GNU General Public License as published by 22 | % the Free Software Foundation, either version 3 of the License, or 23 | % (at your option) any later version. 24 | % 25 | % This program is distributed in the hope that it will be useful, 26 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | % GNU General Public License for more details. 29 | % 30 | % You should have received a copy of the GNU General Public License 31 | % along with this program. If not, see . 32 | 33 | % If you use this toolbox please kindly cite 34 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 35 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 36 | % ArXiv e-prints, Aug. 2014. 37 | % http://arxiv.org/abs/1408.5781 38 | 39 | % Author: Nathanael Perraudin 40 | % Date: 25 March 2014 41 | % Testing: test_gsp_prox 42 | 43 | if ~isfield(G,'v_in') 44 | G = gsp_adj2vec(G); 45 | warning(['GSP_PROX_TV: To be more efficient you should run: ',... 46 | 'G = gsp_adj2vec(G); before using this proximal operator.']); 47 | end 48 | 49 | 50 | y = sum(abs(gsp_grad(G,x))); 51 | 52 | end 53 | 54 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_reset_seed.m: -------------------------------------------------------------------------------- 1 | function gsp_reset_seed(n) 2 | %GSP_RESET_SEED Reset the seed of the random number generator 3 | % Usage: gsp_reset_seed(n); 4 | % 5 | % Input parameters: 6 | % n : seed 7 | % Ouptut parameters: 8 | % none 9 | % 10 | % This function resets the seed 11 | % 12 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_reset_seed.html 13 | 14 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 15 | % This file is part of GSPbox version 0.7.5 16 | % 17 | % This program is free software: you can redistribute it and/or modify 18 | % it under the terms of the GNU General Public License as published by 19 | % the Free Software Foundation, either version 3 of the License, or 20 | % (at your option) any later version. 21 | % 22 | % This program is distributed in the hope that it will be useful, 23 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | % GNU General Public License for more details. 26 | % 27 | % You should have received a copy of the GNU General Public License 28 | % along with this program. If not, see . 29 | 30 | % If you use this toolbox please kindly cite 31 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 32 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 33 | % ArXiv e-prints, Aug. 2014. 34 | % http://arxiv.org/abs/1408.5781 35 | 36 | % Authors: Nathanael Perraudin, Vassilis Kalofolias 37 | % Date : 21 May 2014 38 | % 39 | % global GLOBAL_rand 40 | % 41 | % if GLOBAL_rand 42 | % s = rng; 43 | 44 | if nargin<1 45 | n = 0; 46 | end 47 | 48 | if verLessThan('matlab', '7.12.0') % release 2011a has "rng" 49 | rand('twister',n); %#ok 50 | else 51 | rng(n,'twister'); 52 | end 53 | 54 | end 55 | 56 | 57 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_resistance_distance.m: -------------------------------------------------------------------------------- 1 | function rd = gsp_resistance_distance(G,param) 2 | %GSP_RESISTANCE_DISTANCE see gsp_resistance_distances 3 | % 4 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_resistance_distance.html 5 | 6 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 7 | % This file is part of GSPbox version 0.7.5 8 | % 9 | % This program is free software: you can redistribute it and/or modify 10 | % it under the terms of the GNU General Public License as published by 11 | % the Free Software Foundation, either version 3 of the License, or 12 | % (at your option) any later version. 13 | % 14 | % This program is distributed in the hope that it will be useful, 15 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | % GNU General Public License for more details. 18 | % 19 | % You should have received a copy of the GNU General Public License 20 | % along with this program. If not, see . 21 | 22 | % If you use this toolbox please kindly cite 23 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 24 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 25 | % ArXiv e-prints, Aug. 2014. 26 | % http://arxiv.org/abs/1408.5781 27 | 28 | if nargin<2 29 | param = struct; 30 | end 31 | 32 | rd = gsp_resistance_distances(G,param); 33 | 34 | end 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /gspbox/utils/gsp_strong.m: -------------------------------------------------------------------------------- 1 | function C = gsp_strong(A,B) 2 | %GSP_STRONG Strong product between matrices 3 | % Usage: C = gsp_strong(A,B) 4 | % 5 | % Input parameters: 6 | % A : matrix size N1*M1 7 | % B : matrix size N2*M2 8 | % Output parameters: 9 | % C : matrix size (N1xN2) (M1xM2) 10 | % 11 | % 'gsp_strong' computes the strong product between two matrices A 12 | % and B. The cartesian product between two matrices is 13 | % 14 | % C = strong(A,B) = kron(A,B) + cartesian(A,B) 15 | % 16 | % See also: gsp_graph_product 17 | % 18 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/gsp_strong.html 19 | 20 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 21 | % This file is part of GSPbox version 0.7.5 22 | % 23 | % This program is free software: you can redistribute it and/or modify 24 | % it under the terms of the GNU General Public License as published by 25 | % the Free Software Foundation, either version 3 of the License, or 26 | % (at your option) any later version. 27 | % 28 | % This program is distributed in the hope that it will be useful, 29 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 30 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 31 | % GNU General Public License for more details. 32 | % 33 | % You should have received a copy of the GNU General Public License 34 | % along with this program. If not, see . 35 | 36 | % If you use this toolbox please kindly cite 37 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 38 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 39 | % ArXiv e-prints, Aug. 2014. 40 | % http://arxiv.org/abs/1408.5781 41 | 42 | % Author : Francesco Grassi 43 | % Date : July 2016 44 | 45 | C = kron(A,B) + gsp_cartesian(A,B); 46 | 47 | 48 | end 49 | -------------------------------------------------------------------------------- /gspbox/utils/utils/boolean.m: -------------------------------------------------------------------------------- 1 | function y = boolean(x) 2 | 3 | y = logical(x); 4 | 5 | % 6 | % Url: https://epfl-lts2.github.io/gspbox-html/doc/utils/utils/boolean.html 7 | 8 | % Copyright (C) 2013-2016 Nathanael Perraudin, Johan Paratte, David I Shuman. 9 | % This file is part of GSPbox version 0.7.5 10 | % 11 | % This program is free software: you can redistribute it and/or modify 12 | % it under the terms of the GNU General Public License as published by 13 | % the Free Software Foundation, either version 3 of the License, or 14 | % (at your option) any later version. 15 | % 16 | % This program is distributed in the hope that it will be useful, 17 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | % GNU General Public License for more details. 20 | % 21 | % You should have received a copy of the GNU General Public License 22 | % along with this program. If not, see . 23 | 24 | % If you use this toolbox please kindly cite 25 | % N. Perraudin, J. Paratte, D. Shuman, V. Kalofolias, P. Vandergheynst, 26 | % and D. K. Hammond. GSPBOX: A toolbox for signal processing on graphs. 27 | % ArXiv e-prints, Aug. 2014. 28 | % http://arxiv.org/abs/1408.5781 29 | 30 | -------------------------------------------------------------------------------- /mydata.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/balcilar/Graph_Signal_Processing/963a84a9c084e0488760af77ec3244195feeeb5c/mydata.mat --------------------------------------------------------------------------------