Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/ruqihuang/AdjointFmaps
27 January 2026, 07:39:27 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • 702a3902f859cde5970deb97200347502ecb181a
    No releases to show
  • 2059413
  • /
  • Joint_shape_analysis_F6_and_F_13.m
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:ea73f5f974556dfb41f981ae1ca5640130fa63b7
origin badgedirectory badge
swh:1:dir:2059413509a96640c6a3e80716930866fcd8982a
origin badgerevision badge
swh:1:rev:702a3902f859cde5970deb97200347502ecb181a
origin badgesnapshot badge
swh:1:snp:f8058bb26ca7dfa4e9342cbbd0758552e7f5f26e

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 702a3902f859cde5970deb97200347502ecb181a authored by ruqihuang on 24 July 2017, 21:09:41 UTC
modify Change_of_basis_F9.m
Tip revision: 702a390
Joint_shape_analysis_F6_and_F_13.m
%In the end, we reproduce figure(1) as Figure 6 and figure(2)
%as Figure 13 in the paper. 

clc; clear; close all; 
addpath(genpath('data')); 
addpath(genpath('external')); 
addpath(genpath('utils')); 

S1 = read_off_shape('1.off'); 
S2 = read_off_shape('11.off'); 

kEig = 60; 
L{1} = compute_laplacian_basis(S1, kEig); 
L{2} = compute_laplacian_basis(S2, kEig); 

% compute ground-truth funcitonal maps
C = cell(2);
for i = 1:2
    for j = 1:2
        if i ~= j
            C{i, j} = L{j}.evecs'*L{j}.A*L{i}.evecs; 
        else
            C{i, j} = eye(kEig); 
        end
    end
end

% compute the shape difference operators
[u1, v1] = eig(C{1, 2}'*C{1, 2}); 
[v1, ind] = sort(diag(v1), 'descend'); 
u1 = u1(:, ind); 
f = zeros(12500, 1); 
for i = 1:5
    f = f + v1(i)*(L{1}.evecs*u1(:, i)).^2; 
end



[u2, v2] = eig(C{2, 1}'*C{2, 1});
[v2, ind] = sort(diag(v2), 'descend'); 
u2 = u2(:, ind); 
g = zeros(12500, 1); 
for i = 1:5
    g = g+v2(i)*(L{2}.evecs*u2(:, i)).^2; 
end


U = extract_latent_basis(C); 
l = 49; 

B = U.evecs(:, 1:l); 

X = cell(size(C)); 
for i = 1:length(C)
    for j = 1:length(C)
        X{i, j} = C{j, i}';
    end
end

W = extract_latent_basis(X); 


E = B'*W.mat*B; 
E = (E+E')/2; 

[u, v] = eig(E); 
[v, idx] = sort(diag(v), 'descend'); 
u = u(:, idx); 
h1 = zeros(12500, 1); 
for i = 1:5
    h1 = h1 + v(i)*(L{1}.evecs*(U.bases{1}(:, 1:l)*u(:, i))).^2; 
end

h2 = zeros(12500, 1); 
for i = 1:5
    h2 = h2 + v(i)*(L{2}.evecs*(U.bases{2}(:, 1:l)*u(:, i))).^2; 
end


figure(1); 
subplot(2, 4, 1); 
plotMesh(L{1}, f, -90, -6);
subplot(2, 4, 5); 
plotMesh(L{1}, f, 90, 6); 
subplot(2, 4, 2); 
plotMesh(L{2}, g, 90, 6); 
subplot(2, 4, 6); 
plotMesh(L{2}, g, -90, -6); 
subplot(2, 4, 3); 
plotMesh(L{1}, h1, -90, -6); 
subplot(2, 4, 4); 
plotMesh(L{2}, h2, 90, 6); 
subplot(2, 4, 7); 
plotMesh(L{1}, h1, 90, 6); 
subplot(2, 4, 8); 
plotMesh(L{2}, h2, -90, -6); 

figure(2); 
for i = 1:5
    subplot(2, 10, i); plotMesh(L{1}, (L{1}.evecs*u1(:, i)).^2, -90, -6);
    subplot(2, 10, i+5); plotMesh(L{2}, (L{2}.evecs*u2(:, i)).^2, 90, 6); 
end
subplot(2, 10, 2); plotMesh(L{1}, (L{1}.evecs*u1(:, 2)).^2, 90, 6);
subplot(2, 10, 6); plotMesh(L{2}, (L{2}.evecs*u2(:, 1)).^2, -90, -6);
subplot(2, 10, 8); plotMesh(L{2}, (L{2}.evecs*u2(:, 3)).^2, -90, -6);

for i = 1:10
    subplot(2, 10, 10+i); plotMesh(L{1}, (L{1}.evecs*(U.bases{1}(:, 1:l)*u(:, i))).^2, -90, -6); 
end
for i = [3, 4, 6]
    subplot(2, 10, 10+i); plotMesh(L{1}, (L{1}.evecs*(U.bases{1}(:, 1:l)*u(:, i))).^2, 90, 6);
end



back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API