Diff of /inst/csape.m[200d31] .. [d243d5] Maximize Restore

Switch to side-by-side view

```--- a/inst/csape.m
+++ b/inst/csape.m
@@ -95,11 +95,11 @@

e = h(2:n - 2);

-      g = 3 * diff (a(2:n,:)) ./ h(2:n - 1,idx)\
+      g = 3 * diff (a(2:n,:)) ./ h(2:n - 1,idx)...
- 3 * diff (a(1:n - 1,:)) ./ h(1:n - 2,idx);
-      g(1,:) = 3 * (a(3,:) - a(2,:)) / h(2) \
+      g(1,:) = 3 * (a(3,:) - a(2,:)) / h(2) ...
- 3 / 2 * (3 * (a(2,:) - a(1,:)) / h(1) - valc(1));
-      g(n - 2,:) = 3 / 2 * (3 * (a(n,:) - a(n - 1,:)) / h(n - 1) - valc(2))\
+      g(n - 2,:) = 3 / 2 * (3 * (a(n,:) - a(n - 1,:)) / h(n - 1) - valc(2))...
- 3 * (a(n - 1,:) - a(n - 2,:)) / h(n - 2);

c(2:n - 1,:) = spdiags([[e(:);0],dg,[0;e(:)]],[-1,0,1],n-2,n-2) \ g;
@@ -107,7 +107,7 @@
c(1,:) = (3 / h(1) * (a(2,:) - a(1,:)) - 3 * valc(1) - c(2,:) * h(1)) / (2 * h(1));
c(n,:) = - (3 / h(n - 1) * (a(n,:) - a(n - 1,:)) - 3 * valc(2) + c(n - 1,:) * h(n - 1)) / (2 * h(n - 1));
end
-    b(1:n - 1,:) = diff (a) ./ h(1:n - 1, idx)\
+    b(1:n - 1,:) = diff (a) ./ h(1:n - 1, idx)...
- h(1:n - 1,idx) / 3 .* (c(2:n,:) + 2 * c(1:n - 1,:));
d = diff (c) ./ (3 * h(1:n - 1, idx));

@@ -121,7 +121,7 @@
c(1,:) = valc(1) / 2;
c(n,:) = valc(2) / 2;

-    g = 3 * diff (a(2:n,:)) ./ h(2:n - 1, idx)\
+    g = 3 * diff (a(2:n,:)) ./ h(2:n - 1, idx)...
- 3 * diff (a(1:n - 1,:)) ./ h(1:n - 2, idx);

g(1,:) = g(1,:) - h(1) * c(1,:);
@@ -136,7 +136,7 @@
c(2:n - 1,:) = spdiags([[e(:);0],dg,[0;e(:)]],[-1,0,1],n-2,n-2) \ g;
end

-    b(1:n - 1,:) = diff (a) ./ h(1:n - 1,idx)\
+    b(1:n - 1,:) = diff (a) ./ h(1:n - 1,idx)...
- h(1:n - 1,idx) / 3 .* (c(2:n,:) + 2 * c(1:n - 1,:));
d = diff (c) ./ (3 * h(1:n - 1, idx));

@@ -149,7 +149,7 @@
a(n,:) = a(1,:);

tmp = diff (shift ([a; a(2,:)], -1));
-    g = 3 * tmp(1:n - 1,:) ./ h(2:n,idx)\
+    g = 3 * tmp(1:n - 1,:) ./ h(2:n,idx)...
- 3 * diff (a) ./ h(1:n - 1,idx);

if (n > 3)
@@ -170,7 +170,7 @@
endif

c(1,:) = c(n,:);
-    b = diff (a) ./ h(1:n - 1,idx)\
+    b = diff (a) ./ h(1:n - 1,idx)...
- h(1:n - 1,idx) / 3 .* (c(2:n,:) + 2 * c(1:n - 1,:));
b(n,:) = b(1,:);
d = diff (c) ./ (3 * h(1:n - 1, idx));
@@ -179,15 +179,15 @@
elseif (strcmp(cond,"not-a-knot"))

g = zeros(n - 2,columns(a));
-    g(1,:) = 3 / (h(1) + h(2)) * (a(3,:) - a(2,:)\
+    g(1,:) = 3 / (h(1) + h(2)) * (a(3,:) - a(2,:)...
- h(2) / h(1) * (a(2,:) - a(1,:)));
-    g(n - 2,:) = 3 / (h(n - 1) + h(n - 2)) *\
-        (h(n - 2) / h(n - 1) * (a(n,:) - a(n - 1,:)) -\
+    g(n - 2,:) = 3 / (h(n - 1) + h(n - 2)) *...
+        (h(n - 2) / h(n - 1) * (a(n,:) - a(n - 1,:)) -...
(a(n - 1,:) - a(n - 2,:)));

if (n > 4)

-      g(2:n - 3,:) = 3 * diff (a(3:n - 1,:)) ./ h(3:n - 2,idx)\
+      g(2:n - 3,:) = 3 * diff (a(3:n - 1,:)) ./ h(3:n - 2,idx)...
- 3 * diff (a(2:n - 2,:)) ./ h(2:n - 3,idx);

dg = 2 * (h(1:n - 2) .+ h(2:n - 1));
@@ -215,7 +215,7 @@

c(1,:) = c(2,:) + h(1) / h(2) * (c(2,:) - c(3,:));
c(n,:) = c(n - 1,:) + h(n - 1) / h(n - 2) * (c(n - 1,:) - c(n - 2,:));
-    b = diff (a) ./ h(1:n - 1, idx)\
+    b = diff (a) ./ h(1:n - 1, idx)...
- h(1:n - 1, idx) / 3 .* (c(2:n,:) + 2 * c(1:n - 1,:));
d = diff (c) ./ (3 * h(1:n - 1, idx));

```