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

Raw File Download

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
content badge
swh:1:cnt:492c71d93da6f6204deaffd9c979053fe2e855f2

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
(requires biblatex-software package)
Generating citation ...
function status = linesearch_for_energy_decrease(M, b, Jp, z, delta, Eg, energy_type, status)
    delta_norm = norm(delta);
    dot_delta_g = dot(delta, Eg);
    delta = reshape(delta,[],3);
    E = status(2);
    E_next = E;
    ls = 1;
    ls_alpha = 0.2;
    ls_beta = 0.5;
    while ls * delta_norm > 1e-6
        z_next = z - ls*delta;
        Eq_next = trace(z_next'*M*z_next) - 2 * dot(z_next(:),b(:));
        J_next = z_next' * Jp;
        [~,s,~] = svdJacobian(J_next);
        
        
        switch energy_type
            case 1
                s = s(:);
                Ed_next = sum(s.^2 + s.^(-2) - 2) / size(Jp,2) * 3;
            case 2
                s = s(:);
                Ed_next = sum((s-1).^2) / size(Jp,2) * 3;
        end
        E_next = Eq_next + Ed_next;
        if E_next < E - ls * ls_alpha * dot_delta_g
            break;
        end
        ls = ls * ls_beta;
    end 
    status(1) = ls;
    status(3) = E_next;
    status(8) = delta_norm;
    if energy_type == 2
        status(4) = max(s);
        status(6) = min(s);        
    end
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