{"record":{"id":"11d521613bcc137a","repo":"ruvnet/ruflo","slug":"vectors-must-have-same-dimension","errorCode":null,"errorMessage":"Vectors must have same dimension","messagePattern":"Vectors must have same dimension","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/embeddings/src/hyperbolic.ts","lineNumber":209,"sourceCode":" * Möbius addition in Poincaré ball\n *\n * Hyperbolic \"addition\" operation that respects the ball geometry.\n *\n * @param a - First vector\n * @param b - Second vector\n * @param config - Configuration\n * @returns a ⊕ b in hyperbolic space\n */\nexport function mobiusAdd(\n  a: Float32Array | number[],\n  b: Float32Array | number[],\n  config: HyperbolicConfig = {}\n): Float32Array {\n  const { curvature, epsilon, maxNorm } = { ...DEFAULT_CONFIG, ...config };\n  const c = Math.abs(curvature);\n\n  if (a.length !== b.length) {\n    throw new Error('Vectors must have same dimension');\n  }\n\n  let normASq = 0;\n  let normBSq = 0;\n  for (let i = 0; i < a.length; i++) {\n    normASq += a[i] * a[i];\n    normBSq += b[i] * b[i];\n  }\n\n  // <a, b>\n  let dotAB = 0;\n  for (let i = 0; i < a.length; i++) {\n    dotAB += a[i] * b[i];\n  }\n\n  // Möbius addition formula\n  const numeratorCoeffA = 1 + 2 * c * dotAB + c * normBSq;\n  const numeratorCoeffB = 1 - c * normASq;","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/embeddings/src/hyperbolic.ts#L191-L227","documentation":"Thrown by mobiusAdd when the two input vectors a and b have different lengths; Möbius addition in the Poincaré ball is only defined element-wise over vectors of identical dimension, so any dimension mismatch aborts before the curvature/epsilon math begins.","triggerScenarios":"Thrown at v3/@claude-flow/embeddings/src/hyperbolic.ts:209 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure both vectors come from the same embedding model before the operation.","Check this.dimensions against the input length and regenerate the shorter vector."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}