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);}
Latent Position Random Graph with Kernel κ
Let X be a set and κ:X×X→[0,1] a symmetric function. Let X1,…,Xn∈X. Let A be the binary matrix such that
P[A∣X]=∏i<jκ(Xi,Xj)Aij(1−κ(Xi,Xj))1−Aij
ie Aij∼Bernoulli(κ(Xi,Xj)). Then A is the adjacency matrix of a latent position random graph with latent positionsX and link function (kernel) κ.