MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / edgeIntensityFor

Function edgeIntensityFor

graph-ui/src/galaxy/EdgeLines.tsx:134–148  ·  view source on GitHub ↗
(sameCluster: boolean, edgeCount: number)

Source from the content-addressed store, hash-verified

132 * WebGL-Kontext zu oeffnen.
133 */
134export function edgeIntensityFor(sameCluster: boolean, edgeCount: number): number {
135 const ported = sameCluster ? PORTED_INTENSITY_NEAR : PORTED_INTENSITY_FAR;
136 const washed = ported * edgeIntensityScale(edgeCount);
137 if (!Number.isFinite(edgeCount) || edgeCount >= EDGE_WASH_COUNT) {
138 return washed;
139 }
140 const readable = sameCluster ? EDGE_INTENSITY_NEAR : EDGE_INTENSITY_FAR;
141 if (edgeCount <= EDGE_FULL_COUNT) {
142 return readable;
143 }
144 const atWash = ported * edgeIntensityScale(EDGE_WASH_COUNT);
145 const share =
146 Math.log(edgeCount / EDGE_FULL_COUNT) / Math.log(EDGE_WASH_COUNT / EDGE_FULL_COUNT);
147 return readable * Math.pow(atWash / readable, share);
148}
149
150export function createEdgeGeometry({
151 nodes,

Callers 3

edge-lines.test.tsFile · 0.90
createEdgeGeometryFunction · 0.85

Calls 2

edgeIntensityScaleFunction · 0.90
logMethod · 0.80

Tested by

no test coverage detected