Published
Edited
Dec 23, 2019
2 stars
Insert cell
Insert cell
qrSolve = require(await FileAttachment("qr-solve-0.1.0.js").url()) //("https://bundle.run/qr-solve")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
solve = {
// the `prepare` method returns a function that can be used to solve
// the equation for any value of b.
const M2 = [
...M,
...M.filter(d => d[0] !== d[1]).map(d => [d[1], d[0], d[2]])
];

// M MUST be given in the order of increasing rows and columns numbers.
M2.sort((a, b) => (a[0] > b[0] || (a[0] === b[0] && a[1] > b[1]) ? 1 : -1));
return qrSolve.prepare(M2, n, n);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more