Skip to content

Instantly share code, notes, and snippets.

View jimka2001's full-sized avatar

Jim Newton jimka2001

  • EPITA
  • Le Kremlin Becetre, FRANCE
View GitHub Profile
@jimka2001
jimka2001 / laplacian.clj
Created February 23, 2024 14:07
compute determinant using Laplacian expansion
(ns homework.determinant)
(defn supress_rc
"Given a function, f (as returned from mat-to-function or from supress_rc).
Assuming f can be called with indices 0 <= r < n and 0 <= c < n,
return a new function which can be called on 0 <= r < n-1 and 0 <= c < n,
which will skip the row and column specified omit-r and omit-c"
[f omit-r omit-c]
(fn [r0 c0]
(f (if (< r0 omit-r) r0 (inc r0))
(ns homework.determinant)
(defn supress_rc
"Given a function, f (as returned from mat-to-function or from supress_rc).
Assuming f can be called with indices 0 <= r < n and 0 <= c < n,
return a new function which can be called on 0 <= r < n-1 and 0 <= c < n,
which will skip the row and column specified omit-r and omit-c"
[f omit-r omit-c]
(fn [r0 c0]
(f (if (< r0 omit-r) r0 (inc r0))
{:data
{:values
({:x 1952.0, :y 0.028385906, :series "Blanche-F-MS"}
{:x 1932.0, :y 0.07265792, :series "Blanche-F-MS"}
{:x 1948.0, :y 0.01749108, :series "Blanche-F-MS"}
{:x 1922.0, :y 0.16821602, :series "Blanche-F-MS"}
{:x 1933.0, :y 0.059075467, :series "Blanche-F-MS"}
{:x 1930.0, :y 0.0905551, :series "Blanche-F-MS"}
{:x 1929.0, :y 0.09312288, :series "Blanche-F-MS"}
{:x 1913.0, :y 0.19990404, :series "Blanche-F-MS"}
# Uncrustify 0.61
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
case ArticulationType::Turn: {
vector<int> body = {0,1,0,-1,0};
renderArticulation(events, chord, pitch, _32nd,
emptypattern,
body, false, true, // sustain last note of body, but don't repeat
emptypattern);
}
break;