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/jrethore/ufreckles
21 April 2026, 21:14:19 UTC
  • Code
  • Branches (4)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/heads/v2.0
    • refs/heads/v2.1
    • refs/heads/v2.2
    No releases to show
  • cee97d2
  • /
  • BasisFunctions
  • /
  • NURBSDersBasisFunc.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:5afe4daade171e448328bb8ad3f2fb3c95295204
origin badgedirectory badge
swh:1:dir:a2ef36a09cb4615a5cd5185eb069f3127c7363d1
origin badgerevision badge
swh:1:rev:b8e0e3539b29c393f9a5efc5fb0586be983a98e5
origin badgesnapshot badge
swh:1:snp:e93363e05fc035dd2687d48111453842fa57bff8

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
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: b8e0e3539b29c393f9a5efc5fb0586be983a98e5 authored by Julien Réthoré on 14 April 2023, 15:42:09 UTC
v2.1
Tip revision: b8e0e35
NURBSDersBasisFunc.m
function [N,dN]=NURBSDersBasisFunc(ii,pl,u,u_knotl)      
      
      %nb de derivee dont on a besoin, a priori une seule
	  nders=1;
      N=zeros(length(u),pl+1);
	  dN=zeros(length(u),pl+1);
	  
	  a=zeros(length(u),nders+1,pl+1);
	  
	  ndu=zeros(length(u),pl+1,pl+1);
	  ders=zeros(length(u),nders+1,pl+1);
	  
      leftl=zeros(length(u),pl+1);
      rightl=zeros(length(u),pl+1);
      N(:,1,1) = 1;
	  ndu(:,1,1)=1;
	
	  for j = 1:pl
         leftl(:,j+1) = u - u_knotl(ii+1-j);
         rightl(:,j+1) = u_knotl(ii+j) - u;
         saved = 0;
         for r = 0:(j-1)
			ndu(:,j+1,r+1) = rightl(:,r+2)+leftl(:,j-r+1);
			temp = ndu(:,r+1,j)./ndu(:,j+1,r+1);
            ndu(:,r+1,j+1) = saved + rightl(:,r+2).*temp;
            saved = leftl(:,j-r+1).*temp;
         end
         ndu(:,j+1,j+1) = saved;
	  end
	  
	  for j = 0:pl
		  ders(:,1,j+1)=ndu(:,j+1,pl+1);
	  end
	  for r=0:pl
		 s1=0;
		 s2=1;
		 a(:,1,1)=1;
		 for k=1:nders
			 d=zeros(length(u),1,1);
			rk=r-k;
			pk=pl-k;
			if(r>=k)
				a(:,s2+1,1)=a(:,s1+1,1)./ndu(:,pk+2,rk+1);
				d(:,1,1) = a(:,s2+1,1).*ndu(:,rk+1,pk+1);
			end
			if(rk>=-1)
				j1=1;
			else
				j1=-rk;
			end
			if((r-1)<=pk)
				j2=k-1;
			else
				j2=pl-r;
			end
			for j=j1:j2
				a(:,s2+1,j+1)=(a(:,s1+1,j+1) - a(:,s1+1,j))./ndu(:,pk+2,rk+j+1);			
				d(:,1,1) = d(:,1,1) + a(:,s2+1,j+1).*ndu(:,rk+j+1,pk+1);
			end
			if(r<=pk)
				a(:,s2+1,k+1) = -a(:,s1+1,k)./ndu(:,pk+2,r+1);
				d(:,1,1) = d(:,1,1) + a(:,s2+1,k+1).*ndu(:,r+1,pk+1);
			end
			ders(:,k+1,r+1)=d(:,1,1);
			j=s1;
			s1=s2;
			s2=j;
		 end	  
	  end
	  
	  % multiply by correction factor
	  r=pl;
	  for k=1:nders
		 for j=0:pl
			ders(:,k+1,j+1)=ders(:,k+1,j+1)*r; 
		 end
		 r=r*(pl-k);
	  end
	  
	  for j = 0:pl
		  N(:,j+1)=ders(:,1,j+1);
		  dN(:,j+1)=ders(:,2,j+1);
	  end
%       figure
%       plot(u,N)
%       title(sprintf('ii %d',ii+1-pl))
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