const fieldName = "theme"; // Your field with linksconst oldPrefix = "Thoughts/01 Themes/";const newPrefix = "Digital Garden/Topics/";const relatedLinks = dv.current()[fieldName];if (Array.isArray(relatedLinks)) { // Map over the links, replace the path, and output only clickable links dv.el("span", relatedLinks .map(link => { if (link && link.path) { let newPath = link.path.startsWith(oldPrefix) ? link.path.replace(oldPrefix, newPrefix) : link.path; return dv.fileLink(newPath); } }) .filter(Boolean).join(", ") // Remove any undefined/null items );} else { dv.el(dv.current().theme);}
Min/Max Bisection
Let G be an undirectedgraph with vertices V=[d] and d is even. The minimum and maximum bisections of G are the numbers
\text{MinBis}(G) &:= \min_{\substack{s \subseteq V \\ \lvert S \rvert = \frac{d}{2}}} \lvert E(S, V \setminus S) \rvert \\
\text{MaxBis}(G) &:= \max_{\substack{s \subseteq V \\ \lvert S \rvert = \frac{d}{2}}} \lvert E(S, V \setminus S) \rvert
\end{align}$$
NOTE
We can think of the minimum bisection as a way to formulate community detection (see SBM). We want to divide a graph into two balanced subsets with as many edges as possible in each one.